Class AxisGraph

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AxisGraph extends JPanel
Axis graph is used by StatGraphVisualizer, which generates bar graphs from the statistical data.
See Also:
  • Field Details

    • data

      protected double[][] data
    • title

      protected String title
    • xAxisTitle

      protected String xAxisTitle
    • yAxisTitle

      protected String yAxisTitle
    • yAxisLabel

      protected String yAxisLabel
    • maxLength

      protected int maxLength
    • xAxisLabels

      protected String[] xAxisLabels
    • width

      protected int width
    • height

      protected int height
    • legendLabels

      protected String[] legendLabels
    • maxYAxisScale

      protected int maxYAxisScale
    • titleFont

      protected Font titleFont
    • legendFont

      protected Font legendFont
    • valueFont

      protected Font valueFont
    • color

      protected Color[] color
    • foreColor

      protected Color foreColor
    • outlinesBarFlag

      protected boolean outlinesBarFlag
    • showGrouping

      protected boolean showGrouping
    • valueOrientation

      protected boolean valueOrientation
    • legendPlacement

      protected int legendPlacement
  • Constructor Details

    • AxisGraph

      public AxisGraph()
    • AxisGraph

      public AxisGraph(LayoutManager layout)
      Parameters:
      layout - The LayoutManager to use
    • AxisGraph

      public AxisGraph(LayoutManager layout, boolean isDoubleBuffered)
      Parameters:
      layout - The LayoutManager to use
      isDoubleBuffered - Flag whether double buffering should be used
  • Method Details

    • setData

      public void setData(double[][] data)
      Expects null array when no data not empty array
      Parameters:
      data - The data to be drawn
    • setTitle

      public void setTitle(String title)
    • setMaxLength

      public void setMaxLength(int maxLength)
    • setXAxisTitle

      public void setXAxisTitle(String title)
    • setYAxisTitle

      public void setYAxisTitle(String title)
    • setXAxisLabels

      public void setXAxisLabels(String[] labels)
      Expects null array when no labels not empty array
      Parameters:
      labels - The labels for the x axis
    • setYAxisLabels

      public void setYAxisLabels(String label)
    • setLegendLabels

      public void setLegendLabels(String[] labels)
    • setWidth

      public void setWidth(int w)
    • setHeight

      public void setHeight(int h)
    • getMaxYAxisScale

      public int getMaxYAxisScale()
      Returns:
      the maxYAxisScale
    • setMaxYAxisScale

      public void setMaxYAxisScale(int maxYAxisScale)
      Parameters:
      maxYAxisScale - the maxYAxisScale to set
    • getColor

      public Color[] getColor()
      Returns:
      the color
    • setColor

      public void setColor(Color[] color)
      Parameters:
      color - the color to set
    • getForeColor

      public Color getForeColor()
      Returns:
      the foreColor
    • setForeColor

      public void setForeColor(Color foreColor)
      Parameters:
      foreColor - the foreColor to set
    • getTitleFont

      public Font getTitleFont()
      Returns:
      the titleFont
    • setTitleFont

      public void setTitleFont(Font titleFont)
      Parameters:
      titleFont - the titleFont to set
    • getLegendFont

      public Font getLegendFont()
      Returns:
      the legendFont
    • setLegendFont

      public void setLegendFont(Font legendFont)
      Parameters:
      legendFont - the legendFont to set
    • getValueFont

      public Font getValueFont()
      Returns:
      the valueFont
    • setValueFont

      public void setValueFont(Font valueFont)
      Parameters:
      valueFont - the valueFont to set
    • getLegendPlacement

      public int getLegendPlacement()
      Returns:
      the legendPlacement
    • setLegendPlacement

      public void setLegendPlacement(int legendPlacement)
      Parameters:
      legendPlacement - the legendPlacement to set
    • isOutlinesBarFlag

      public boolean isOutlinesBarFlag()
      Returns:
      the outlinesBarFlag
    • setOutlinesBarFlag

      public void setOutlinesBarFlag(boolean outlinesBarFlag)
      Parameters:
      outlinesBarFlag - the outlinesBarFlag to set
    • isValueOrientation

      public boolean isValueOrientation()
      Returns:
      the valueOrientation
    • setValueOrientation

      public void setValueOrientation(boolean valueOrientation)
      Parameters:
      valueOrientation - the valueOrientation to set
    • isShowGrouping

      public boolean isShowGrouping()
      Returns:
      the showGrouping
    • setShowGrouping

      public void setShowGrouping(boolean showGrouping)
      Parameters:
      showGrouping - the showGrouping to set
    • paintComponent

      public void paintComponent(Graphics graphics)
      Overrides:
      paintComponent in class JComponent