Class Diagram


  • public class Diagram
    extends Object
    The Diagram class is used to plot simple X/Y graphs. Instances of this class are composed of DiagramGraph and two DiagramAxis objects for the X and Y axes.
    • Field Detail

      • DEFAULT_FOREGROUND_COLOR

        public static final Color DEFAULT_FOREGROUND_COLOR
      • DEFAULT_BACKGROUND_COLOR

        public static final Color DEFAULT_BACKGROUND_COLOR
    • Method Detail

      • enableChangeEventMerging

        public void enableChangeEventMerging()
      • disableChangeEventMerging

        public void disableChangeEventMerging()
      • getDrawGrid

        public boolean getDrawGrid()
      • setDrawGrid

        public void setDrawGrid​(boolean drawGrid)
      • setXAxis

        public void setXAxis​(DiagramAxis xAxis)
      • setYAxis

        public void setYAxis​(DiagramAxis yAxis)
      • getGraphCount

        public int getGraphCount()
      • removeGraph

        public void removeGraph​(DiagramGraph graph)
      • removeAllGraphs

        public void removeAllGraphs()
      • getFont

        public Font getFont()
      • setFont

        public void setFont​(Font font)
      • getMajorGridColor

        public Color getMajorGridColor()
      • setMajorGridColor

        public void setMajorGridColor​(Color majorGridColor)
      • getMinorGridColor

        public Color getMinorGridColor()
      • setMinorGridColor

        public void setMinorGridColor​(Color minorGridColor)
      • getForegroundColor

        public Color getForegroundColor()
      • setForegroundColor

        public void setForegroundColor​(Color foregroundColor)
      • getBackgroundColor

        public Color getBackgroundColor()
      • setBackgroundColor

        public void setBackgroundColor​(Color backgroundColor)
      • getTextGap

        public int getTextGap()
      • setTextGap

        public void setTextGap​(int textGap)
      • isValid

        public boolean isValid()
      • setValid

        public void setValid​(boolean valid)
      • invalidate

        public void invalidate()
      • getGraphArea

        public Rectangle getGraphArea()
      • render

        public void render​(Graphics2D g2d,
                           int x,
                           int y,
                           int width,
                           int height)
      • getClosestGraph

        public DiagramGraph getClosestGraph​(int x,
                                            int y)
      • adjustAxes

        public void adjustAxes​(boolean reset)
      • adjustAxes

        protected void adjustAxes​(DiagramGraph graph)
      • resetMinMaxAccumulators

        public void resetMinMaxAccumulators()
      • resetMinMaxAccumulatorsFromAxes

        public void resetMinMaxAccumulatorsFromAxes()
      • dispose

        public void dispose()