public class ShapeElement extends AbstractTableElement implements TableElement
CLASS| Constructor and Description |
|---|
ShapeElement(java.awt.Shape shape,
java.awt.Color fillColor)
Creates a new shape element.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds)
Draws the shape element within the specified bounds.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
TableElementOnDraw onDrawHandler)
Draws the element within the specified bounds.
|
java.awt.Color |
getFillColor()
Returns the fill color.
|
java.util.List<java.awt.geom.Rectangle2D> |
layoutElements(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Performs a layout of this table element, returning a list of bounding
rectangles for the element and its subelements.
|
java.awt.geom.Dimension2D |
preferredSize(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Returns the preferred size of the element (including insets).
|
void |
receive(TableElementVisitor visitor)
Receives a visitor.
|
void |
setFillColor(java.awt.Color color)
Sets the fill color.
|
java.lang.String |
toString()
Returns a string representation of this element, primarily for
debugging purposes.
|
equals, getBackground, getInsets, getProperty, getRefPoint, getTag, preferredSize, setBackground, setBackgroundColor, setInsets, setProperty, setRefPoint, setTagclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProperty, getRefPoint, preferredSize, setPropertypublic ShapeElement(java.awt.Shape shape, java.awt.Color fillColor)
shape - the shape (null not permitted).fillColor - the fill color (null not permitted).public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color color)
color - the fill color (null not permitted).public java.awt.geom.Dimension2D preferredSize(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
AbstractTableElementpreferredSize in interface TableElementpreferredSize in class AbstractTableElementg2 - the graphics target.bounds - the bounds.constraints - the constraints (ignored for now).public java.util.List<java.awt.geom.Rectangle2D> layoutElements(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
TableElementTableElement.draw(java.awt.Graphics2D,
java.awt.geom.Rectangle2D) method.layoutElements in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).constraints - the constraints (if any).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
draw in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, TableElementOnDraw onDrawHandler)
recordBounds flag is set, this element and each of its
children will have their BOUNDS_2D property updated with
the current bounds.draw in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).onDrawHandler - an object that will receive notification before
and after the element is drawn (null permitted).public void receive(TableElementVisitor visitor)
receive in interface TableElementvisitor - the visitor (null not permitted).public java.lang.String toString()
toString in class java.lang.Object