Class LLChart2D

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public final class LLChart2D extends GraphChart2D
A class for the methods of GraphChart2D charts of the "Labels Left" type. A LLChart2D object is one with it's category descriptor labels along the left (or y) axis. For example, a horizontal bar chart is a LLChart2D type chart. Changes through its set methods are updated upon next repaint() or getImage() calls.
See Also:
  • Constructor Details

    • LLChart2D

      public LLChart2D()
      Creates a LLChart2D object with its defaults.
  • Method Details

    • setPreferredSize

      public final void setPreferredSize(Dimension size)
      Sets a custom preferred size for the chart. This custom size will override the preferred size calculations that normally occurr. If null is passed, the preferred size calculations will be reinstated.
      Specified by:
      setPreferredSize in class Object2D
      Parameters:
      size - The custom preferred size for this chart.
    • getImage

      public final BufferedImage getImage()
      Gets a buffered image of the chart.
      Specified by:
      getImage in class Object2D
      Returns:
      An image of this chart
    • getPreferredSize

      public final Dimension getPreferredSize()
      Gets the preferred size of the chart. The preferred size is within the maximum and minimum sizes of the chart. Much calculation is performed when calling this method.
      Specified by:
      getPreferredSize in class Object2D
      Returns:
      The preferred minimum size of the chart.
    • pack

      public final void pack()
      Causes the object to reinintialize to it's preferred size.
      Specified by:
      pack in class Object2D
    • validate

      public final boolean validate(boolean debug)
      Validates the properties of this object. If debug is true then prints a messages indicating whether each property is valid. Returns true if all the properties were valid and false otherwise.
      Specified by:
      validate in class Object2D
      Parameters:
      debug - If true then will print status messages.
      Returns:
      If true then valid.
    • paintComponent

      public final void paintComponent(Graphics g)
      Paints the chart. This is provided for the layout manager to call.
      Overrides:
      paintComponent in class JComponent
      Parameters:
      g - The graphics context for calculations and painting.