ChartCat 1.2

li.netcat.chart.util
Class CartesianGridPart

java.lang.Object
  extended byli.netcat.chart.util.AbstractPart
      extended byli.netcat.chart.util.GridPart
          extended byli.netcat.chart.util.CartesianGridPart
All Implemented Interfaces:
Part

public class CartesianGridPart
extends GridPart

Represents a Cartesian grid that looks for example like this:

It is possible to specify, what lines and marks should be painted. The look of the lines can be modified in the super class.

Author:
Arthur Marxer

Field Summary
 
Fields inherited from class li.netcat.chart.util.AbstractPart
BACKGROUND, FOREGROUND, PERSPECTIVE
 
Constructor Summary
CartesianGridPart(CartesianGraphPart part)
          Constructs a new CartesianGridPart using the given CartesianGraphPart.
 
Method Summary
 void flipFlags()
          Flips all flags, to be specific, mirrors the flags relative to x=y.
 java.lang.Object getBottomBorderPerspective()
          Returns the perspective position of the bottom border.
 java.lang.Object getBottomMarkPerspective()
          Returns the perspective position of the bottom marks.
 CartesianGraphPart getCartesianGraphPart()
          Returns the graph part that defines the dimensions of this grid.
 int getGridIntervalX()
          Returns the grid interval in X-direction.
 int getGridIntervalY()
          Returns the grid interval in Y-direction.
 java.lang.Object getHorizontalLinesPerspective()
          Returns the perspective position of the horizontal lines.
 Layout getLayout(java.awt.Graphics g)
          Returns an instance of a layout that is able to report the bounds of this part and is able to paint this part.
 java.lang.Object getLeftBorderPerspective()
          Returns the perspective position of the left border.
 java.lang.Object getLeftMarkPerspective()
          Returns the perspective position of the left marks.
 boolean getPaintBottomBorder()
          Returns the paint bottom border flag.
 boolean getPaintBottomMarks()
          Returns the paint bottom marks flag.
 boolean getPaintHorizontalLines()
          Returns the paint horizontal lines flag.
 boolean getPaintLeftBorder()
          Returns the paint left border flag.
 boolean getPaintLeftMarks()
          Returns the paint left marks flag.
 boolean getPaintRightBorder()
          Returns the paint right border flag.
 boolean getPaintRightMarks()
          Returns the paint right marks flag.
 boolean getPaintTopBorder()
          Returns the paint top border flag.
 boolean getPaintTopMarks()
          Returns the paint top marks flag.
 boolean getPaintVerticalLines()
          Returns the paint vertical lines flag.
 java.lang.Object getRightBorderPerspective()
          Returns the perspective position of the right border.
 java.lang.Object getRightMarkPerspective()
          Returns the perspective position of the right marks.
 java.lang.Object getTopBorderPerspective()
          Returns the perspective position of the top border.
 java.lang.Object getTopMarkPerspective()
          Returns the perspective position of the top marks.
 java.lang.Object getVerticalLinesPerspective()
          Returns the perspective position of the vertical lines.
 void setBottomBorderPerspective(java.lang.Object perspective)
          Sets the perspective position of the bottom border.
 void setBottomMarkPerspective(java.lang.Object perspective)
          Sets the perspective position of the bottom marks.
 void setCartesianGraphPart(CartesianGraphPart part)
          Sets the graph part that defines the dimensions of this grid.
 void setGridIntervalX(int interval)
          Sets the grid interval in X-direction.
 void setGridIntervalY(int interval)
          Sets the grid interval in Y-direction.
 void setHorizontalLinesPerspective(java.lang.Object perspective)
          Sets the perspective position of the horizontal lines.
 void setLeftBorderPerspective(java.lang.Object perspective)
          Sets the perspective position of the left border.
 void setLeftMarkPerspective(java.lang.Object perspective)
          Sets the perspective position of the left marks.
 void setPaintBorderFlags(boolean top, boolean left, boolean bottom, boolean right)
          Sets the paint flags of the border.
 void setPaintHorizontalLines(boolean flag)
          Sets the paint horizontal lines flag.
 void setPaintMarksFlags(boolean top, boolean left, boolean bottom, boolean right)
          Sets the paint flags of the marks.
 void setPaintVerticalLines(boolean flag)
          Sets the paint vertical lines flag.
 void setRightBorderPerspective(java.lang.Object perspective)
          Sets the perspective position of the right border.
 void setRightMarkPerspective(java.lang.Object perspective)
          Sets the perspective position of the right marks.
 void setTopBorderPerspective(java.lang.Object perspective)
          Sets the perspective position of the top border.
 void setTopMarkPerspective(java.lang.Object perspective)
          Sets the perspective position of the top marks.
 void setVerticalLinesPerspective(java.lang.Object perspective)
          Sets the perspective position of the vertical lines.
 
