ChartCat 1.2

li.netcat.chart.util
Class GridPart

java.lang.Object
  extended byli.netcat.chart.util.AbstractPart
      extended byli.netcat.chart.util.GridPart
All Implemented Interfaces:
Part
Direct Known Subclasses:
CartesianGridPart, PolarGridPart

public abstract class GridPart
extends AbstractPart

The GridPart is the abstract super class of all grids. It holds some pen instances and other properties that are relevant to paint a grid.

Author:
Arthur Marxer

Field Summary
 
Fields inherited from class li.netcat.chart.util.AbstractPart
BACKGROUND, FOREGROUND, PERSPECTIVE
 
Constructor Summary
GridPart()
          Constructs a new GridPart and initializes it to its defaults.
 
Method Summary
 Pen _getGridPen()
          Deprecated. Replaced by getMumericGridPen()
 Pen _getMarkPen()
          Deprecated. replaced by getDiscreteGridPen().
 void _setGridPen(Pen pen)
          Deprecated. Replaced by setMumericGridPen()
 void _setMarkPen(Pen pen)
          Deprecated. replaced by setDiscreteGridPen()
 Pen getBackgroundPen()
          Returns the background pen.
 Pen getBackgroundPenAt(int index)
          Utility method that returns the background pen for the given background segment index.
 PenBox getBackgroundPenBox()
          Returns the pen box that is used to paint the background (areas between the numeric grid lines).
 Pen getBorderPen()
          Returns the pen that is used to paint the border of the grid.
 Pen getDiscreteGridPen()
          Returns the pen that is used to paint the marks or grid lines that go along the discrete axis of the chart.
 Pen getDiscreteGridPenAt(int index)
          Utility method that returns the grid pen used to paint the grid lines or marks along the discrete axis.
 PenBox getDiscreteGridPenBox()
          Returns the pen box that is used to paint the grid lines or marks along the discrete axis.
 float getMarkLineLength()
          Returns the length of the marks.
 Pen getNumericGridPen()
          Returns the pen that is used to paint the marks or grid lines that go along the discrete axis of the chart.
 Pen getNumericGridPenAt(int index)
          Utility method that returns the grid pen used to paint the grid lines or marks along the numeric axis.
 PenBox getNumericGridPenBox()
          Returns the pen box that is used to paint the grid lines that go along the numeric axis of the grid.
 boolean getPaintBackground()
          Returns the paint background flag.
 void setBackgroundPaint(java.awt.Paint paint)
          Sets the given paint as background paint.
 void setBackgroundPen(Pen pen)
          Sets the given pen as background pen.
 void setBackgroundPenBox(PenBox penBox)
          Sets the pen box that is used to paint the background (areas between the numeric grid lines).
 void setBorderPen(Pen pen)
          Sets the pen that is used to paint the border of the grid.
 void setDiscreteGridPen(Pen pen)
          Sets the pen that is used to paint the marks of the grid.
 void setDiscreteGridPenBox(PenBox penBox)
          Sets the pen box that is used to paint the grid lines or marks along the discrete axis.
 void setMarkLineLength(float length)
          Sets the length of the marks.
 void setNumericGridPen(Pen pen)
          Sets the pen that is used to paint the marks of the grid.
 void setNumericGridPenBox(PenBox penBox)
          Sets the pen box that is used to paint the grid lines or marks that go along the numeric axis of the grid.
 void setPaintBackground(boolean flag)
          Sets the paint background flag.
 
Methods inherited from class li.netcat.chart.util.AbstractPart
getChart, getPerspective, invalidate, setChart, setPerspective
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface li.netcat.chart.Part
getLayout
 

Constructor Detail

GridPart

public GridPart()
Constructs a new GridPart and initializes it to its defaults.

Method Detail

getBackgroundPen

public Pen getBackgroundPen()
Returns the background pen.

Returns:
The background pen, not null.

setBackgroundPen

public void setBackgroundPen(Pen pen)
Sets the given pen as background pen.

Parameters:
pen - The pen that is used to paint the background, not null.

getBackgroundPenBox

public PenBox getBackgroundPenBox()
Returns the pen box that is used to paint the background (areas between the numeric grid lines). If the returned instance is null, the pen returned by getBackgroundPen() is used to paint the background.

Returns:
The pen box that provides the pens for the background or null if the default pen shall used.

getBackgroundPenAt

public Pen getBackgroundPenAt(int index)
Utility method that returns the background pen for the given background segment index. This method returns the default background pen if the background pen box is set to null, otherwise returns the corresponding pen of the background pen box.

Returns:
The background pen for the given background segment index.

setBackgroundPenBox

public void setBackgroundPenBox(PenBox penBox)
Sets the pen box that is used to paint the background (areas between the numeric grid lines). If the pen box is null, the pen returned by getBackgroundPen() is used to paint the background.

