com.levigo.jadice.appbase.chooser
Interface ReadStrategy

All Known Implementing Classes:
FileOpener.SimpleReadStrategy

public interface ReadStrategy

Strategy for loading preview Document instances. Implementations of this class control whether and how a Document will be loaded for the preview of a FileChooser. Implementations must ensure that any call to read(File) is fast. The Method read(File) is intended to be run on the Event Dispatch Thread (EDT) and therefore the UI will be blocked until this method returns.

Implementations shall use Read.asynchronously() or a custom implementation to delegate the loading process into a background thread.


Method Summary
 Document read(File file)
          Construct and load a document for the given File instance.
 

Method Detail

read

Document read(File file)
Construct and load a document for the given File instance.

Parameters:
file - the File for which a preview shall be loaded.
Returns:
either a Document instance or null if the ReadStrategy chooses to ignore the given File


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.