|
JClass 4.5.0 API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.swing.gauge.JCRange
A range may be used to draw the circumference of a circular scale.
A range is also used to delineate some sub-portion of the scale.
For example, on a tachometer gauge you could have a range
showing the "red line" region of excessive revolutions per minute (rpm).
A gauge can have zero or more ranges associated with it.
By default, the items in a gauge's legend are ranges.
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
protected double |
innerExtent
The place to start drawing this range from the center. |
protected double |
outerExtent
The place to stop drawing this range. |
protected static int |
rangeCounter
Static counter for generated range names. |
protected String |
rangeName
The name of the range which will appear in the legend. |
protected JCScale |
scale
The scale associated with this range. |
protected double |
startValue
The scale value (not angle) at which to begin the range. |
protected double |
stopValue
The scale value (not angle) at which to stop the range. |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
JCRange(Color foreground,
JCCircularScale scale,
double innerExtent,
double outerExtent,
double startValue,
double stopValue)
Creates a range with the properties specified in the parameters. |
Method Summary | |
double |
getInnerExtent()
Specifies where the inner boundary of the range is. |
double |
getOuterExtent()
Returns where the outer boundary of the range is. |
String |
getRangeName()
Gets the name of this range. |
JCScale |
getScale()
Returns the scale associated with this range. |
double |
getStartValue()
Returns the scale value (not angle) at which to begin the range. |
double |
getStopValue()
Returns the scale value (not angle) at which to stop the range. |
void |
redraw()
Does nothing, overridden in JCCircularRange. |
void |
setInnerExtent(double innerExtent)
Sets where the inner boundary of the range is. |
void |
setOuterExtent(double outerExtent)
Sets where the outer boundary of the range is. |
void |
setRangeName(String rangeName)
Sets the rangeName. |
void |
setScale(JCScale scale)
Sets the scale associated with this range. |
void |
setStartValue(double startValue)
Sets the scale value (not angle) at which to begin the range. |
void |
setStopValue(double stopValue)
Sets the scale value (not angle) at which to stop the range. |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected JCScale scale
protected double innerExtent
protected double outerExtent
protected double startValue
protected double stopValue
protected String rangeName
protected static int rangeCounter
Constructor Detail |
public JCRange(Color foreground, JCCircularScale scale, double innerExtent, double outerExtent, double startValue, double stopValue)
foreground
- The color of this rangescale
- The scale associated with this rangeinnerExtent
- The place to start drawing this range from the center.
Values are ratios based on the scale's radius. For example, 0.8 means
start drawing this range 80% of the radius' size away from the center.outerExtent
- The place to stop drawing this range. For example, 0.9
means stop drawing this range 90% of the radius' size away from the
center.startValue
- The scale value (not angle) at which to begin the rangestopValue
- The scale value (not angle) at which to stop the rangeMethod Detail |
public double getInnerExtent()
public void setInnerExtent(double innerExtent)
innerExtent
- The inner extent of the rangepublic double getOuterExtent()
public void setOuterExtent(double outerExtent)
outerExtent
- The outer extent of the rangepublic JCScale getScale()
public void setScale(JCScale scale)
scale
- The scale associated with this rangepublic double getStartValue()
public void setStartValue(double startValue)
startValue
- The start value for the rangepublic double getStopValue()
public void setStopValue(double stopValue)
stopValue
- The stop value for the rangepublic String getRangeName()
public void setRangeName(String rangeName)
rangeName
- The name to appear in the legendpublic void redraw()
|
Copyright© 1999-2000 KL Group Inc. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |