Module org.jhotdraw8.application
Package org.jhotdraw8.application.action
Class AbstractApplicationAction
java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.action.AbstractAction
org.jhotdraw8.application.action.AbstractApplicationAction
- All Implemented Interfaces:
EventListener,javafx.event.EventHandler<javafx.event.ActionEvent>,Action,PropertyBean,Disableable
- Direct Known Subclasses:
AboutAction,AbstractActivityAction,AbstractFocusOwnerAction,AbstractOpenFileAction,AbstractPreferencesAction,AbstractSelectionAction,ClearRecentFilesMenuAction,ExitAction,NewFileAction,OpenRecentFileAction
This abstract class can be extended to implement an
Action that acts
on an Application.
An AbstractApplicationAction is disabled when it has disablers
Disableable or when its application is disabled.
- 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
FieldsFields 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 TypeMethodDescriptionprotected javafx.scene.control.AlertcreateAlert(javafx.scene.control.Alert.AlertType alertType, String message, String headerText) protected StringcreateErrorMessage(@Nullable Throwable t) final Applicationprotected final voidonActionPerformed(javafx.event.ActionEvent event) This method is invoked when the action is not disabled and the event is not consumed.protected abstract voidonActionPerformed(javafx.event.ActionEvent event, Application app) This method is invoked when the action is not disabled and the event is not consumed.Methods 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
-
app
-
-
Constructor Details
-
AbstractApplicationAction
Creates a new instance.- Parameters:
app- the application
-
-
Method Details
-
createErrorMessage
-
getApplication
-
onActionPerformed
protected final void onActionPerformed(javafx.event.ActionEvent event) Description copied from class:AbstractActionThis method is invoked when the action is not disabled and the event is not consumed.- Specified by:
onActionPerformedin classAbstractAction- Parameters:
event- the action event
-
onActionPerformed
This method is invoked when the action is not disabled and the event is not consumed.- Parameters:
event- the action eventapp- the applicatoin
-
createAlert
-