|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
fr.upd.jby.Speedometer
public class Speedometer
Implements a "velocimeter"-like component. Its primarily purpose is to
graphically display a value into a pre-defined range as a hand.
Various pluggable look and feels are supported : Metal,
Aqua and the default Basic.
Source code here.
AquaSpeedometerUI,
BasicSpeedometerUI,
MetalSpeedometerUI,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
Speedometer()
Creates a Speedometer with the following default
values : value is 0, minimum is 0, and
maximum is 100. |
|
Speedometer(int value,
int minimum,
int maximum)
Creates a Speedometer. |
|
| Method Summary | |
|---|---|
int |
getMaximum()
Gets the maximum value this Speedometer can take. |
int |
getMinimum()
Gets the minimum value this Speedometer can take. |
String |
getUIClassID()
Returns the UIDefaults key used to look up the name of the
swing.plaf.ComponentUI class that defines the
look and feel for this
component. |
int |
getValue()
Gets the current value of this Speedometer |
void |
setValue(int value)
Sets the current value of this Speedometer |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Speedometer()
Speedometer with the following default
values : value is 0, minimum is 0, and
maximum is 100.
public Speedometer(int value,
int minimum,
int maximum)
Speedometer.
value - the value of this Speedometerminimum - the minimum value this Speedometer can takemaximum - the maximum value this Speedometer can take| Method Detail |
|---|
public int getValue()
Speedometer
Speedometerpublic void setValue(int value)
Speedometer
value - the new valuepublic int getMinimum()
Speedometer can take.
public int getMaximum()
Speedometer can take.
public void updateUI()
updateUI in class JComponentJComponent.updateUI()public String getUIClassID()
UIDefaults key used to look up the name of the
swing.plaf.ComponentUI class that defines the
look and feel for this
component. Most applications will never need to call this method.
getUIClassID in class JComponentUIDefaults keyUIDefaults.getUI(javax.swing.JComponent)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||