|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart3d.JCValueLabel
A JCValueLabel
is an association between a floating-point axis
value and a label.
Field Summary | |
protected boolean |
allowUpdates
Allow updates (in other words, repaints) on user changes |
protected com.klg.jclass.chart3d.JCAxis |
axis
The parent JCAxis who tracks changes in this object. |
protected Color |
background
The value label's background color (null means don't draw a background). |
protected Color |
foreground
The value label's foreground color (null means use plotcube's foreground). |
protected int |
index
The index in the value labels array. |
protected String |
label
The text for this value label. |
protected boolean |
labelDrawn
Asks if the label drawn is for this value label. |
protected boolean |
minorTick
Only a minor tick is drawn for this label if true (if tickDrawn = true ). |
protected boolean |
tickDrawn
Asks if the tick drawn is for this value label. |
protected double |
value
The value on the axis for this label. |
Constructor Summary | |
JCValueLabel()
Default constructor required for Beans. |
|
JCValueLabel(double value,
String label)
Constructor that creates a value label given a value and a String. |
|
JCValueLabel(double value,
String label,
boolean tickOnly)
This constructor exists for backwards compatibility only. |
|
JCValueLabel(double value,
String label,
boolean labelDrawn,
boolean tickDrawn,
boolean minorTick)
Constructor that creates a value label given a value, a String, and a boolean minorTick that dictates that no label is to be drawn for this
value label, only a minor tick (labelDrawn is set to false ). |
Method Summary | |
Object |
clone()
Overrides clone in class Object. |
com.klg.jclass.chart3d.JCAxis |
getAxis()
Returns the axis to which this value label belongs. |
Color |
getBackground()
Returns the background color for this value label. |
Color |
getForeground()
Returns the foreground color for this value label. |
int |
getIndex()
Gets the index into the internal value labels array for this value label. |
String |
getLabel()
Gets the value of the Label property. |
double |
getValue()
Gets the value of the Value property. |
boolean |
isLabelDrawn()
Asks if the label drawn is for this value label. |
boolean |
isMinorTick()
Asks if a major or minor tick is drawn for this value label. |
boolean |
isTickDrawn()
Asks if the tick drawn is for this value label. |
boolean |
isTickOnly()
Deprecated. As of JClass 6.0. Use the labelDrawn , tickDrawn ,
and minorTick properties instead. |
protected void |
setAxis(com.klg.jclass.chart3d.JCAxis axis)
Sets the axis to which this value label belongs. |
void |
setBackground(Color background)
Sets the background color for this value label. |
protected void |
setChanged(boolean b,
int cf)
Tells the parent (if there is one) that a change has happened. |
void |
setForeground(Color foreground)
Sets the foreground color for this value label. |
protected void |
setIndex(int index)
Sets the index into the internal value labels array for this value label. |
void |
setLabel(String label)
Sets the value of the Label property. |
void |
setLabelDrawn(boolean labelDrawn)
Sets whether the label for this value label should be drawn. |
void |
setMinorTick(boolean minorTick)
Sets whether a major of minor tick is drawn for this value label. |
void |
setTickDrawn(boolean tickDrawn)
Sets whether the tick for this value label should be drawn. |
void |
setTickOnly(boolean tickOnly)
Deprecated. As of JClass 6.0. Use the labelDrawn , tickDrawn ,
and minorTick properties instead. |
void |
setValue(double value)
Sets the value of the Value property. |
String |
toString()
Overrides the toString method. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double value
protected String label
protected boolean tickDrawn
protected boolean labelDrawn
protected boolean minorTick
true
(if tickDrawn = true
).
protected Color background
protected Color foreground
protected int index
protected com.klg.jclass.chart3d.JCAxis axis
JCAxis
who tracks changes in this object. User's may not have
write access!
protected boolean allowUpdates
Constructor Detail |
public JCValueLabel()
public JCValueLabel(double value, String label)
value
- floating-point axis valuelabel
- String to use as the value labelpublic JCValueLabel(double value, String label, boolean tickOnly)
labelDrawn
, tickDrawn
,
and minorTick
properties explicitly.
Constructor that creates a value label given a value, a String, and a boolean
tickOnly
which, if true
, dictates that no label and only a minor
tick is to be drawn for this value label (in other words, labelDrawn
is set to
false
). If tickOnly
is false, a label with a major tick is drawn.
value
- floating-point axis valuelabel
- String to use as the value labeltickOnly
- If true
, only a minor tick is drawn at this value (if
tickDrawn
is true
). If false
, a label with
a major tick is drawn, depending on the values of labelDrawn
and tickDrawn
.public JCValueLabel(double value, String label, boolean labelDrawn, boolean tickDrawn, boolean minorTick)
minorTick
that dictates that no label is to be drawn for this
value label, only a minor tick (labelDrawn
is set to false
).
To get no label with a major tick, set minorTick
to false
.
value
- floating-point axis valuelabel
- String to use as the value labellabelDrawn
- Is the label drawn for this value label?tickDrawn
- Is the tick drawn for this value label?minorTick
- only a minor tick is drawn at this value (if tickDrawn
is true
)Method Detail |
public com.klg.jclass.chart3d.JCAxis getAxis()
protected void setAxis(com.klg.jclass.chart3d.JCAxis axis)
axis
- the new axis to which this value label belongspublic double getValue()
Value
property.
The Value
property controls the position of a label in
data space along a particular axis.
public void setValue(double value)
Value
property.
The Value
property controls the position of a label in
data space along a particular axis.
value
- data-space valuepublic String getLabel()
Label
property. The Label
property specifies the text displayed inside the value label.
public void setLabel(String label)
Label
property. The Label
property specifies the text displayed inside the value label.
label
- String representing the text inside the labelpublic boolean isLabelDrawn()
labelDrawn
public void setLabelDrawn(boolean labelDrawn)
labelDrawn
- the new value of labelDrawn
public boolean isTickDrawn()
tickDrawn
public void setTickDrawn(boolean tickDrawn)
tickDrawn
- the new value of tickDrawn
public boolean isMinorTick()
minorTick
. Given that the value of
tickDrawn
is true
: if the return value is true
,
a minor tick is drawn; otherwise a major tick is drawn.public void setMinorTick(boolean minorTick)
minorTick
- the new value of minorTick
public Color getBackground()
public void setBackground(Color background)
background
- the new background color for this value labelpublic Color getForeground()
JCChart3dArea
's
foreground color is used).
public void setForeground(Color foreground)
JCChart3dArea
's
foreground color is used).
foreground
- the new foreground color for this value labelpublic int getIndex()
protected void setIndex(int index)
index
- the new index into the internal value labels array for this
value labelpublic boolean isTickOnly()
labelDrawn
, tickDrawn
,
and minorTick
properties instead.
labelDrawn
, tickDrawn
, and
minorTick
properties explicitly.
If a minorTick
with no label is drawn, returns true
.
Returns false
otherwise.
public void setTickOnly(boolean tickOnly)
labelDrawn
, tickDrawn
,
and minorTick
properties instead.
labelDrawn
, tickDrawn
, and
minorTick
properties explicitly.
Sets whether to just draw a minor tick for this label or not. If true
,
a minor tick is drawn with no label. If false
, a major tick is drawn and, if
the label is non-null, a label is drawn as well.
tickOnly
- true
if only a minor tick is to be drawn for this labelprotected void setChanged(boolean b, int cf)
b
- Has a change happened?cf
- change mask that determines the type of changepublic String toString()
toString
method.
toString
in class Object
public Object clone()
clone
in class Object
OutOfMemoryError
- - if there is not enough memory.Object.clone().
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |