Class ScaleControls
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.designable.controls.AbstractSelectionControls
- 
- com.inductiveautomation.ignition.designer.designable.controls.ScaleControls
 
 
- 
- All Implemented Interfaces:
- ISelectionControl,- java.lang.Iterable<IHandle>
 - Direct Known Subclasses:
- LinkControls,- WindowScaleControls
 
 public class ScaleControls extends AbstractSelectionControls Concrete implementation of ISelectionControls that provides the standard stretch/resize handles around a component selection
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classScaleControls.AbstractResizeHandleprotected classScaleControls.AnchorHLA highlight that displays a little cross where the logical resize anchor is placed.protected classScaleControls.EResizeHandleprotected classScaleControls.NEResizeHandleprotected classScaleControls.NResizeHandleprotected classScaleControls.NWResizeHandleprotected classScaleControls.SEResizeHandleprotected classScaleControls.SResizeHandleprotected classScaleControls.SWResizeHandleprotected classScaleControls.WResizeHandle
 - 
Field SummaryFields Modifier and Type Field Description static ShapePaintDEFAULT_HOVER_PAINTstatic ShapePaintDEFAULT_NORMAL_PAINTprotected booleandragging
 - 
Constructor SummaryConstructors Constructor Description ScaleControls()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddragEnd()protected voiddragged(java.awt.geom.Point2D anchor, java.awt.geom.Point2D handle, java.awt.geom.Point2D drag, int modifiers, int side)protected voiddragStart()protected voidinitHandles()voidinitialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection)protected IHandlenewHandle(int side)static java.awt.geom.Rectangle2Dscale(DesignPanel panel, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection, java.awt.geom.Rectangle2D originalRectangle, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalBounds, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> scaledBounds, java.awt.geom.Point2D anchor, java.awt.geom.Point2D handle, java.awt.geom.Point2D drag, int side, boolean restrict, boolean snap, boolean keepAspectRatio)- 
Methods inherited from class com.inductiveautomation.ignition.designer.designable.controls.AbstractSelectionControlsgetBoundingRect, getInsets, iterator, paintBackground, selectionRect, uninstall
 
- 
 
- 
- 
- 
Field Detail- 
draggingprotected boolean dragging 
 - 
DEFAULT_NORMAL_PAINTpublic static final ShapePaint DEFAULT_NORMAL_PAINT 
 - 
DEFAULT_HOVER_PAINTpublic static final ShapePaint DEFAULT_HOVER_PAINT 
 
- 
 - 
Method Detail- 
initializepublic void initialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection) - Specified by:
- initializein interface- ISelectionControl
- Overrides:
- initializein class- AbstractSelectionControls
 
 - 
initHandlesprotected void initHandles() 
 - 
newHandleprotected IHandle newHandle(int side) 
 - 
dragStartprotected void dragStart() 
 - 
dragEndprotected void dragEnd() 
 - 
draggedprotected void dragged(java.awt.geom.Point2D anchor, java.awt.geom.Point2D handle, java.awt.geom.Point2D drag, int modifiers, int side)
 - 
scalepublic static java.awt.geom.Rectangle2D scale(DesignPanel panel, DesignableDelegate delegate, java.util.List<javax.swing.JComponent> selection, java.awt.geom.Rectangle2D originalRectangle, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalBounds, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> scaledBounds, java.awt.geom.Point2D anchor, java.awt.geom.Point2D handle, java.awt.geom.Point2D drag, int side, boolean restrict, boolean snap, boolean keepAspectRatio) - Parameters:
- originalRectangle- The overall bounding rectangle of all selected objects at the beginning of the scale operation. In unzoomed coordinates.
- originalBounds- The original bounds of each selected object, relative to the interaction layer in unzoomed coordinates.
- scaledBounds- A map containing the last set of scaled bounds for each object in unzoomed coordinates. On the first scale of a series, this should be a clone of the originalBounds.
- anchor- The anchor point for the scale - this is the 'fixed point'
- handle- The handle point that the drag point is compared against.
- drag- The point that the current drag is at.
- side- The side code that the anchor resides on.
- restrict- Whether or not to restrict to parent bounds
- snap- Whether or not to consider snapping to grid
- keepAspectRatio- Whether or not to maintain original aspect ratios
 
 
- 
 
-