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 DesignableContainercontainerprotected DesignableDelegatedelegateprotected java.util.List<IHandle>handlesprotected java.awt.Insetsinsetsprotected DesignPanelpanelprotected 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.Rectangle2DgetBoundingRect(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.InsetsgetInsets()These insets describe the area around the selection control in which its painting and handles are allowed to draw themselves.voidinitialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection)java.util.Iterator<IHandle>iterator()voidpaintBackground(java.awt.Graphics2D g)A chance to paint the background of the selection area before the IHandles are paintedprotected java.awt.geom.Rectangle2DselectionRect()Calculates a rectangle that is the smallest rectangle that encloses all selected object's bounds.voiduninstall()
-
-
-
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:
initializein interfaceISelectionControl
-
uninstall
public void uninstall()
- Specified by:
uninstallin 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:
iteratorin interfacejava.lang.Iterable<IHandle>
-
getInsets
public java.awt.Insets getInsets()
Description copied from interface:ISelectionControlThese 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:
getInsetsin interfaceISelectionControl
-
paintBackground
public void paintBackground(java.awt.Graphics2D g)
Description copied from interface:ISelectionControlA chance to paint the background of the selection area before the IHandles are painted- Specified by:
paintBackgroundin interfaceISelectionControl
-
-