Class AbstractLayoutTool
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
-
- com.inductiveautomation.ignition.designer.designable.tools.AbstractLayoutTool
-
- All Implemented Interfaces:
IDesignTool
- Direct Known Subclasses:
SelectionTool
public abstract class AbstractLayoutTool extends AbstractDesignTool
This tool defines and installs a number of visual layout related actions. Things like nudging, z-order positioning, and alignment are implemented here.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractLayoutTool.AbstractAlignmentAction
protected class
AbstractLayoutTool.AbstractNudgeAction
protected class
AbstractLayoutTool.AbstractZOrderAction
protected class
AbstractLayoutTool.AlignEdge
protected class
AbstractLayoutTool.CenterAction
protected class
AbstractLayoutTool.MoveNudgeAction
protected class
AbstractLayoutTool.MoveToTopOrBottomAction
protected class
AbstractLayoutTool.MoveUpOrDownAction
protected class
AbstractLayoutTool.Rotate90Action
protected class
AbstractLayoutTool.RowStackAction
protected class
AbstractLayoutTool.ScaleNudgeAction
static class
AbstractLayoutTool.ZOrderChangeUndoAction
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.designer.designable.IDesignTool
IDesignTool.ToolbarInitializer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALIGN_AS_ROW
static java.lang.String
ALIGN_AS_ROW_NORMALIZE
static java.lang.String
ALIGN_AS_STACK
static java.lang.String
ALIGN_AS_STACK_NORMALIZE
static java.lang.String
ALIGN_BOTTOM
static java.lang.String
ALIGN_CENTER_HORIZONTAL
static java.lang.String
ALIGN_CENTER_VERTICAL
static java.lang.String
ALIGN_CENTERSH
static java.lang.String
ALIGN_CENTERSV
static java.lang.String
ALIGN_LEFT
static java.lang.String
ALIGN_RIGHT
static java.lang.String
ALIGN_TOP
static java.lang.String
MOVE_BACKWARD
static java.lang.String
MOVE_FORWARD
static java.lang.String
MOVE_TO_BACK
static java.lang.String
MOVE_TO_FRONT
static java.lang.String
ROTATE_LEFT
static java.lang.String
ROTATE_RIGHT
-
Fields inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
actionMap, changeSupport, designable, HANDLES_PROPERTY, inputMap, interactionLayer, panel, workspace
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLayoutTool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
componentsAreSiblings(DesignableDelegate delegate, java.util.List<javax.swing.JComponent> items)
Checks to see if all of the components are siblings (have the same .getParent()) and that there is at least 1 component in the liststatic java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D>
convertBoundsToParent(java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalBounds, javax.swing.JComponent interactionLayer, DesignableDelegate delegate)
Converts the rectangles so that their bounds are relative to each object's parent.protected void
evaluateEnabled(java.util.List<javax.swing.JComponent> newSelection)
void
install(DesignPanel panel)
Installs the tool for the given panel.static void
removeDescendents(DesignableDelegate delegate, java.util.List<javax.swing.JComponent> items)
Removes items in the list whose ancestors are also in the list.-
Methods inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
addAction, addKeyBinding, addKeyBinding, addPropertyChangeListener, createCursor, findDropContainer, getAction, getCursor, getDragHighlight, getOffsettingBounds, getOriginalBounds, getStatusBarText, getToolbarInitializer, isInstalled, isRelevantFor, itemMovable, movable, newSelectionControl, newToolbarSpinner, newToolbarSpinner, newToolbarSpinner, onClick, onClickAlterSelection, onDoubleClick, onDrag, onDragEnd, onDragStart, onKeyEvent, onMove, onPopupTrigger, onPress, onRelease, onRightClickSwitchToSelectionTool, removePropertyChangeListener, uninstall
-
-
-
-
Field Detail
-
MOVE_FORWARD
public static final java.lang.String MOVE_FORWARD
- See Also:
- Constant Field Values
-
MOVE_BACKWARD
public static final java.lang.String MOVE_BACKWARD
- See Also:
- Constant Field Values
-
MOVE_TO_FRONT
public static final java.lang.String MOVE_TO_FRONT
- See Also:
- Constant Field Values
-
MOVE_TO_BACK
public static final java.lang.String MOVE_TO_BACK
- See Also:
- Constant Field Values
-
ROTATE_RIGHT
public static final java.lang.String ROTATE_RIGHT
- See Also:
- Constant Field Values
-
ROTATE_LEFT
public static final java.lang.String ROTATE_LEFT
- See Also:
- Constant Field Values
-
ALIGN_TOP
public static final java.lang.String ALIGN_TOP
- See Also:
- Constant Field Values
-
ALIGN_LEFT
public static final java.lang.String ALIGN_LEFT
- See Also:
- Constant Field Values
-
ALIGN_BOTTOM
public static final java.lang.String ALIGN_BOTTOM
- See Also:
- Constant Field Values
-
ALIGN_RIGHT
public static final java.lang.String ALIGN_RIGHT
- See Also:
- Constant Field Values
-
ALIGN_CENTERSH
public static final java.lang.String ALIGN_CENTERSH
- See Also:
- Constant Field Values
-
ALIGN_CENTERSV
public static final java.lang.String ALIGN_CENTERSV
- See Also:
- Constant Field Values
-
ALIGN_CENTER_VERTICAL
public static final java.lang.String ALIGN_CENTER_VERTICAL
- See Also:
- Constant Field Values
-
ALIGN_CENTER_HORIZONTAL
public static final java.lang.String ALIGN_CENTER_HORIZONTAL
- See Also:
- Constant Field Values
-
ALIGN_AS_ROW
public static final java.lang.String ALIGN_AS_ROW
- See Also:
- Constant Field Values
-
ALIGN_AS_ROW_NORMALIZE
public static final java.lang.String ALIGN_AS_ROW_NORMALIZE
- See Also:
- Constant Field Values
-
ALIGN_AS_STACK
public static final java.lang.String ALIGN_AS_STACK
- See Also:
- Constant Field Values
-
ALIGN_AS_STACK_NORMALIZE
public static final java.lang.String ALIGN_AS_STACK_NORMALIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
install
public void install(DesignPanel panel)
Description copied from interface:IDesignTool
Installs the tool for the given panel. Tools are built to be re-used by repeatedly being installed and then uninstalled as tools get switched out.- Specified by:
install
in interfaceIDesignTool
- Overrides:
install
in classAbstractDesignTool
-
evaluateEnabled
protected void evaluateEnabled(java.util.List<javax.swing.JComponent> newSelection)
-
removeDescendents
public static void removeDescendents(DesignableDelegate delegate, java.util.List<javax.swing.JComponent> items)
Removes items in the list whose ancestors are also in the list.
-
componentsAreSiblings
public static boolean componentsAreSiblings(DesignableDelegate delegate, java.util.List<javax.swing.JComponent> items)
Checks to see if all of the components are siblings (have the same .getParent()) and that there is at least 1 component in the list
-
convertBoundsToParent
public static java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> convertBoundsToParent(java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalBounds, javax.swing.JComponent interactionLayer, DesignableDelegate delegate)
Converts the rectangles so that their bounds are relative to each object's parent. It is assumed that the rectangles are currently relative to the interaction layer.
-
-