Methods inherited from class li.netcat.chart.util.GridPart
_getGridPen, _getMarkPen, _setGridPen, _setMarkPen, getBackgroundPen, getBackgroundPenAt, getBackgroundPenBox, getBorderPen, getDiscreteGridPen, getDiscreteGridPenAt, getDiscreteGridPenBox, getMarkLineLength, getNumericGridPen, getNumericGridPenAt, getNumericGridPenBox, getPaintBackground, setBackgroundPaint, setBackgroundPen, setBackgroundPenBox, setBorderPen, setDiscreteGridPen, setDiscreteGridPenBox, setMarkLineLength, setNumericGridPen, setNumericGridPenBox, setPaintBackground
 
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
 

Constructor Detail

CartesianGridPart

public CartesianGridPart(CartesianGraphPart part)
Constructs a new CartesianGridPart using the given CartesianGraphPart.

Parameters:
part - The relevant CartesianGraphPart or null if no part is currently available. In that case, this grid part will not be visible.
Method Detail

getCartesianGraphPart

public CartesianGraphPart getCartesianGraphPart()
Returns the graph part that defines the dimensions of this grid.

Returns:
The graph part that defines the dimensions of this grid.

setCartesianGraphPart

public void setCartesianGraphPart(CartesianGraphPart part)
Sets the graph part that defines the dimensions of this grid.

Parameters:
part - The relevant CartesianGraphPart or null if no part is currently available. In that case, this grid part will not be visible.

getPaintTopBorder

public boolean getPaintTopBorder()
Returns the paint top border flag.


getPaintLeftBorder

public boolean getPaintLeftBorder()
Returns the paint left border flag.


getPaintBottomBorder

public boolean getPaintBottomBorder()
Returns the paint bottom border flag.


getPaintRightBorder

public boolean getPaintRightBorder()
Returns the paint right border flag.


setPaintBorderFlags

public void setPaintBorderFlags(boolean top,
                                boolean left,
                                boolean bottom,
                                boolean right)
Sets the paint flags of the border. Specify true to paint the corresponding border.

Parameters:
top - The top border paint flag.
left - The left border paint flag.
bottom - The top border bottom flag.
right - The right border paint flag.

getTopBorderPerspective

public java.lang.Object getTopBorderPerspective()
Returns the perspective position of the top border.

Returns:
The perspective position of the top border.
See Also:
PerspectivePart

setTopBorderPerspective

public void setTopBorderPerspective(java.lang.Object perspective)
Sets the perspective position of the top border.

Parameters:
perspective - The perspective position of the top border.
See Also:
PerspectivePart

getLeftBorderPerspective

public java.lang.Object getLeftBorderPerspective()
Returns the perspective position of the left border.

Returns:
The perspective position of the left border.
See Also:
PerspectivePart

setLeftBorderPerspective

public void setLeftBorderPerspective(java.lang.Object perspective)
Sets the perspective position of the left border.

Parameters:
perspective - The perspective position of the left border.
See Also:
PerspectivePart

getBottomBorderPerspective

public java.lang.Object getBottomBorderPerspective()
Returns the perspective position of the bottom border.

Returns:
The perspective position of the bottom border.
See Also:
PerspectivePart

setBottomBorderPerspective

public void setBottomBorderPerspective(java.lang.Object perspective)
Sets the perspective position of the bottom border.

Parameters:
perspective - The perspective position of the bottom border.
See Also:
PerspectivePart

getRightBorderPerspective

public java.lang.Object getRightBorderPerspective()
Returns the perspective position of the right border.

Returns:
The perspective position of the right border.
See Also:
PerspectivePart

setRightBorderPerspective

public void setRightBorderPerspective(java.lang.Object perspective)
Sets the perspective position of the right border.

Parameters:
perspective - The perspective position of the right border.
See Also:
PerspectivePart

getPaintTopMarks

public boolean getPaintTopMarks()
Returns the paint top marks flag.


getPaintLeftMarks

public boolean getPaintLeftMarks()
Returns the paint left marks flag.


getPaintBottomMarks

public boolean getPaintBottomMarks()
Returns the paint bottom marks flag.


getPaintRightMarks

public boolean getPaintRightMarks()
Returns the paint right marks flag.


setPaintMarksFlags

public void setPaintMarksFlags(boolean top,
                               boolean left,
                               boolean bottom,
                               boolean right)
Sets the paint flags of the marks. Specify true to paint the corresponding marks.

