Interface Bounds2DComponent
-
- All Known Implementing Classes:
AbstractVisionShape,PathBasedVisionShape,ShapeGroup
public interface Bounds2DComponentAn interface that marks a component that wants to handle its own bounding box, rather than use the bounding box from Swing/JComponent. Components that implement this interface will always have their swing bounds be the same size as their parent, but then their Bounds2D property will be used to control their size instead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBoundingRect()Calculate the component's size, creating a new rectangle instance and returning it.java.awt.geom.Rectangle2DgetBoundingRect(java.awt.geom.Rectangle2D rv)Calculates the smallest rectangle that encloses the component.java.awt.geom.Rectangle2DgetOriginalBounds()voidsetBoundingRect(java.awt.geom.Rectangle2D rect)Change the size of this component.voidsetOriginalBounds(java.awt.geom.Rectangle2D rect)
-
-
-
Method Detail
-
getBoundingRect
java.awt.geom.Rectangle2D getBoundingRect()
Calculate the component's size, creating a new rectangle instance and returning it.
-
getBoundingRect
java.awt.geom.Rectangle2D getBoundingRect(java.awt.geom.Rectangle2D rv)
Calculates the smallest rectangle that encloses the component.- Parameters:
rv- The "return value" rectangle. May be null, in which case a new rectangle will be returned.- Returns:
- A rectangle (rv if it was not null) containing the current bounds, relative to the shape's nearest non-group parent.
-
setBoundingRect
void setBoundingRect(java.awt.geom.Rectangle2D rect)
Change the size of this component.
-
getOriginalBounds
java.awt.geom.Rectangle2D getOriginalBounds()
-
setOriginalBounds
void setOriginalBounds(java.awt.geom.Rectangle2D rect)
-
-