Parameters:
penBox - The pen box that provides the pens for the background or null if the default pen shall used.

setBackgroundPaint

public void setBackgroundPaint(java.awt.Paint paint)
Sets the given paint as background paint.

Parameters:
paint - The background paint, or null to avoid filling the background.

getPaintBackground

public boolean getPaintBackground()
Returns the paint background flag.

Returns:
true if the background gets painted.

setPaintBackground

public void setPaintBackground(boolean flag)
Sets the paint background flag.

Parameters:
flag - Specify true to paint the background.

getBorderPen

public Pen getBorderPen()
Returns the pen that is used to paint the border of the grid.

Returns:
The pen that paints the border, might be null.

setBorderPen

public void setBorderPen(Pen pen)
Sets the pen that is used to paint the border of the grid.

Parameters:
pen - The pen that paints the border, might be null.

getDiscreteGridPen

public Pen getDiscreteGridPen()
Returns the pen that is used to paint the marks or grid lines that go along the discrete axis of the chart.

Returns:
The pen that paints the marks or lines along the discrete axis., might be null.

setDiscreteGridPen

public void setDiscreteGridPen(Pen pen)
Sets the pen that is used to paint the marks of the grid.

Parameters:
pen - The pen that paints the marks, might be null.

getDiscreteGridPenBox

public PenBox getDiscreteGridPenBox()
Returns the pen box that is used to paint the grid lines or marks along the discrete axis. If the returned value is null, the pen returned by getDiscreteGridPen() is used to paint the marks or lines.

Returns:
The pen box that provides the pens for the grid marks or null if the default pen shall be used.

setDiscreteGridPenBox

public void setDiscreteGridPenBox(PenBox penBox)
Sets the pen box that is used to paint the grid lines or marks along the discrete axis. If it is null, the pen returned by getMarkPen() is used to paint all grid marks.

Parameters:
penBox - The pen box that provides the pens for the grid marks or null if the default pen shall used.

getDiscreteGridPenAt

public Pen getDiscreteGridPenAt(int index)
Utility method that returns the grid pen used to paint the grid lines or marks along the discrete axis. This method returns the default discrete gid pen if the pen box is set to null, otherwise returns the corresponding pen of the discrete gid pen box.

Returns:
The background pen for the given background segment index.

getNumericGridPen

public Pen getNumericGridPen()
Returns the pen that is used to paint the marks or grid lines that go along the discrete axis of the chart.

Returns:
The pen that paints the marks or lines along the discrete axis., might be null.

setNumericGridPen

public void setNumericGridPen(Pen pen)
Sets the pen that is used to paint the marks of the grid.

Parameters:
pen - The pen that paints the marks, might be null.

getNumericGridPenBox

public PenBox getNumericGridPenBox()
Returns the pen box that is used to paint the grid lines that go along the numeric axis of the grid. If the returned instance is null, the pen returned by getNumericGridPen() is used to paint all grid lines.

Returns:
The pen box that provides the pens for the grid or null if the default pen shall be used.

setNumericGridPenBox

public void setNumericGridPenBox(PenBox penBox)
Sets the pen box that is used to paint the grid lines or marks that go along the numeric axis of the grid. If it is null, the pen returned by getGridPen() is used to paint all grid lines.

Parameters:
penBox - The pen box that provides the pens for the grid or null if the default pen shall be used.

getNumericGridPenAt

public Pen getNumericGridPenAt(int index)
Utility method that returns the grid pen used to paint the grid lines or marks along the numeric axis. This method returns the default numeric gid pen if the pen box is set to null, otherwise returns the corresponding pen of the numeric gid pen box.

Returns:
The background pen for the given background segment index.

getMarkLineLength

public float getMarkLineLength()
Returns the length of the marks.

Returns:
The length of the marks.

setMarkLineLength

public void setMarkLineLength(float length)
Sets the length of the marks.

Parameters:
length - The length of the marks.

_getMarkPen

public Pen _getMarkPen()
Deprecated. replaced by getDiscreteGridPen().

Returns the pen that is used to paint the marks of the grid.

Returns:
The pen that paints the marks, might be null.

_setMarkPen

public void _setMarkPen(Pen pen)
Deprecated. replaced by setDiscreteGridPen()

Sets the pen that is used to paint the marks of the grid.

Parameters:
pen - The pen that paints the marks, might be null.

_getGridPen

public Pen _getGridPen()
Deprecated. Replaced by getMumericGridPen()

Returns the pen that is used to paint the grid lines.

Returns:
The pen that paints the grid lines, might be null.

_setGridPen

public void _setGridPen(Pen pen)
Deprecated. Replaced by setMumericGridPen()

Sets the pen that is used to paint the grid lines.

Parameters:
pen - The pen that paints the grid lines, might be null.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print