Module org.jhotdraw8.application
Class AbstractOpenFileAction
java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.action.AbstractAction
org.jhotdraw8.application.action.AbstractApplicationAction
org.jhotdraw8.application.action.file.AbstractOpenFileAction
- All Implemented Interfaces:
EventListener,javafx.event.EventHandler<javafx.event.ActionEvent>,Action,PropertyBean,Disableable
- Direct Known Subclasses:
OpenFileAction
-
Property Summary
Properties inherited from class org.jhotdraw8.application.action.AbstractAction
selectedProperties inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperties inherited from interface org.jhotdraw8.fxbase.control.Disableable
disabled -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<Supplier<URIChooser>> static final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<URIChooser> Fields inherited from class org.jhotdraw8.application.action.AbstractApplicationAction
appFields inherited from class org.jhotdraw8.application.action.AbstractAction
propertiesFields inherited from class org.jhotdraw8.application.AbstractDisableable
disabled, disablersFields inherited from interface org.jhotdraw8.application.action.Action
ACCELERATOR_KEY, ID_KEY, LABEL, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, SELECTED_PROPERTY, SHORT_DESCRIPTION, SMALL_ICONFields inherited from interface org.jhotdraw8.fxbase.control.Disableable
DISABLED_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoIt(@NonNull FileBasedActivity view, boolean disposeView, WorkState<Void> workState) protected @Nullable URIChoosergetChooser(FileBasedActivity view) protected abstract booleanprotected voidonActionPerformed(@NonNull javafx.event.ActionEvent evt, @NonNull Application app) This method is invoked when the action is not disabled and the event is not consumed.protected voidopenActivityFromURI(@NonNull FileBasedActivity v, @NonNull URI uri, @NonNull URIChooser chooser, WorkState<Void> workState) Methods inherited from class org.jhotdraw8.application.action.AbstractApplicationAction
createAlert, createErrorMessage, getApplication, onActionPerformedMethods inherited from class org.jhotdraw8.application.action.AbstractAction
getProperties, handle, selectedPropertyMethods inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperty, disablersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.application.action.Action
getId, getLabel, isSelected, setSelectedMethods inherited from interface org.jhotdraw8.fxbase.control.Disableable
addDisabler, disabledProperty, disablers, isDisabled, removeDisablerMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperty, put, remove, set, setNonNull, valueAt
-
Field Details
-
OPEN_CHOOSER_KEY
public static final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<URIChooser> OPEN_CHOOSER_KEY -
OPEN_CHOOSER_FACTORY_KEY
public static final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<Supplier<URIChooser>> OPEN_CHOOSER_FACTORY_KEY
-
-
Constructor Details
-
AbstractOpenFileAction
-
-
Method Details
-
getChooser
-
isReuseEmptyViews
protected abstract boolean isReuseEmptyViews() -
onActionPerformed
Description copied from class:AbstractApplicationActionThis method is invoked when the action is not disabled and the event is not consumed.- Specified by:
onActionPerformedin classAbstractApplicationAction- Parameters:
evt- the action eventapp- the applicatoin
-
doIt
-
openActivityFromURI
protected void openActivityFromURI(@NonNull FileBasedActivity v, @NonNull URI uri, @NonNull URIChooser chooser, WorkState<Void> workState) -
getReadOptions
protected abstract @NonNull Map<org.jhotdraw8.fxcollection.typesafekey.Key<?>,Object> getReadOptions()Gets options forFileBasedActivity.read(java.net.URI, javafx.scene.input.DataFormat, org.jhotdraw8.icollection.immutable.ImmutableMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, java.lang.Object>, boolean, org.jhotdraw8.fxbase.concurrent.WorkState<java.lang.Void>). The options can be null, a constant, or from user input through a dialog window.The value null means that the user has aborted the dialog window. In this case, the action will not open a file!
- Returns:
- options or null if the user has aborted the dialog window
-