Class ColumnChart


  • public class ColumnChart
    extends Chart
    A vertical column chart.
    • Field Detail

      • columns

        protected Vector columns
        Vector of columns rectangles
      • perspectiveH

        public int perspectiveH
        Perspective horizontal distance.
      • perspectiveV

        public int perspectiveV
        Perspective vertical distance.
    • Constructor Detail

      • ColumnChart

        public ColumnChart​(java.lang.String[] categories)
        Creates a new 2D column chart
        Parameters:
        categories - The categories that will be used
      • ColumnChart

        public ColumnChart​(java.lang.String[] categories,
                           java.lang.Boolean showTextBox)
      • ColumnChart

        public ColumnChart​(int type,
                           java.lang.String[] categories)
        Creates a new column chart
        Parameters:
        type - the chart's type (2D or 3D)
        categories - The categories that will be used
        See Also:
        Chart.type
    • Method Detail

      • onPaint

        public void onPaint​(Graphics g)
        Description copied from class: Control
        Called to draw the control. When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted.
        Overrides:
        onPaint in class Control
        Parameters:
        g - the graphics object for drawing
        See Also:
        Graphics
      • onEvent

        public void onEvent​(Event e)
        Description copied from class: Control
        Called to process key, pen, control and other posted events.
        Overrides:
        onEvent in class Control
        Parameters:
        e - the event to process
        See Also:
        Event, KeyEvent, PenEvent