|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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:
| 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 |
public float getLength()
public void setLength(float length)
length - The length of the scale, must be > 0.0f.public int getMarkCount()
public float getPosition(int markIndex)
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().public double getValue(int markIndex)
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().public java.lang.String getText(int markIndex)
markIndex - The index of the mark. It must be >= 0 and < getMarkCount().public float toPosition(double value)
value - An arbitrary value.
public boolean isCentered()
|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||