ChartCat 1.2

li.netcat.chart.util
Class GraphLook

java.lang.Object
  extended byli.netcat.chart.util.GraphLook

public class GraphLook
extends java.lang.Object

This class defines the look of a graph. It includes a series of pens that is used for area graphs (bar chart, area chart, radar chart etc.), and a series of pens and a series of symbols used for line graphs (line chart, radar line chart etc.).

This class also holds a static default instance that is used during the construction of all charts.

Author:
Arthur Marxer

Constructor Summary
GraphLook()
          Creates a new instance of GraphLook and initializes it to its defaults.
 
Method Summary
static java.awt.Shape[] createSymbols(float size)
          Creates a series of default reference symbols using the given size.
 Pen getAreaChartPen(int columnIndex)
          Returns the Pen that is used to paint the given column in an area chart.
 Pen getAreaChartPen(int rowIndex, int columnIndex)
          Returns the Pen that is used to paint the given cell in an area chart (e.g. bar chart or radar chart).
static GraphLook getDefault()
          Returns the default instance that is used by all graph parts.
 Pen getLineChartPen(int columnIndex)
          Returns the Pen that is used to paint the data of a specific column in a line chart.
 java.awt.Shape getSymbol(int columnIndex)
          Returns the reference symbol that is used to paint the data of a specific column in a line chart.
 void setAreaChartPenBox(PenBox penBox)
          Sets the pen box that is used to paint the areas.
 void setAreaChartPens(Pen[] pens)
          Sets the series of pens that is used to paint the areas.
static void setDefault(GraphLook defaultLook)
          Sets the default graph look that will be used by all graph parts at construction time.
 void setLineChartPenBox(PenBox penBox)
          Sets the pen box that is used to paint the line charts.
 void setLineChartPens(Pen[] pens)
          Sets the series of pens that is used to paint line charts.
 void setSymbols(java.awt.Shape[] symbols)
          Sets the series of symbols to be used for painting line charts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLook

public GraphLook()
Creates a new instance of GraphLook and initializes it to its defaults.

Method Detail

getDefault

public static GraphLook getDefault()
Returns the default instance that is used by all graph parts.

Returns:
The default instance that is used by all graph parts at construction time.

setDefault

public static void setDefault(GraphLook defaultLook)
Sets the default graph look that will be used by all graph parts at construction time.

Returns:
The default graph look.

getAreaChartPen

public Pen getAreaChartPen(int columnIndex)
Returns the Pen that is used to paint the given column in an area chart.

Parameters:
columnIndex - The index of the column.

getAreaChartPen

public Pen getAreaChartPen(int rowIndex,
                           int columnIndex)
Returns the Pen that is used to paint the given cell in an area chart (e.g. bar chart or radar chart). This implementation ignores the row index.

Parameters:
rowIndex - The index of the row.
columnIndex - The index of the column.

getLineChartPen

public Pen getLineChartPen(int columnIndex)
Returns the Pen that is used to paint the data of a specific column in a line chart. The outline paint of this pen is also used to fill the symbols of a line chart.

Parameters:
columnIndex - The index of the column.

getSymbol

public java.awt.Shape getSymbol(int columnIndex)
Returns the reference symbol that is used to paint the data of a specific column in a line chart.

Parameters:
columnIndex - The index of the column.
Returns:
The reference symbol. This shape has its center at (0,0).

setAreaChartPens

public void setAreaChartPens(Pen[] pens)
Sets the series of pens that is used to paint the areas.


setAreaChartPenBox

public void setAreaChartPenBox(PenBox penBox)
Sets the pen box that is used to paint the areas.

Parameters:
penBox - The pen box that is used to paint the areas, not null.

setLineChartPens

public void setLineChartPens(Pen[] pens)
Sets the series of pens that is used to paint line charts. By default, the outline paints of the pens are also used to fill the symbols.

Parameters:
pens - An array of paints to be used for painting the lines. Not null.

setLineChartPenBox

public void setLineChartPenBox(PenBox penBox)
Sets the pen box that is used to paint the line charts.

Parameters:
penBox - The pen box that is used to paint the line charts, not null.

setSymbols

public void setSymbols(java.awt.Shape[] symbols)
Sets the series of symbols to be used for painting line charts.

Parameters:
symbols - An array of symbols to be used for painting the lines. Not null and no null entries.

createSymbols

public static java.awt.Shape[] createSymbols(float size)
Creates a series of default reference symbols using the given size.

Parameters:
size - The size of the symbols, odd values are preferred.

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