java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.action.AbstractAction
org.jhotdraw8.draw.action.AbstractDrawingViewAction
- All Implemented Interfaces:
EventListener,javafx.event.EventHandler<javafx.event.ActionEvent>,Action,PropertyBean,Disableable
- Direct Known Subclasses:
AddToGroupAction,AlignBottomAction,AlignHorizontalAction,AlignLeftAction,AlignRightAction,AlignTopAction,AlignVerticalAction,BringForwardAction,BringToFrontAction,DistributeHorizontallyAction,DistributeVerticallyAction,GroupAction,RemoveFromGroupAction,RemoveTransformationsAction,SelectChildrenAction,SelectSameAction,SendBackwardAction,SendToBackAction,UngroupAction
This abstract class can be extended to implement an
Action that acts
on behalf of the selected figures of a
DrawingView.
By default the disabled state of this action reflects the disabled state of
the active DrawingView. If no drawing view is active, this action 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
ConstructorsConstructorDescriptionCreates an action which acts on the selected figures on the current view of the specified editor. -
Method Summary
Modifier and TypeMethodDescriptionvoidGets the drawing editor.protected @Nullable DrawingViewgetView()Gets the active drawing view of the drawing editor.protected voidonActionPerformed(@NonNull javafx.event.ActionEvent event) protected abstract voidonActionPerformed(@NonNull javafx.event.ActionEvent even, @NonNull DrawingView view) 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
-
undoHelper
-
-
Constructor Details
-
AbstractDrawingViewAction
Creates an action which acts on the selected figures on the current view of the specified editor.- Parameters:
editor- the drawing editor
-
-
Method Details
-
forwardUndoableEdit
-
getEditor
Gets the drawing editor.- Returns:
- the drawing editor
-
getView
Gets the active drawing view of the drawing editor.- Returns:
- the active drawing view. Returns null if the editor is null no drawing view is active.
-
onActionPerformed
- Specified by:
onActionPerformedin classAbstractAction
-
onActionPerformed
protected abstract void onActionPerformed(@NonNull javafx.event.ActionEvent even, @NonNull DrawingView view)
-