java.lang.Object
org.jfree.chart3d.table.AbstractTableElement
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ColorScaleElement
,FlowElement
,GridElement
,ShapeElement
,TextElement
,VerticalFlowElement
A base class that can be used to implement a
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.
TableElement
.
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this instance for equality with an arbitrary object.Returns the background painter for the element.Returns the insets.getProperty
(String key) Returns the value of the property with the specified key, ornull
.Returns the anchor point used to align the element with the bounding rectangle within which it is drawn.getTag()
Returns the tag for this element.preferredSize
(Graphics2D g2, Rectangle2D bounds) Returns the preferred size of the element (including insets).abstract Dimension2D
preferredSize
(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Returns the preferred size of the element (including insets).void
setBackground
(RectanglePainter background) Sets the background for the element.void
setBackgroundColor
(Color color) Sets the background painter to fill the element with the specified color.void
Sets the insets.void
setProperty
(String key, Object value) Sets the value of the property with the specified key.void
setRefPoint
(RefPt2D refPt) Sets the reference point.void
Sets the tag.
-
Constructor Details
-
AbstractTableElement
public AbstractTableElement()Creates a new instance.
-
-
Method Details
-
getRefPoint
Returns the anchor point used to align the element with the bounding rectangle within which it is drawn. The default value isRefPt2D.CENTER
.- Returns:
- The anchor point (never
null
). - Since:
- 1.1
-
setRefPoint
Sets the reference point.- Parameters:
refPt
- the reference point (null
not permitted).- Since:
- 1.1
-
getInsets
Returns the insets. The default value isInsets(2, 2, 2, 2)
.- Returns:
- The insets (never
null
).
-
setInsets
Sets the insets.- Parameters:
insets
- the insets (null
not permitted).
-
getBackground
Returns the background painter for the element.- Returns:
- The background painter (possibly
null
).
-
setBackground
Sets the background for the element.- Parameters:
background
- the new background (null
permitted).
-
setBackgroundColor
Sets the background painter to fill the element with the specified color. If the color isnull
, the background painter will be set tonull
.- Parameters:
color
- the color (null
permitted).- Since:
- 1.2
-
getTag
Returns the tag for this element. The default value is an empty string.- Returns:
- The tag (never
null
). - Since:
- 1.2
-
setTag
Sets the tag.- Parameters:
tag
- the tag (null
not permitted).- Since:
- 1.2
-
getProperty
Returns the value of the property with the specified key, ornull
.- Parameters:
key
- the key (null
not permitted).- Returns:
- The property value or
null
. - Since:
- 1.3
-
setProperty
Sets the value of the property with the specified key.- Parameters:
key
- the key (null
not permitted).value
- the value (null
permitted).- Since:
- 1.3
-
preferredSize
Returns the preferred size of the element (including insets).- Parameters:
g2
- the graphics target.bounds
- the bounds.- Returns:
- The preferred size.
-
preferredSize
public abstract Dimension2D preferredSize(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Returns the preferred size of the element (including insets).- Parameters:
g2
- the graphics target.bounds
- the bounds.constraints
- the constraints (ignored for now).- Returns:
- The preferred size.
-
equals
Tests this instance for equality with an arbitrary object.
-