|
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.JCScale
A graduated scale. A scale has a minimum value, a maximum value, a direction,
and associated JCTick
objects.
Inner Class Summary | |
static class |
JCScale.Direction
Enum's for the direction parameter. |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
protected JCScale.Direction |
direction
A JCCircularScale.Direction enum, CLOCKWISE or
COUNTERCLOCKWISE , giving the direction in which scale values increase. |
protected double |
max
The minumum value this scale can have. |
protected double |
min
The maximum value this scale can have. |
protected Vector |
ticks
A list of tick objects for this scale. |
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 | |
JCScale()
Create a graduated scale. |
|
JCScale(JCScale.Direction direction,
double min,
double max,
Color foreground)
Creates a graduated scale. |
Method Summary | |
void |
addTick(JCTick tick)
Adds a tick object to a gauge. |
void |
addTick(JCTick tick,
int index)
Adds a tick object to a gauge. |
JCScale.Direction |
getDirection()
Returns the JCCircularScale.Direction for this scale, CLOCKWISE or
COUNTERCLOCKWISE , giving the direction in which scale values increase. |
double |
getMax()
Returns the maximum value for this scale. |
double |
getMin()
Returns the minimum value for this scale. |
Vector |
getTicks()
Returns the the Vector of tick objects for this scale. |
boolean |
inBounds(double value)
Returns true if the value is within the scale's minimum and maximum. |
void |
redraw()
Call this instead of paint so that the repaintEnabled flag can be checked. |
void |
removeTick(JCTick tick)
Removes a tick from a gauge. |
void |
setDirection(JCScale.Direction direction)
Sets the JCCircularScale.Direction for this scale, CLOCKWISE or
COUNTERCLOCKWISE , giving the direction in which scale values increase. |
void |
setMax(double max)
Sets the maximum value for this scale. |
void |
setMin(double min)
Sets the minimum value for this scale. |
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.Direction direction
JCCircularScale.Direction
enum, CLOCKWISE
or
COUNTERCLOCKWISE
, giving the direction in which scale values increase.
protected double min
protected double max
protected Vector ticks
Constructor Detail |
public JCScale()
public JCScale(JCScale.Direction direction, double min, double max, Color foreground)
direction
- min
- max
- foreground
- Method Detail |
public JCScale.Direction getDirection()
JCCircularScale.Direction
for this scale, CLOCKWISE
or
COUNTERCLOCKWISE
, giving the direction in which scale values increase.public void setDirection(JCScale.Direction direction)
JCCircularScale.Direction
for this scale, CLOCKWISE
or
COUNTERCLOCKWISE
, giving the direction in which scale values increase.direction
- The JCCircularScale.Directionpublic double getMax()
public void setMax(double max)
max
- The maxiumum value for this scalepublic double getMin()
public void setMin(double min)
min
- The minimum value for this scalepublic Vector getTicks()
Vector
of tick objects for this scale.public void addTick(JCTick tick)
tick
- The Tick object to be addedpublic void addTick(JCTick tick, int index)
tick
- The JCTick
to be added to the scaleindex
- The z-order indexpublic void removeTick(JCTick tick)
tick
- The JCCircularTick
to be removedpublic boolean inBounds(double value)
value
- The value to be testedpublic 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 |