public abstract class JComponentItemDelegate extends java.lang.Object implements DesignableDelegate
Modifier and Type | Class and Description |
---|---|
protected static class |
JComponentItemDelegate.ChildIterator |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ROTATION_CENTER_KEY |
protected java.awt.Point |
scratch |
protected java.awt.geom.AffineTransform |
tx |
Constructor and Description |
---|
JComponentItemDelegate() |
Modifier and Type | Method and Description |
---|---|
protected 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.
|
protected java.awt.Shape |
convertShape(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.Rectangle2D |
getBounds(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.
|
int |
getChildCount(javax.swing.JComponent container)
Returns the count of the number of items currently held in the given container
|
java.lang.String |
getName(javax.swing.JComponent object)
Uses the JComponent's name
|
javax.swing.JComponent |
getOffsettingParent(javax.swing.JComponent source)
Find the parent component for whose bounds the component is relative to.
|
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
|
java.awt.Shape |
getShapeBounds(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.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.
|
void |
setRotationAnchor(javax.swing.JComponent object,
java.awt.geom.Point2D point)
Puts the given point on the JComponent using client property "rotation.center"
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObject, copyMove, findObjectsAt, getParent, isContainer, isLocked, isMovable, isOffsettingParent, isRotateCapable, moveObject, notifyObjectsMoved, notifyObjectsRotated, rotateObject, scaleObject, setZOrderPosition
protected static final java.lang.String ROTATION_CENTER_KEY
protected java.awt.Point scratch
protected java.awt.geom.AffineTransform tx
public java.awt.geom.Rectangle2D getBounds(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D rect)
DesignableDelegate
getBounds
in interface DesignableDelegate
protected java.awt.geom.Rectangle2D initRect(java.awt.geom.Rectangle2D rv, java.awt.geom.Rectangle2D copyFrom)
rv
- copyFrom
- public java.awt.Shape getShapeBounds(javax.swing.JComponent item, javax.swing.JComponent relativeTo, java.awt.Rectangle rect)
DesignableDelegate
getShapeBounds
in interface DesignableDelegate
public javax.swing.JComponent getOffsettingParent(javax.swing.JComponent source)
getOffsettingParent
in interface DesignableDelegate
protected java.awt.geom.Rectangle2D convertRect(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.geom.Rectangle2D r)
protected java.awt.Shape convertShape(javax.swing.JComponent source, javax.swing.JComponent relativeTo, java.awt.Shape shape)
public java.awt.geom.Point2D getRotationAnchor(javax.swing.JComponent c)
getRotationAnchor
in interface DesignableDelegate
public void setRotationAnchor(javax.swing.JComponent object, java.awt.geom.Point2D point)
setRotationAnchor
in interface DesignableDelegate
public java.lang.String getName(javax.swing.JComponent object)
getName
in interface DesignableDelegate
public java.util.Iterator<? extends javax.swing.JComponent> findChildren(javax.swing.JComponent container)
DesignableDelegate
findChildren
in interface DesignableDelegate
public int getChildCount(javax.swing.JComponent container)
DesignableDelegate
getChildCount
in interface DesignableDelegate