Class BlockDiagramItemDelegate
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.designable.JComponentItemDelegate
- 
- com.inductiveautomation.ignition.designer.blockandconnector.BlockDiagramItemDelegate
 
 
- 
- All Implemented Interfaces:
- DesignableDelegate
 
 public class BlockDiagramItemDelegate extends JComponentItemDelegate 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.designable.JComponentItemDelegateJComponentItemDelegate.ChildIterator
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.ignition.designer.designable.JComponentItemDelegateROTATION_CENTER_KEY, scratch, tx
 
- 
 - 
Constructor SummaryConstructors Constructor Description BlockDiagramItemDelegate(AbstractBlockWorkspace workspace)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObject(javax.swing.JComponent parent, javax.swing.JComponent newChild, java.awt.geom.Rectangle2D newBounds)Adds the child into the given parent (which must be a container) at the given bounds, relative to the parent.voidcopyMove(java.util.List<javax.swing.JComponent> objects, double dX, double dY)java.util.List<javax.swing.JComponent>findObjectsAt(DesignableContainer container, java.awt.Point point)Performs a basic "hit-test" to find objects in a container underneath a point.java.awt.geom.Rectangle2DgetBounds(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D rect)Fetch the current bounds of the given item, relative to the supplied JComponent.javax.swing.JComponentgetParent(javax.swing.JComponent child)Finds the given item's parent in the container hierarchybooleanisContainer(javax.swing.JComponent item)Determines whether any given object is a container.booleanisLocked(javax.swing.JComponent item)Returns whether a normally movable object is currently locked or notbooleanisMovable(javax.swing.JComponent item)Defines whether or not an item is inherently movable or not.booleanisOffsettingParent(javax.swing.JComponent container)Tests whether this container is an offsetting parent or notbooleanisRotateCapable(javax.swing.JComponent item)Returns whether or not an item supports being rotated.voidmoveObject(javax.swing.JComponent object, java.awt.geom.Point2D newLocation)Move the given item to the new location.voidnotifyObjectsMoved(java.util.List<javax.swing.JComponent> objects, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalPositions)voidnotifyObjectsRotated(java.util.List<javax.swing.JComponent> objects, double angle, java.awt.geom.Point2D rotationAnchor)voidrotateObject(javax.swing.JComponent object, double angle, java.awt.geom.Point2D rotationAnchor)Rotate the object around the given point by the angle specified.voidscaleObject(javax.swing.JComponent object, java.awt.geom.Rectangle2D newBounds)Scale the given item to the new bounds.voidsetZOrderPosition(javax.swing.JComponent item, int position)- 
Methods inherited from class com.inductiveautomation.ignition.designer.designable.JComponentItemDelegateconvertRect, convertShape, findChildren, getChildCount, getName, getOffsettingParent, getRotationAnchor, getShapeBounds, initRect, setRotationAnchor
 
- 
 
- 
- 
- 
Constructor Detail- 
BlockDiagramItemDelegatepublic BlockDiagramItemDelegate(AbstractBlockWorkspace workspace) 
 
- 
 - 
Method Detail- 
isOffsettingParentpublic boolean isOffsettingParent(javax.swing.JComponent container) Description copied from interface:DesignableDelegateTests whether this container is an offsetting parent or not
 - 
isMovablepublic boolean isMovable(javax.swing.JComponent item) Description copied from interface:DesignableDelegateDefines whether or not an item is inherently movable or not. Note that a normally movable object that is currently "locked" would still return true for this function.
 - 
isLockedpublic boolean isLocked(javax.swing.JComponent item) Description copied from interface:DesignableDelegateReturns whether a normally movable object is currently locked or not
 - 
isRotateCapablepublic boolean isRotateCapable(javax.swing.JComponent item) Description copied from interface:DesignableDelegateReturns whether or not an item supports being rotated.
 - 
isContainerpublic boolean isContainer(javax.swing.JComponent item) Description copied from interface:DesignableDelegateDetermines whether any given object is a container. That is - whether it contains other selectable objects inside itself.- Parameters:
- item- The item to test
- Returns:
- true if item is a container.
 
 - 
findObjectsAtpublic java.util.List<javax.swing.JComponent> findObjectsAt(DesignableContainer container, java.awt.Point point) Description copied from interface:DesignableDelegatePerforms a basic "hit-test" to find objects in a container underneath a point.- point- The point in question, relative to the DesignableContainer
 
 - 
getParentpublic javax.swing.JComponent getParent(javax.swing.JComponent child) Description copied from interface:DesignableDelegateFinds the given item's parent in the container hierarchy
 - 
scaleObjectpublic void scaleObject(javax.swing.JComponent object, java.awt.geom.Rectangle2D newBounds)Description copied from interface:DesignableDelegateScale the given item to the new bounds. Bounds location is relative to its parent. This is used for realtime, transient scales, so it shouldn't add an undo action.
 - 
rotateObjectpublic void rotateObject(javax.swing.JComponent object, double angle, java.awt.geom.Point2D rotationAnchor)Description copied from interface:DesignableDelegateRotate the object around the given point by the angle specified.- Parameters:
- object- The object to rotate.
- angle- The angle to rotate, specified in radians.
- rotationAnchor- The rotation center, relative to the object's parent.
 
 - 
setZOrderPositionpublic void setZOrderPosition(javax.swing.JComponent item, int position)
 - 
getBoundspublic java.awt.geom.Rectangle2D getBounds(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D rect)Description copied from interface:DesignableDelegateFetch the current bounds of the given item, relative to the supplied JComponent. If the rect argument is null, a new Rectangle should be instantiated and returned. Otherwise, rect should be modified and returned to avoid unnecessary Rectangle instantiation, because this function is called very frequently.- Specified by:
- getBoundsin interface- DesignableDelegate
- Overrides:
- getBoundsin class- JComponentItemDelegate
 
 - 
moveObjectpublic void moveObject(javax.swing.JComponent object, java.awt.geom.Point2D newLocation)Description copied from interface:DesignableDelegateMove the given item to the new location. Location is relative to its parent. This is used for realtime, transient moves, so it shouldn't add an undo action.
 - 
notifyObjectsMovedpublic void notifyObjectsMoved(java.util.List<javax.swing.JComponent> objects, java.util.Map<javax.swing.JComponent,java.awt.geom.Rectangle2D> originalPositions)
 - 
notifyObjectsRotatedpublic void notifyObjectsRotated(java.util.List<javax.swing.JComponent> objects, double angle, java.awt.geom.Point2D rotationAnchor)
 - 
copyMovepublic void copyMove(java.util.List<javax.swing.JComponent> objects, double dX, double dY)
 - 
addObjectpublic void addObject(javax.swing.JComponent parent, javax.swing.JComponent newChild, java.awt.geom.Rectangle2D newBounds)Description copied from interface:DesignableDelegateAdds the child into the given parent (which must be a container) at the given bounds, relative to the parent. If the bounds rectangle is null, then the component is assumed to already have it's location set on it.
 
- 
 
-