Parameters:
top - The top marks paint flag.
left - The left marks paint flag.
bottom - The top marks bottom flag.
right - The right marks paint flag.

getTopMarkPerspective

public java.lang.Object getTopMarkPerspective()
Returns the perspective position of the top marks.

Returns:
The perspective position of the top marks.
See Also:
PerspectivePart

setTopMarkPerspective

public void setTopMarkPerspective(java.lang.Object perspective)
Sets the perspective position of the top marks.

Parameters:
perspective - The perspective position of the top marks.
See Also:
PerspectivePart

getLeftMarkPerspective

public java.lang.Object getLeftMarkPerspective()
Returns the perspective position of the left marks.

Returns:
The perspective position of the left marks.
See Also:
PerspectivePart

setLeftMarkPerspective

public void setLeftMarkPerspective(java.lang.Object perspective)
Sets the perspective position of the left marks.

Parameters:
perspective - The perspective position of the left marks.
See Also:
PerspectivePart

getBottomMarkPerspective

public java.lang.Object getBottomMarkPerspective()
Returns the perspective position of the bottom marks.

Returns:
The perspective position of the bottom marks.
See Also:
PerspectivePart

setBottomMarkPerspective

public void setBottomMarkPerspective(java.lang.Object perspective)
Sets the perspective position of the bottom marks.

Parameters:
perspective - The perspective position of the bottom marks.
See Also:
PerspectivePart

getRightMarkPerspective

public java.lang.Object getRightMarkPerspective()
Returns the perspective position of the right marks.

Returns:
The perspective position of the right marks.
See Also:
PerspectivePart

setRightMarkPerspective

public void setRightMarkPerspective(java.lang.Object perspective)
Sets the perspective position of the right marks.

Parameters:
perspective - The perspective position of the right marks.
See Also:
PerspectivePart

getPaintHorizontalLines

public boolean getPaintHorizontalLines()
Returns the paint horizontal lines flag.


setPaintHorizontalLines

public void setPaintHorizontalLines(boolean flag)
Sets the paint horizontal lines flag.

Parameters:
flag - Specify true to paint the horizontal lines.

getHorizontalLinesPerspective

public java.lang.Object getHorizontalLinesPerspective()
Returns the perspective position of the horizontal lines.

Returns:
The perspective position the horizontal lines.
See Also:
PerspectivePart

setHorizontalLinesPerspective

public void setHorizontalLinesPerspective(java.lang.Object perspective)
Sets the perspective position of the horizontal lines.

Parameters:
perspective - The perspective position of the horizontal lines.
See Also:
PerspectivePart

getPaintVerticalLines

public boolean getPaintVerticalLines()
Returns the paint vertical lines flag.


setPaintVerticalLines

public void setPaintVerticalLines(boolean flag)
Sets the paint vertical lines flag.

Parameters:
flag - Specify true to paint the vertical lines.

getVerticalLinesPerspective

public java.lang.Object getVerticalLinesPerspective()
Returns the perspective position of the vertical lines.

Returns:
The perspective position the vertical lines.
See Also:
PerspectivePart

setVerticalLinesPerspective

public void setVerticalLinesPerspective(java.lang.Object perspective)
Sets the perspective position of the vertical lines.

Parameters:
perspective - The perspective position of the vertical lines.
See Also:
PerspectivePart

flipFlags

public void flipFlags()
Flips all flags, to be specific, mirrors the flags relative to x=y.


getGridIntervalX

public int getGridIntervalX()
Returns the grid interval in X-direction. If this value is set e.g. to 3, only every third vertical grid line (or mark) gets painted. The default value is 1.

Returns:
The grid interval.

setGridIntervalX

public void setGridIntervalX(int interval)
Sets the grid interval in X-direction. If this value is set e.g. to 3, only every third vertical grid line (or mark) gets painted. The default value is 1.

Parameters:
interval - The new interval, must be >=1.

getGridIntervalY

public int getGridIntervalY()
Returns the grid interval in Y-direction. If this value is set e.g. to 3, only every third horizontal grid line (or mark) gets painted. The default value is 1.

Returns:
The grid interval.

setGridIntervalY

public void setGridIntervalY(int interval)
Sets the grid interval in Y-direction. If this value is set e.g. to 3, only every third horizontal grid line (or mark) gets painted. The default value is 1.

Parameters:
interval - The new interval, must be >=1.

getLayout

public Layout getLayout(java.awt.Graphics g)
Description copied from interface: Part
Returns an instance of a layout that is able to report the bounds of this part and is able to paint this part.

Parameters:
g - The relevant graphics object.
Returns:
A layout that is able to report the bounds of this part and is able to paint this part. This method may also return 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