Module org.jhotdraw8.application
Class ExportFileAction
java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.action.AbstractAction
org.jhotdraw8.application.action.AbstractApplicationAction
org.jhotdraw8.application.action.AbstractActivityAction<FileBasedActivity>
org.jhotdraw8.application.action.file.AbstractSaveFileAction
org.jhotdraw8.application.action.file.ExportFileAction
- All Implemented Interfaces:
EventListener,javafx.event.EventHandler<javafx.event.ActionEvent>,Action,PropertyBean,Disableable
Presents a file chooser to the user and then exports the contents of the
active view to the chosen file.
- Author:
- Werner Randelshofer
-
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> static final StringFields inherited from class org.jhotdraw8.application.action.file.AbstractSaveFileAction
SAVE_CHOOSER_FACTORY_KEY, SAVE_CHOOSER_KEYFields 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
ConstructorsConstructorDescriptionExportFileAction(@NonNull FileBasedActivity activity) Creates a new instance.ExportFileAction(@NonNull FileBasedActivity activity, String id, Function<javafx.scene.input.DataFormat, javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, Object>>> optionsDialog) Creates a new instance.ExportFileAction(@NonNull FileBasedActivity activity, Function<javafx.scene.input.DataFormat, javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, Object>>> optionsDialog) -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, Object>> createOptionsDialog(javafx.scene.input.DataFormat format) protected @NonNull URIChoosergetChooser(FileBasedActivity view) protected voidonSaveSucceeded(FileBasedActivity v, URI uri, javafx.scene.input.DataFormat format) Methods inherited from class org.jhotdraw8.application.action.file.AbstractSaveFileAction
onActionPerformed, saveFileChooseOptions, saveFileChooseUri, saveFileToUriMethods inherited from class org.jhotdraw8.application.action.AbstractActivityAction
getActivity, onActionPerformedMethods 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
-
ID
- See Also:
-
EXPORT_CHOOSER_KEY
public static final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<URIChooser> EXPORT_CHOOSER_KEY -
EXPORT_CHOOSER_FACTORY_KEY
public static final @NonNull org.jhotdraw8.fxcollection.typesafekey.Key<Supplier<URIChooser>> EXPORT_CHOOSER_FACTORY_KEY
-
-
Constructor Details
-
ExportFileAction
Creates a new instance.- Parameters:
activity- the view
-
ExportFileAction
public ExportFileAction(@NonNull FileBasedActivity activity, Function<javafx.scene.input.DataFormat, javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, Object>>> optionsDialog) -
ExportFileAction
public ExportFileAction(@NonNull FileBasedActivity activity, String id, Function<javafx.scene.input.DataFormat, javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>, Object>>> optionsDialog) Creates a new instance.- Parameters:
activity- the view, nullableid- the id, nonnulloptionsDialog- the dialog for specifying export options
-
-
Method Details
-
getChooser
- Overrides:
getChooserin classAbstractSaveFileAction
-
createOptionsDialog
protected @Nullable javafx.scene.control.Dialog<SequencedMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>,Object>> createOptionsDialog(javafx.scene.input.DataFormat format) - Overrides:
createOptionsDialogin classAbstractSaveFileAction
-
onSaveSucceeded
- Specified by:
onSaveSucceededin classAbstractSaveFileAction
-