Class JComponentItemDelegate
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.designable.JComponentItemDelegate
 
- 
- All Implemented Interfaces:
- DesignableDelegate
 - Direct Known Subclasses:
- BlockDiagramItemDelegate,- StandaloneDelegate
 
 public abstract class JComponentItemDelegate extends java.lang.Object implements DesignableDelegate An abstract DesignableDelegate that implements many functions using the size/locations provided by JComponent
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classJComponentItemDelegate.ChildIterator
 - 
Field SummaryFields Modifier and Type Field Description protected static java.lang.StringROTATION_CENTER_KEYprotected java.awt.Pointscratchprotected java.awt.geom.AffineTransformtx
 - 
Constructor SummaryConstructors Constructor Description JComponentItemDelegate()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.geom.Rectangle2DconvertRect(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D r)Converts a rectangle from the coordinates of one component to another.protected java.awt.ShapeconvertShape(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.Shape shape)java.util.Iterator<? extends javax.swing.JComponent>findChildren(javax.swing.JComponent container)Returns an iterator that iterates through the children of the given container in decreasing Z-order (highest layer to lowest layer)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.intgetChildCount(javax.swing.JComponent container)Returns the count of the number of items currently held in the given containerjava.lang.StringgetName(javax.swing.JComponent object)Uses the JComponent's namejavax.swing.JComponentgetOffsettingParent(javax.swing.JComponent source)Find the parent component for whose bounds the component is relative to.java.awt.geom.Point2DgetRotationAnchor(javax.swing.JComponent c)Implemented using a client property with key "rotation.center" whose value is expected to be a Point2D.Floatjava.awt.ShapegetShapeBounds(javax.swing.JComponent item, javax.swing.JComponent relativeTo, java.awt.Rectangle rect)Return non-rectangular bounds of the given item relative to the supplied JComponent.protected java.awt.geom.Rectangle2DinitRect(java.awt.geom.Rectangle2D rv, java.awt.geom.Rectangle2D copyFrom)Initializes a return value rectangle rv, or creates a new one if it's null.voidsetRotationAnchor(javax.swing.JComponent object, java.awt.geom.Point2D point)Puts the given point on the JComponent using client property "rotation.center"- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.ignition.designer.designable.DesignableDelegateaddObject, copyMove, findObjectsAt, getParent, isContainer, isLocked, isMovable, isOffsettingParent, isRotateCapable, moveObject, notifyObjectsMoved, notifyObjectsRotated, rotateObject, scaleObject, setZOrderPosition
 
- 
 
- 
- 
- 
Field Detail- 
ROTATION_CENTER_KEYprotected static final java.lang.String ROTATION_CENTER_KEY - See Also:
- Constant Field Values
 
 - 
scratchprotected java.awt.Point scratch 
 - 
txprotected java.awt.geom.AffineTransform tx 
 
- 
 - 
Method Detail- 
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
 
 - 
initRectprotected java.awt.geom.Rectangle2D initRect(java.awt.geom.Rectangle2D rv, java.awt.geom.Rectangle2D copyFrom)Initializes a return value rectangle rv, or creates a new one if it's null. If copyFrom isn't null, then the rect is set to that size.
 - 
getShapeBoundspublic java.awt.Shape getShapeBounds(javax.swing.JComponent item, javax.swing.JComponent relativeTo, java.awt.Rectangle rect)Description copied from interface:DesignableDelegateReturn non-rectangular bounds of the given item relative to the supplied JComponent. If the bounds happen to be rectangular, you may alter the supplied rectangle to avoid instantiating a new shape.- Specified by:
- getShapeBoundsin interface- DesignableDelegate
 
 - 
getOffsettingParentpublic javax.swing.JComponent getOffsettingParent(javax.swing.JComponent source) Find the parent component for whose bounds the component is relative to.- Specified by:
- getOffsettingParentin interface- DesignableDelegate
 
 - 
convertRectprotected java.awt.geom.Rectangle2D convertRect(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D r)Converts a rectangle from the coordinates of one component to another.
 - 
convertShapeprotected java.awt.Shape convertShape(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.Shape shape)
 - 
getRotationAnchorpublic java.awt.geom.Point2D getRotationAnchor(javax.swing.JComponent c) Implemented using a client property with key "rotation.center" whose value is expected to be a Point2D.Float- Specified by:
- getRotationAnchorin interface- DesignableDelegate
 
 - 
setRotationAnchorpublic void setRotationAnchor(javax.swing.JComponent object, java.awt.geom.Point2D point)Puts the given point on the JComponent using client property "rotation.center"- Specified by:
- setRotationAnchorin interface- DesignableDelegate
 
 - 
getNamepublic java.lang.String getName(javax.swing.JComponent object) Uses the JComponent's name- Specified by:
- getNamein interface- DesignableDelegate
 
 - 
findChildrenpublic java.util.Iterator<? extends javax.swing.JComponent> findChildren(javax.swing.JComponent container) Description copied from interface:DesignableDelegateReturns an iterator that iterates through the children of the given container in decreasing Z-order (highest layer to lowest layer)- Specified by:
- findChildrenin interface- DesignableDelegate
 
 - 
getChildCountpublic int getChildCount(javax.swing.JComponent container) Description copied from interface:DesignableDelegateReturns the count of the number of items currently held in the given container- Specified by:
- getChildCountin interface- DesignableDelegate
 
 
- 
 
-