Class AbstractAction

java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.action.AbstractAction
All Implemented Interfaces:
EventListener, javafx.event.EventHandler<javafx.event.ActionEvent>, Action, PropertyBean, Disableable
Direct Known Subclasses:
AbstractApplicationAction, ScreenMenuBarProxyAction

public abstract class AbstractAction extends AbstractDisableable implements Action
AbstractAction.
Author:
Werner Randelshofer
  • Property Details

  • Field Details

    • properties

      protected final javafx.collections.ObservableMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>,Object> properties
      Holds the properties.
  • Constructor Details

    • AbstractAction

      public AbstractAction()
      Creates a new instance. Binds disabled to disable.
    • AbstractAction

      public AbstractAction(String id)
      Creates a new instance. Binds disabled to disable.
      Parameters:
      id - the id of the action
  • Method Details

    • getProperties

      public final @NonNull javafx.collections.ObservableMap<org.jhotdraw8.fxcollection.typesafekey.Key<?>,Object> getProperties()
      Specified by:
      getProperties in interface PropertyBean
    • handle

      public final void handle(@NonNull javafx.event.ActionEvent event)
      Invokes onActionPerformed(javafx.event.ActionEvent) if the action is not disabled and the event is not consumed. Consumes the event after invoking handleActionPerformed.
      Specified by:
      handle in interface javafx.event.EventHandler<javafx.event.ActionEvent>
      Parameters:
      event - the action event
    • onActionPerformed

      protected abstract void onActionPerformed(@NonNull javafx.event.ActionEvent event)
      This method is invoked when the action is not disabled and the event is not consumed.
      Parameters:
      event - the action event
    • selectedProperty

      public @NonNull javafx.beans.property.BooleanProperty selectedProperty()
      Description copied from interface: Action
      The Boolean that corresponds to the selected state. This is typically used only for actions that have a meaningful selection state.
      Specified by:
      selectedProperty in interface Action
      Returns:
      the selected property