Class AbstractTableElement

java.lang.Object
org.jfree.chart3d.table.AbstractTableElement
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ColorScaleElement, FlowElement, GridElement, ShapeElement, TextElement, VerticalFlowElement

public abstract class AbstractTableElement extends Object implements Serializable
A base class that can be used to implement a 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 Details

  • Method Details

    • getRefPoint

      public RefPt2D getRefPoint()
      Returns the anchor point used to align the element with the bounding rectangle within which it is drawn. The default value is RefPt2D.CENTER.
      Returns:
      The anchor point (never null).
      Since:
      1.1
    • setRefPoint

      public void setRefPoint(RefPt2D refPt)
      Sets the reference point.
      Parameters:
      refPt - the reference point (null not permitted).
      Since:
      1.1
    • getInsets

      public Insets getInsets()
      Returns the insets. The default value is Insets(2, 2, 2, 2).
      Returns:
      The insets (never null).
    • setInsets

      public void setInsets(Insets insets)
      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

      public void setBackground(RectanglePainter background)
      Sets the background for the element.
      Parameters:
      background - the new background (null permitted).
    • setBackgroundColor

      public void setBackgroundColor(Color color)
      Sets the background painter to fill the element with the specified color. If the color is null, the background painter will be set to null.
      Parameters:
      color - the color (null permitted).
      Since:
      1.2
    • getTag

      public String getTag()
      Returns the tag for this element. The default value is an empty string.
      Returns:
      The tag (never null).
      Since:
      1.2
    • setTag

      public void setTag(String tag)
      Sets the tag.
      Parameters:
      tag - the tag (null not permitted).
      Since:
      1.2
    • getProperty

      public Object getProperty(String key)
      Returns the value of the property with the specified key, or null.
      Parameters:
      key - the key (null not permitted).
      Returns:
      The property value or null.
      Since:
      1.3
    • setProperty

      public void setProperty(String key, Object value)
      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

      public boolean equals(Object obj)
      Tests this instance for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.