|
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 | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.swing.gauge.JCAbstractRange
A range is also used to highlight some sub-portion of the scale by
the use of color or an image.
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.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected Image |
image
An image that may be used for range. |
protected double |
innerExtent
The place to start drawing this range. |
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 com.klg.jclass.swing.gauge.JCScale |
scale
The scale associated with this range object. |
protected boolean |
scaleImage
Boolean that determines if the image should be scaled when the range is resized. |
protected double |
startValue
The scale value (not angle or position) at which to begin the range. |
protected double |
stopValue
The scale value (not angle or position) 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 |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JCAbstractRange(Color foreground,
com.klg.jclass.swing.gauge.JCScale scale,
double innerExtent,
double outerExtent,
double startValue,
double stopValue)
Creates a range with the properties specified in the parameters. |
Method Summary | |
Image |
getImage()
Gets the Image to be used to mark the range. |
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. |
com.klg.jclass.swing.gauge.JCScale |
getScale()
Returns the scale associated with this range. |
boolean |
getScaleImage()
Scales the image in relation to the range dimensions. |
double |
getStartValue()
Returns the scale value (not angle or position) at which to begin the range. |
double |
getStopValue()
Returns the scale value (not angle or position) at which to stop the range. |
void |
redraw()
Does nothing, overridden in JCLinearRange or
JCCircularRange . |
void |
setImage(Image image)
Sets the Image to be used to mark the range. |
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 range's name. |
void |
setScaleImage(boolean scaleImage)
Determines whether to scale the image according to the range dimensions. |
void |
setStartValue(double startValue)
Sets the scale value (not angle or position) at which to begin the range. |
void |
setStopValue(double stopValue)
Sets the scale value (not angle or position) at which to stop the range. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.klg.jclass.swing.gauge.JCRange |
getForeground |
Field Detail |
protected com.klg.jclass.swing.gauge.JCScale scale
protected double innerExtent
protected double outerExtent
protected double startValue
protected double stopValue
protected String rangeName
protected static int rangeCounter
protected Image image
protected boolean scaleImage
true
.
Constructor Detail |
public JCAbstractRange(Color foreground, com.klg.jclass.swing.gauge.JCScale scale, double innerExtent, double outerExtent, double startValue, double stopValue)
foreground
- the color of this rangescale
- the associated scaleinnerExtent
- The place to start drawing this range;
values are ratios based on the scale's radius, width, or height
(depending on the scale's type and orientation). For example, for a
circular scale, 0.8 means start drawing this range 80% of the radius'
size away from the center.outerExtent
- The place to stop drawing this range. Values are ratios
based on the scale's radius, width, or height (depending on the scale's
type and orientation). For example for vertical linear scale, 0.9
means stop drawing this range 90% of the scale's width away from the
left of the scale.startValue
- the scale value (not angle or position) at which to
begin the rangestopValue
- the scale value (not angle or position) at which to
end the rangeMethod Detail |
public com.klg.jclass.swing.gauge.JCScale getScale()
getScale
in interface JCRange
JCAbstractRange
componentpublic double getInnerExtent()
getInnerExtent
in interface JCRange
public void setInnerExtent(double innerExtent)
setInnerExtent
in interface JCRange
innerExtent
- the inner extent of the rangepublic double getOuterExtent()
getOuterExtent
in interface JCRange
public void setOuterExtent(double outerExtent)
setOuterExtent
in interface JCRange
outerExtent
- the outer extent of the rangepublic double getStartValue()
getStartValue
in interface JCRange
public void setStartValue(double startValue)
setStartValue
in interface JCRange
startValue
- the start value for the rangepublic double getStopValue()
getStopValue
in interface JCRange
public void setStopValue(double stopValue)
setStopValue
in interface JCRange
stopValue
- the stop value for the rangepublic String getRangeName()
getRangeName
in interface JCRange
public void setRangeName(String rangeName)
setRangeName
in interface JCRange
rangeName
- the name to appear in the legendpublic Image getImage()
Image
to be used to mark the range.
public void setImage(Image image)
Image
to be used to mark the range.
image
- the Image
to be used to mark the rangepublic boolean getScaleImage()
true
if the image is to be scaled to the size of the
bounding box of the range; otherwise, center the image based on its
length and widthpublic void setScaleImage(boolean scaleImage)
scaleImage
- true
if the image is to be scaled to the size
of the bounding box of the range; otherwise, center the image based on
its length and widthpublic void redraw()
JCLinearRange
or
JCCircularRange
.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |