public class GroupAction extends AbstractSelectedAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
Constructor and Description |
---|
GroupAction(DrawingEditor editor)
Creates a new instance.
|
GroupAction(DrawingEditor editor,
CompositeFigure prototype) |
GroupAction(DrawingEditor editor,
CompositeFigure prototype,
boolean isGroupingAction) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected boolean |
canGroup() |
protected boolean |
canUngroup() |
void |
groupFigures(DrawingView view,
CompositeFigure group,
java.util.Collection<Figure> figures) |
java.util.Collection<Figure> |
ungroupFigures(DrawingView view,
CompositeFigure group) |
protected void |
updateEnabledState()
Updates the enabled state of this action to reflect the enabled state
of the active
DrawingView . |
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState
public static final java.lang.String ID
public GroupAction(DrawingEditor editor)
public GroupAction(DrawingEditor editor, CompositeFigure prototype)
public GroupAction(DrawingEditor editor, CompositeFigure prototype, boolean isGroupingAction)
protected void updateEnabledState()
AbstractSelectedAction
DrawingView
. If no drawing view is active, this
action is disabled.updateEnabledState
in class AbstractSelectedAction
protected boolean canGroup()
protected boolean canUngroup()
public void actionPerformed(java.awt.event.ActionEvent e)
public java.util.Collection<Figure> ungroupFigures(DrawingView view, CompositeFigure group)
public void groupFigures(DrawingView view, CompositeFigure group, java.util.Collection<Figure> figures)