java.lang.Object
org.jfree.chart3d.table.AbstractTableElement
org.jfree.chart3d.table.ShapeElement
- All Implemented Interfaces:
Serializable,TableElement
A table element that displays a shape.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.table.TableElement
CLASS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g2, Rectangle2D bounds) Draws the shape element within the specified bounds.voiddraw(Graphics2D g2, Rectangle2D bounds, TableElementOnDraw onDrawHandler) Draws the element within the specified bounds.Returns the fill color.layoutElements(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Performs a layout of this table element, returning a list of bounding rectangles for the element and its subelements.preferredSize(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Returns the preferred size of the element (including insets).voidreceive(TableElementVisitor visitor) Receives a visitor.voidsetFillColor(Color color) Sets the fill color.toString()Returns a string representation of this element, primarily for debugging purposes.Methods inherited from class org.jfree.chart3d.table.AbstractTableElement
equals, getBackground, getInsets, getProperty, getRefPoint, getTag, preferredSize, setBackground, setBackgroundColor, setInsets, setProperty, setRefPoint, setTagMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jfree.chart3d.table.TableElement
getProperty, getRefPoint, preferredSize, setProperty
-
Constructor Details
-
ShapeElement
Creates a new shape element.- Parameters:
shape- the shape (nullnot permitted).fillColor- the fill color (nullnot permitted).
-
-
Method Details
-
getFillColor
Returns the fill color.- Returns:
- The fill color.
- Since:
- 1.2
-
setFillColor
Sets the fill color.- Parameters:
color- the fill color (nullnot permitted).- Since:
- 1.2
-
preferredSize
Description copied from class:AbstractTableElementReturns the preferred size of the element (including insets).- Specified by:
preferredSizein interfaceTableElement- Specified by:
preferredSizein classAbstractTableElement- Parameters:
g2- the graphics target.bounds- the bounds.constraints- the constraints (ignored for now).- Returns:
- The preferred size.
-
layoutElements
public List<Rectangle2D> layoutElements(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Description copied from interface:TableElementPerforms a layout of this table element, returning a list of bounding rectangles for the element and its subelements. This method is typically called by theTableElement.draw(java.awt.Graphics2D, java.awt.geom.Rectangle2D)method.- Specified by:
layoutElementsin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).constraints- the constraints (if any).- Returns:
- A list of bounding rectangles.
-
draw
Draws the shape element within the specified bounds.- Specified by:
drawin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).
-
draw
Draws the element within the specified bounds. If therecordBoundsflag is set, this element and each of its children will have theirBOUNDS_2Dproperty updated with the current bounds.- Specified by:
drawin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).onDrawHandler- an object that will receive notification before and after the element is drawn (nullpermitted).- Since:
- 1.3
-
receive
Receives a visitor.- Specified by:
receivein interfaceTableElement- Parameters:
visitor- the visitor (nullnot permitted).- Since:
- 1.2
-
toString
Returns a string representation of this element, primarily for debugging purposes.
-