|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.Component nextapp.echo.Container echopoint.EchoPointComponent echopoint.meter.AbstractMeterComponent echopoint.Tachometer
This component uses the JFreeChart capabilties to draw a Tachometer.
For the purists out there, a Tachometer is "an instrument used to measure the rotations per minute of a rotating shaft". However we are using it to mean a gauge for measuring any range of values.
This class is derived from AbstractMeterComponent which contains many of its methods.
This class uses the MeterModelJFreeChartAdapter class to bridge data from the EchoPoint MeterModel interface to the JFreeChart MeterDatSet interface.
Nested Class Summary | |
static class |
Tachometer.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
static java.lang.String |
DIAL_TYPE_CHANGED_PROPERTY
|
static SymbolicValue[] |
dialTypeSymbolics
Helper static SymbolicValue[] - Tachometer.TACHO_PIE, TACHO_CIRCLE and TACHO_CHORD |
static java.lang.String |
METER_ANGLE_CHANGED_PROPERTY
|
static java.lang.String |
NEEDLE_COLOR_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_DIAL_COLOR
A style constant for the Dial Color property. |
static java.lang.String |
STYLE_DIAL_TYPE
A style constant for the Dial Type property. |
static java.lang.String |
STYLE_METER_ANGLE
A style constant for the Meter Angle property. |
static java.lang.String |
STYLE_NEEDLE_COLOR
A style constant for the Needle Color property. |
static java.lang.String |
STYLE_TICK_LABELS_FONT
A style constant for the Tick Labels Font property. |
static java.lang.String |
STYLE_TICK_LABELS_SHOWN
A style constant for the Tick Labels Shown property. |
static int |
TACHO_CHORD
|
static int |
TACHO_CIRCLE
|
static int |
TACHO_PIE
These constants control the shape of the Tachometer |
static java.lang.String |
TICK_LABELS_FONT
|
static java.lang.String |
TICK_LABELS_SHOWN
|
Fields inherited from class echopoint.EchoPointComponent |
STYLE_TOOL_TIP_TEXT, TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp |
Fields inherited from class nextapp.echo.Component |
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Fields inherited from interface echopoint.positionable.MouseCursorable |
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI |
Constructor Summary | |
Tachometer()
Thermometer constructor. |
Method Summary | |
void |
applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. |
protected nextapp.echo.ImageReference |
drawMeterImage()
Called to redraw the image for this meter. |
nextapp.echo.Color |
getDialColor()
Returns the color of the dial background |
int |
getDialType()
Returns the dial type of the Tachometer. |
org.jfree.chart.JFreeChart |
getJFreeChart()
Returns the internal JFreeChart used to paint the component. |
int |
getMeterAngle()
Gets the meter angle (in degrees) |
nextapp.echo.Color |
getNeedleColor()
Returns the needle color |
nextapp.echo.Font |
getTickLabelsFont()
Gets the font for tick labels |
protected boolean |
isImageRepresentation()
Subclasses can overrride this method to indicate that a "image" representation is NOT required. |
boolean |
isTickLabelsShown()
Returns true if tick labels are shown |
java.lang.Object |
set(java.lang.reflect.Field field,
java.lang.Object newValue)
Called to save the old value of a field, set in a new value and return the old value of a field. |
void |
setDialColor(nextapp.echo.Color newDialColor)
Sets the color of the dial background |
void |
setDialType(int newDialType)
/** Sets the dial type of the Tachometer. |
void |
setMeterAngle(int newMeterAngle)
Sets the meter angle (in degrees) |
void |
setModel(MeterModel model)
Sets the model for the Tachometer and also uses an Adapter to reflect changes into the JFreeChart architecture. |
void |
setNeedleColor(nextapp.echo.Color newNeedleColor)
Sets the needle color |
void |
setTickLabelFont(nextapp.echo.Font newTickLabelsFont)
Sets the font for tick labels |
void |
setTickLabelsShown(boolean newTickLabelsShown)
If true, then tick labels will be shown |
Methods inherited from class echopoint.EchoPointComponent |
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText |
Methods inherited from class nextapp.echo.Component |
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TACHO_PIE
public static final int TACHO_CIRCLE
public static final int TACHO_CHORD
public static final java.lang.String STYLE_NEEDLE_COLOR
Color
public static final java.lang.String STYLE_DIAL_COLOR
Color
public static final java.lang.String STYLE_DIAL_TYPE
int
public static final java.lang.String STYLE_METER_ANGLE
int
public static final java.lang.String STYLE_TICK_LABELS_FONT
Font
public static final java.lang.String STYLE_TICK_LABELS_SHOWN
boolean
public static SymbolicValue[] dialTypeSymbolics
public static final java.lang.String NEEDLE_COLOR_CHANGED_PROPERTY
public static final java.lang.String DIAL_TYPE_CHANGED_PROPERTY
public static final java.lang.String METER_ANGLE_CHANGED_PROPERTY
public static final java.lang.String TICK_LABELS_FONT
public static final java.lang.String TICK_LABELS_SHOWN
Constructor Detail |
public Tachometer()
Method Detail |
public void applyStyle(nextapp.echo.Style style)
nextapp.echo.Component
style names can be used as well.
applyStyle
in interface MouseCursorable
applyStyle
in class AbstractMeterComponent
protected nextapp.echo.ImageReference drawMeterImage()
drawMeterImage
in class AbstractMeterComponent
public nextapp.echo.Color getDialColor()
public int getDialType()
This can be one of the following values:
public org.jfree.chart.JFreeChart getJFreeChart()
public int getMeterAngle()
public nextapp.echo.Color getNeedleColor()
public nextapp.echo.Font getTickLabelsFont()
protected boolean isImageRepresentation()
isImageRepresentation
in class AbstractMeterComponent
public boolean isTickLabelsShown()
public void setDialColor(nextapp.echo.Color newDialColor)
newDialColor
- nextapp.echo.Colorpublic void setDialType(int newDialType)
This can be one of the following values:
newDialType
- intpublic void setMeterAngle(int newMeterAngle)
newMeterAngle
- intpublic void setModel(MeterModel model)
setModel
in class AbstractMeterComponent
model
- echopoint.meter.MeterModelpublic void setNeedleColor(nextapp.echo.Color newNeedleColor)
newNeedleColor
- nextapp.echo.Colorpublic void setTickLabelFont(nextapp.echo.Font newTickLabelsFont)
newTickLabelsFont
- nextapp.echo.Fontpublic void setTickLabelsShown(boolean newTickLabelsShown)
newTickLabelsShown
- booleanpublic java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class AbstractMeterComponent
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |