Class AbstractSelectionControls
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.designable.controls.AbstractSelectionControls
-
- All Implemented Interfaces:
ISelectionControl
,java.lang.Iterable<IHandle>
- Direct Known Subclasses:
AbstractShapeTool.AbstractShapeControls
,RotationControls
,ScaleControls
public abstract class AbstractSelectionControls extends java.lang.Object implements ISelectionControl
-
-
Field Summary
Fields Modifier and Type Field Description protected DesignableContainer
container
protected DesignableDelegate
delegate
protected java.util.List<IHandle>
handles
protected java.awt.Insets
insets
protected DesignPanel
panel
protected java.util.List<javax.swing.JComponent>
selection
-
Constructor Summary
Constructors Constructor Description AbstractSelectionControls()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.awt.geom.Rectangle2D
getBoundingRect(DesignPanel panel, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> objects, java.awt.geom.Rectangle2D rect)
Calculates a rectangle that is the smallest rectangle that encloses object's bounds, in logical (unzoomed) space.java.awt.Insets
getInsets()
These insets describe the area around the selection control in which its painting and handles are allowed to draw themselves.void
initialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection)
java.util.Iterator<IHandle>
iterator()
void
paintBackground(java.awt.Graphics2D g)
A chance to paint the background of the selection area before the IHandles are paintedprotected java.awt.geom.Rectangle2D
selectionRect()
Calculates a rectangle that is the smallest rectangle that encloses all selected object's bounds.void
uninstall()
-
-
-
Field Detail
-
panel
protected DesignPanel panel
-
container
protected DesignableContainer container
-
delegate
protected DesignableDelegate delegate
-
selection
protected java.util.List<javax.swing.JComponent> selection
-
insets
protected java.awt.Insets insets
-
handles
protected java.util.List<IHandle> handles
-
-
Method Detail
-
initialize
public void initialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection)
- Specified by:
initialize
in interfaceISelectionControl
-
uninstall
public void uninstall()
- Specified by:
uninstall
in interfaceISelectionControl
-
selectionRect
protected java.awt.geom.Rectangle2D selectionRect()
Calculates a rectangle that is the smallest rectangle that encloses all selected object's bounds. Rectangle is in logical (unzoomed) coordinates.
-
getBoundingRect
public static java.awt.geom.Rectangle2D getBoundingRect(DesignPanel panel, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> objects, java.awt.geom.Rectangle2D rect)
Calculates a rectangle that is the smallest rectangle that encloses object's bounds, in logical (unzoomed) space.
-
iterator
public java.util.Iterator<IHandle> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<IHandle>
-
getInsets
public java.awt.Insets getInsets()
Description copied from interface:ISelectionControl
These insets describe the area around the selection control in which its painting and handles are allowed to draw themselves. Should be in un-zoomed (logical) space.- Specified by:
getInsets
in interfaceISelectionControl
-
paintBackground
public void paintBackground(java.awt.Graphics2D g)
Description copied from interface:ISelectionControl
A chance to paint the background of the selection area before the IHandles are painted- Specified by:
paintBackground
in interfaceISelectionControl
-
-