Class ScaleControls
java.lang.Object
com.inductiveautomation.ignition.designer.designable.controls.AbstractSelectionControls
com.inductiveautomation.ignition.designer.designable.controls.ScaleControls
- All Implemented Interfaces:
- ISelectionControl,- Iterable<IHandle>
- Direct Known Subclasses:
- LinkControls,- WindowScaleControls
Concrete implementation of ISelectionControls that provides the standard stretch/resize handles around a component
 selection
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classprotected classA highlight that displays a little cross where the logical resize anchor is placed.protected classprotected classprotected classprotected classprotected classprotected classprotected classprotected class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ShapePaintstatic final ShapePaintprotected boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddragEnd()protected voidprotected voidprotected voidvoidinitialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, List<JComponent> selection) protected IHandlenewHandle(int side) static Rectangle2Dscale(DesignPanel panel, DesignableDelegate delegate, List<JComponent> selection, Rectangle2D originalRectangle, Map<JComponent, Rectangle2D> originalBounds, Map<JComponent, Rectangle2D> scaledBounds, Point2D anchor, Point2D handle, 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, uninstallMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
draggingprotected boolean dragging
- 
DEFAULT_NORMAL_PAINT
- 
DEFAULT_HOVER_PAINT
 
- 
- 
Constructor Details- 
ScaleControlspublic ScaleControls()
 
- 
- 
Method Details- 
initializepublic void initialize(DesignPanel panel, DesignableContainer container, DesignableDelegate delegate, List<JComponent> selection) - Specified by:
- initializein interface- ISelectionControl
- Overrides:
- initializein class- AbstractSelectionControls
 
- 
initHandlesprotected void initHandles()
- 
newHandle
- 
dragStartprotected void dragStart()
- 
dragEndprotected void dragEnd()
- 
dragged
- 
scalepublic static Rectangle2D scale(DesignPanel panel, DesignableDelegate delegate, List<JComponent> selection, Rectangle2D originalRectangle, Map<JComponent, Rectangle2D> originalBounds, Map<JComponent, Rectangle2D> scaledBounds, Point2D anchor, Point2D handle, 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
 
 
-