|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface for tick objects. Those wishing to use their own
tick objects should implement this interface.
A graduated marks on a scale. A JCTick
object
comprises a set of uniformly spaced tick marks.
Method Summary | |
boolean |
getAutomatic()
The automatic boolean determines whether tick increments are
calculated automatically or set by the incrementValue property. |
boolean |
getDrawLabels()
Returns the Boolean controlling the drawing of labels. |
boolean |
getDrawTicks()
Returns the Boolean controlling the drawing of ticks. |
Color |
getFontColor()
Returns the color of the font labeling ticks. |
double |
getIncrementValue()
In non-automatic mode, use this value as the increment value; that is, it places ticks at every incrementValue along the scale. |
double |
getInnerExtent()
Returns the percentage of the scale's radius (as a decimal) at which to begin drawing ticks. |
double |
getLabelExtent()
Returns the position, expressed as a decimal fraction of the scale's size, where tick labels are placed. |
com.klg.jclass.swing.gauge.JCLabelGenerator |
getLabelGenerator()
Returns the label generator associated with this tick. |
double |
getOuterExtent()
Returns the percentage of the scale's size parameter (as a decimal) at which to stop drawing the ticks. |
int |
getPrecision()
Returns the format for numbers in a tick label. |
boolean |
getPrecisionUseDefault()
If true , uses the gauge-determined precision for tick labels;
otherwise, uses the current value of precision property to
label tick marks. |
com.klg.jclass.swing.gauge.JCScale |
getScale()
Returns the scale associated with this tick. |
double |
getStartValue()
In non-automatic mode, usez this value as the start value. |
double |
getStopValue()
In non-automatic mode, usez this value as the stop value. |
Color |
getTickColor()
Returns the color in which to draw ticks. |
com.klg.jclass.swing.gauge.JCTickStyle |
getTickStyle()
Returns the JCTickStyle controlling the shape of the tick. |
double |
getTickWidth()
Returns the width, in pixels, of the tick mark. |
boolean |
isReversed()
Is the tick reversed? By setting this property to true ,
a mirror image of the tick shape is obtained. |
void |
setAutomatic(boolean automatic)
Sets the automatic Boolean for this tick object. |
void |
setDrawLabels(boolean drawLabels)
Returns the Boolean controlling the drawing of labels. |
void |
setDrawTicks(boolean drawTicks)
Sets the boolean controlling the drawing of ticks. |
void |
setFontColor(Color fontColor)
Sets the color of the font used to label ticks. |
void |
setIncrementValue(double incrementValue)
In non-automatic mode, use this value as the increment value; that is, it places ticks at every incrementValue along the scale. |
void |
setInnerExtent(double innerExtent)
Sets the percentage of the scale's size (as a decimal) at at which to begin drawing ticks radially outward. |
void |
setLabelExtent(double labelExtent)
Sets the percentage, expressed as a decimal fraction of the scale's size, at which to place the center of the tick label objects. |
void |
setLabelGenerator(com.klg.jclass.swing.gauge.JCLabelGenerator labelGenerator)
Sets the label generator associated with this tick. |
void |
setOuterExtent(double outerExtent)
Sets the percentage of the scale's size (as a decimal) at which to stop drawing the ticks. |
void |
setPrecision(int precision)
Sets the format for numbers in a tick label; positive values denote the number of places after the decimal point (for example, 3 means multiples of 0.001), negative values indicate the positive number of zeros are used before the decimal place (for example, -3 means numbering will be in multiples of 1000). |
void |
setPrecisionUseDefault(boolean precisionUseDefault)
If true , uses the gauge-determined precision for tick labels;
otherwise, uses the current value of precision property to
label tick marks. |
void |
setReversed(boolean reversed)
Sets the reversed property of the tick. |
void |
setStartValue(double startValue)
In non-automatic mode, use this value as the start value. |
void |
setStopValue(double stopValue)
In non-automatic mode, use this value as the stop value. |
void |
setTickColor(Color tickColor)
The color to use to draw ticks. |
void |
setTickStyle(com.klg.jclass.swing.gauge.JCTickStyle tickStyle)
Sets the JCTickStyle controlling the shape of the tick. |
void |
setTickWidth(double tickWidth)
Sets the width in pixels of the tick mark. |
Method Detail |
public boolean getAutomatic()
automatic
boolean determines whether tick increments are
calculated automatically or set by the incrementValue
property.
If true
, tick increments are calculated by the gauge.
If false
, the incrementValue
property is used to
set the tick spacing.
true
if tick increments are to be calculated
automaticallypublic boolean getDrawLabels()
true
means draw the labels, false
means hide the labels.
boolean
controlling the drawing of labelspublic boolean getDrawTicks()
true
means draw the ticks, false
means hide the ticks.
boolean
controlling the drawing of tickspublic Color getFontColor()
public double getIncrementValue()
incrementValue
along the scale.
In automatic mode, the calculated increment value will overwrite this value.
public double getInnerExtent()
public double getLabelExtent()
public com.klg.jclass.swing.gauge.JCLabelGenerator getLabelGenerator()
JComponent
which will be the label for a tick mark.
labelGenerator
public double getOuterExtent()
public int getPrecision()
JCAbstractTick
, positive values denote the
number of places after the decimal point (for example, 3 means multiples
of 0.001); negative values indicate the positive number of zeros that are
used before the decimal place (for example, -3 means numbering will be in
multiples of 1000). Overridden if precisionUseDefault
is set
to true
.
public boolean getPrecisionUseDefault()
true
, uses the gauge-determined precision for tick labels;
otherwise, uses the current value of precision
property to
label tick marks.
precision
propertypublic com.klg.jclass.swing.gauge.JCScale getScale()
JCTick
componentpublic double getStartValue()
public double getStopValue()
public Color getTickColor()
public com.klg.jclass.swing.gauge.JCTickStyle getTickStyle()
JCTickStyle
controlling the shape of the tick.
public double getTickWidth()
public boolean isReversed()
true
,
a mirror image of the tick shape is obtained.
public void setAutomatic(boolean automatic)
automatic
Boolean for this tick object.
true
means ticks and
increments are dynamically determined by the gauge. Otherwise,
startValue
, stopValue
, and
incrementValue
are used to lay out ticks.
automatic
- whether automatic or code-controlled tick spacing is
usedpublic void setDrawLabels(boolean drawLabels)
true
means draw the labels; false
means hide the labels.
drawLabels
- the boolean controlling the drawing of
labelspublic void setDrawTicks(boolean drawTicks)
true
means draw the ticks; false
means hide the ticks.
drawTicks
- the boolean controlling the drawing of
tickspublic void setFontColor(Color fontColor)
fontColor
- the font colorpublic void setIncrementValue(double incrementValue)
incrementValue
along the scale.
In automatic mode, the calculated increment value will overwrite this value.
incrementValue
- the spacing between adjacent tick markspublic void setInnerExtent(double innerExtent)
innerExtent
- the inner extent of the tick markpublic void setLabelExtent(double labelExtent)
labelExtent
- the label extentpublic void setLabelGenerator(com.klg.jclass.swing.gauge.JCLabelGenerator labelGenerator)
JComponent
, which will be the label for a tick mark.
See the code in examples.elements.StopWatchExample for an example.
labelGenerator
- the labelGenerator
which
implements the JCLabelGenerator
interfacepublic void setOuterExtent(double outerExtent)
outerExtent
- the outer extent of the tick markpublic void setPrecision(int precision)
precisionUseDefault
is set
to true
.
precision
- an integer that specifies the number of decimal places
for the values in tick labelspublic void setPrecisionUseDefault(boolean precisionUseDefault)
true
, uses the gauge-determined precision for tick labels;
otherwise, uses the current value of precision
property to
label tick marks.
precisionUseDefault
- whether or not to use the gauge-determined
precisionpublic void setReversed(boolean reversed)
reversed
property of the tick. If the tick is
reversed it draws in the opposite direction (for linear
scales it points left or up instead of right or down, for circular
scales it points towards the center instead of away from the center).
reversed
- Is the tick's direction reversed?public void setStartValue(double startValue)
startValue
- the start valuepublic void setStopValue(double stopValue)
stopValue
- the stop valuepublic void setTickColor(Color tickColor)
tickColor
- the color of the tick markpublic void setTickStyle(com.klg.jclass.swing.gauge.JCTickStyle tickStyle)
JCTickStyle
controlling the shape of the tick.
Users may define their own tick style, if desired.
tickStyle
- one of the built-in tick styles, or a user-supplied styleJCTickStyle
public void setTickWidth(double tickWidth)
tickWidth
- the width in pixels of the tick to be drawn
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |