jsynoptic.base
Interface SelectionContextualActionProvider
- All Superinterfaces:
- ContextualActionProvider
- All Known Implementing Classes:
- Abstract1DShape, Abstract2DShape, ConnectionShape, EllipseShape, HistoryShape.HookedTextShape, ImageShape, Java3dShape, LinesShape, Plot, PolygonShape, RectangleShape, SvgShape, TextShape, TimePlot, TimePlot
public interface SelectionContextualActionProvider
- extends ContextualActionProvider
Implementing objects can provide actions on the current shape selection
- Author:
- zxpletran007
Method Summary |
boolean |
doCollectiveAction(DiagramSelection sel,
double x,
double y,
java.lang.Object o,
java.lang.String action,
javax.swing.undo.CompoundEdit undoableEdit)
Do one of the collective actions previously declared by getCollectiveActions. |
java.util.LinkedHashMap |
getCollectiveActions(DiagramSelection sel,
double x,
double y,
java.lang.Object o,
int context)
Return list of possible collective actions |
getCollectiveActions
java.util.LinkedHashMap getCollectiveActions(DiagramSelection sel,
double x,
double y,
java.lang.Object o,
int context)
- Return list of possible collective actions
- Parameters:
sel
- the current selectionx
- Coordinate, mouse position in the same unit as contains(x,y)y
- Coordinate, mouse position in the same unit as contains(x,y)o
- Object the collective actions should work on. Possibly null => default or all actionscontext
- one of the context defined in the ContextualActionProvider class
- Returns:
- The list of possible actions, possibly empty.The map values contains when applicable parent sub menus and icons
doCollectiveAction
boolean doCollectiveAction(DiagramSelection sel,
double x,
double y,
java.lang.Object o,
java.lang.String action,
javax.swing.undo.CompoundEdit undoableEdit)
- Do one of the collective actions previously declared by getCollectiveActions.
- Parameters:
sel
- sel the current selectionx
- Coordinate, for example mouse positiony
- Coordinate, for example mouse positiono
- Object the action should work on.action
- action An action returned by a previous getCollectiveActions call with the same x, y, o parametersundoableEdit
- undoableEdit The current compound edit for undo/redo operation.
If the action is undoable, the required edits shall be added to this current compound edit.
- Returns:
- true if the collectiveaction could be performed