Class BlockBorder

java.lang.Object
org.jfree.chart.block.BlockBorder
All Implemented Interfaces:
Serializable, BlockFrame

public class BlockBorder extends Object implements BlockFrame, Serializable
A border for a block. This class is immutable.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.jfree.ui.RectangleInsets
    The space reserved for the border.
    static final BlockBorder
    An empty border.
    private Paint
    The border color.
    private static final long
    For serialization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a default border.
    BlockBorder(double top, double left, double bottom, double right)
    Creates a new border with the specified line widths (in black).
    BlockBorder(double top, double left, double bottom, double right, Paint paint)
    Creates a new border with the specified line widths (in black).
    Creates a new border with the specified color.
    BlockBorder(org.jfree.ui.RectangleInsets insets, Paint paint)
    Creates a new border.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Draws the border by filling in the reserved space.
    boolean
    Tests this border for equality with an arbitrary instance.
    org.jfree.ui.RectangleInsets
    Returns the space reserved for the border.
    Returns the paint used to draw the border.
    private void
    Provides serialization support.
    private void
    Provides serialization support.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • NONE

      public static final BlockBorder NONE
      An empty border.
    • insets

      private org.jfree.ui.RectangleInsets insets
      The space reserved for the border.
    • paint

      private transient Paint paint
      The border color.
  • Constructor Details

    • BlockBorder

      public BlockBorder()
      Creates a default border.
    • BlockBorder

      public BlockBorder(Paint paint)
      Creates a new border with the specified color.
      Parameters:
      paint - the color (null not permitted).
    • BlockBorder

      public BlockBorder(double top, double left, double bottom, double right)
      Creates a new border with the specified line widths (in black).
      Parameters:
      top - the width of the top border.
      left - the width of the left border.
      bottom - the width of the bottom border.
      right - the width of the right border.
    • BlockBorder

      public BlockBorder(double top, double left, double bottom, double right, Paint paint)
      Creates a new border with the specified line widths (in black).
      Parameters:
      top - the width of the top border.
      left - the width of the left border.
      bottom - the width of the bottom border.
      right - the width of the right border.
      paint - the border paint (null not permitted).
    • BlockBorder

      public BlockBorder(org.jfree.ui.RectangleInsets insets, Paint paint)
      Creates a new border.
      Parameters:
      insets - the border insets (null not permitted).
      paint - the paint (null not permitted).
  • Method Details

    • getInsets

      public org.jfree.ui.RectangleInsets getInsets()
      Returns the space reserved for the border.
      Specified by:
      getInsets in interface BlockFrame
      Returns:
      The space (never null).
    • getPaint

      public Paint getPaint()
      Returns the paint used to draw the border.
      Returns:
      The paint (never null).
    • draw

      public void draw(Graphics2D g2, Rectangle2D area)
      Draws the border by filling in the reserved space.
      Specified by:
      draw in interface BlockFrame
      Parameters:
      g2 - the graphics device.
      area - the area.
    • equals

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

      private void writeObject(ObjectOutputStream stream) throws IOException
      Provides serialization support.
      Parameters:
      stream - the output stream.
      Throws:
      IOException - if there is an I/O error.
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Provides serialization support.
      Parameters:
      stream - the input stream.
      Throws:
      IOException - if there is an I/O error.
      ClassNotFoundException - if there is a classpath problem.