ChartCat 1.2

li.netcat.chart.data
Interface ScaleModel

All Superinterfaces:
ChartModelAdapter
All Known Subinterfaces:
NumericScaleModel
All Known Implementing Classes:
DefaultScaleModel, RowScaleModel, StaticScaleModel

public interface ScaleModel
extends ChartModelAdapter

Data source for a scale. Each ScaleModel has a length and a number of marks. Each mark has a position in the scale, a text and a value.

Another important property is the "centered flag" of a scale. It defines how a scale distributes its marks. The following figure shows two scales with 3 marks (circles) each:

Author:
Arthur Marxer

Method Summary
 float getLength()
          Returns the length of the scale
 int getMarkCount()
          Returns the number of marks of this scale.
 float getPosition(int markIndex)
          Returns the position of the mark at the given index.
 java.lang.String getText(int markIndex)
          Returns the text of the mark at the given index.
 double getValue(int markIndex)
          Returns the value of the mark at the given index.
 boolean isCentered()
          Returns the centered flag.
 void setLength(float length)
          Sets the length of the scale.
 float toPosition(double value)
          Calculates the position of an arbitrary value.
 
Methods inherited from interface li.netcat.chart.data.ChartModelAdapter
getChartModel, setChartModel
 

Method Detail

getLength

public float getLength()
Returns the length of the scale

Returns:
The length of the scale. This value is always > 0.0f.

setLength

public void setLength(float length)
Sets the length of the scale.

Parameters:
length - The length of the scale, must be > 0.0f.

getMarkCount

public int getMarkCount()
Returns the number of marks of this scale.

Returns:
The number of marks.

getPosition

public float getPosition(int markIndex)
Returns the position of the mark at the given index.

Parameters:
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().

getValue

public double getValue(int markIndex)
Returns the value of the mark at the given index.

Parameters:
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().

getText

public java.lang.String getText(int markIndex)
Returns the text of the mark at the given index.

Parameters:
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().

toPosition

public float toPosition(double value)
Calculates the position of an arbitrary value.

Parameters:
value - An arbitrary value.
Returns:
The position of the value in this scale.

isCentered

public boolean isCentered()
Returns the centered flag.

Returns:
The centered flag.

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