|
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.Thermometer
This component uses the JFreeChart capabilties to draw a Thermometer.
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.
The "axis" used on the Thermometer is controlled by the height of the component. If you make the component higher, more values will be shown on the axis.
Nested Class Summary | |
static class |
Thermometer.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
static java.lang.String |
BOUNDS_CHANGED_PROPERTY
|
protected double |
lowerBound
|
protected nextapp.echo.Color |
mercuryColor
|
static java.lang.String |
STYLE_LOWER_BOUND
A style constant for the Lower Bound Placement property. |
static java.lang.String |
STYLE_MERCURY_COLOR
A style constant for the Mercury Color property. |
static java.lang.String |
STYLE_THERMOMETER_COLOR
A style constant for the Thermometer Color property. |
static java.lang.String |
STYLE_UPPER_BOUND
A style constant for the Upper Bound Placement property. |
static java.lang.String |
STYLE_VALUE_FORMAT
A style constant for the Value Format property. |
static java.lang.String |
STYLE_VALUE_LINES_SHOWN
A style constant for the Value Lines Shown property. |
static java.lang.String |
STYLE_VALUE_PLACEMENT
A style constant for the Value Placement property. |
protected nextapp.echo.Color |
thermometerColor
|
protected double |
upperBound
|
static java.lang.String |
VALUE_FORMAT_CHANGED_PROPERTY
|
static java.lang.String |
VALUE_LINES_SHOWN_CHANGED_PROPERTY
|
static int |
VALUE_PLACEMENT_BULB
|
static java.lang.String |
VALUE_PLACEMENT_CHANGED_PROPERTY
|
static int |
VALUE_PLACEMENT_NONE
These constants control the shape of the Tachometer |
static int |
VALUE_PLACEMENT_RIGHT
|
protected java.text.NumberFormat |
valueFormat
|
protected boolean |
valueLinesShown
|
protected int |
valuePlacement
|
static SymbolicValue[] |
valuePlacementSymbolics
Helper static SymbolicValue[] - Thermometer.VALUE_PLACEMENT_NONE, VALUE_PLACEMENT_RIGHT, and VALUE_PLACEMENT_BULB |
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 | |
Thermometer()
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. |
org.jfree.chart.JFreeChart |
getJFreeChart()
Returns the internal JFreeChart used to paint the component. |
double |
getLowerBound()
Returns the lower bound of the Thermometer. |
nextapp.echo.Color |
getMercuryColor()
Returns the color of the Thermometer's mercury area (the bulb) |
nextapp.echo.Color |
getThermometerColor()
Returns the color of the Thermometer's outside lines |
double |
getUpperBound()
Returns the upper bound of the Thermometer. |
java.text.NumberFormat |
getValueFormat()
Gets the format of the Thermometer value. |
int |
getValuePlacement()
Returns the value placement on the Thermometer. |
protected boolean |
isImageRepresentation()
Subclasses can overrride this method to indicate that a "image" representation is NOT required. |
boolean |
isValueLinesShown()
Returns true if the value lines 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 |
setLowerBound(double newLowerBound)
Sets the lower bound of the Thermometer. |
void |
setMercuryColor(nextapp.echo.Color newMercuryColor)
Sets the color of the Thermometer's mercury area (the bulb) |
void |
setModel(MeterModel model)
Sets the model for the Thermometer |
void |
setThermometerColor(nextapp.echo.Color newThermometerColor)
Sets the color of the Thermometer's outside lines |
void |
setUpperBound(double newUpperBound)
Returns the upper bound of the Thermometer. |
void |
setValueFormat(java.text.NumberFormat newValueFormat)
Sets the format of the Thermometer value. |
void |
setValueLinesShown(boolean newValueLinesShown)
If this is true then value lines are shown. |
void |
setValuePlacement(int newValuePlacement)
Sets the value placement on the Thermometer. |
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 VALUE_PLACEMENT_NONE
public static final int VALUE_PLACEMENT_RIGHT
public static final int VALUE_PLACEMENT_BULB
public static final java.lang.String STYLE_THERMOMETER_COLOR
Color
public static final java.lang.String STYLE_MERCURY_COLOR
Color
public static final java.lang.String STYLE_VALUE_PLACEMENT
int
public static final java.lang.String STYLE_VALUE_FORMAT
NumberFormat
public static final java.lang.String STYLE_VALUE_LINES_SHOWN
boolean
public static final java.lang.String STYLE_LOWER_BOUND
double
public static final java.lang.String STYLE_UPPER_BOUND
double
public static SymbolicValue[] valuePlacementSymbolics
public static final java.lang.String VALUE_PLACEMENT_CHANGED_PROPERTY
public static final java.lang.String VALUE_FORMAT_CHANGED_PROPERTY
public static final java.lang.String VALUE_LINES_SHOWN_CHANGED_PROPERTY
public static final java.lang.String BOUNDS_CHANGED_PROPERTY
protected nextapp.echo.Color thermometerColor
protected nextapp.echo.Color mercuryColor
protected int valuePlacement
protected java.text.NumberFormat valueFormat
protected boolean valueLinesShown
protected double lowerBound
protected double upperBound
Constructor Detail |
public Thermometer()
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 org.jfree.chart.JFreeChart getJFreeChart()
public double getLowerBound()
The data value can be set lower than this, but it will not be shown in the thermometer.
public nextapp.echo.Color getMercuryColor()
public nextapp.echo.Color getThermometerColor()
public double getUpperBound()
The data value can be set higher than this, but it will not be shown in the thermometer.
public java.text.NumberFormat getValueFormat()
public int getValuePlacement()
This can be one of the following values:
protected boolean isImageRepresentation()
isImageRepresentation
in class AbstractMeterComponent
public boolean isValueLinesShown()
public void setLowerBound(double newLowerBound)
The data value can be set lower than this, but it will not be shown in the thermometer.
newLowerBound
- doublepublic void setMercuryColor(nextapp.echo.Color newMercuryColor)
newMercuryColor
- nextapp.echo.Colorpublic void setModel(MeterModel model)
setModel
in class AbstractMeterComponent
model
- echopoint.meter.MeterModelpublic void setThermometerColor(nextapp.echo.Color newThermometerColor)
newThermometerColor
- nextapp.echo.Colorpublic void setUpperBound(double newUpperBound)
The data value can be set higher than this, but it will not be shown in the thermometer.
newUpperBound
- doublepublic void setValueFormat(java.text.NumberFormat newValueFormat)
newValueFormat
- java.text.NumberFormatpublic void setValueLinesShown(boolean newValueLinesShown)
newValueLinesShown
- booleanpublic void setValuePlacement(int newValuePlacement)
This can be one of the following values:
newValuePlacement
- intpublic 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 |