|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--vipratech.beans.standardbeans.AnalogMeter
The AnalogMeter.class is a GUI component used to dynamically display values using an analog type meter display.
The value of the meter is set using the setValue(float value) method or by wiring the meter up to adjustment event sources at design time. For example, the meter can be wired up to standard java.awt.Scrollbar components or to vipratech.beans.standardbeans.HorizontalSlider, or vipratech.beans.standardbeans.VerticalSlider.
The value of the meter may also be set using a property change event, using the property name "y1Value". For example, the meter may be wired up to vipratech.beans.standardbeans.SimpleDataSource at design time.
The AnalogMeter bean automatically resizes itself at design time to the correct width for a given height. This is required to maintian the correct relative width and height values to draw a semi-circular meter where the width is double the height.
The automatic resizing means that the meter should be sized at design time adjusting the height and allowing the width to be calculated by the bean.
MeterSupport
, Serialized FormFields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AnalogMeter()
Constructor. |
Method Summary | |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
Method for receiving adjustment events. |
boolean |
getBevel()
Returns the toggle of 3D edge effect on the border. |
int |
getBorder()
Returns the background color of the meter. |
float |
getMaxValue()
Returns meter maximum value. |
java.awt.Color |
getMeterColor()
Returns the background color of the meter. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum meter size. |
float |
getMinValue()
Returns current meter minimum value. |
int |
getPlaces()
Returns the number of decimal places. |
boolean |
getPointer()
Returns the toggle of line/pointer display for the meter. |
java.lang.String |
getUnitLabel()
Returns the unit label. |
boolean |
getUnitVisible()
Returns the toggle of the unit visible state. |
float |
getValue()
Returns current meter value. |
void |
paint(java.awt.Graphics g)
Draws all meter components to the screen. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Method to receive property change events. |
void |
reset()
Resets the meter to the initial value. |
void |
setBevel(boolean bevel)
Toggle 3D edge effect on the border. |
void |
setBorder(int border)
Sets the border size of the meter. |
void |
setMaxValue(float maxValue)
Sets the meter maximum value. |
void |
setMeterColor(java.awt.Color meterColor)
Sets the background color of the meter. |
void |
setMinValue(float minValue)
Sets the meter minimum value. |
void |
setPlaces(int places)
Sets the number of decimal places. |
void |
setPointer(boolean pointer)
Toggle line/pointer display for the meter. |
void |
setUnitLabel(java.lang.String unitLabel)
Sets the unit label. |
void |
setUnitVisible(boolean unitVisible)
Toggle unit visible. |
void |
setValue(float value)
Sets the meter value. |
void |
stop()
Freezes the meter at the current value. |
void |
update(java.awt.Graphics g)
Overidden method to reduce flicker when using double buffering. |
Methods inherited from class java.awt.Canvas |
addNotify |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
dispatchEvent,
doLayout,
enable,
enable,
enableInputMethods,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public AnalogMeter()
Method Detail |
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
public final void paint(java.awt.Graphics g)
public final void update(java.awt.Graphics g)
public final void propertyChange(java.beans.PropertyChangeEvent event)
public final void reset()
public void stop()
public final java.awt.Dimension getMinimumSize()
public final void setValue(float value)
public final float getValue()
public final void setMaxValue(float maxValue)
public final float getMaxValue()
public final void setMinValue(float minValue)
public final float getMinValue()
public final void setMeterColor(java.awt.Color meterColor)
public final java.awt.Color getMeterColor()
public final void setBorder(int border)
public final int getBorder()
public final void setPointer(boolean pointer)
public boolean getPointer()
public final void setBevel(boolean bevel)
public boolean getBevel()
public final void setUnitVisible(boolean unitVisible)
public boolean getUnitVisible()
public final void setUnitLabel(java.lang.String unitLabel)
public java.lang.String getUnitLabel()
public final void setPlaces(int places)
public int getPlaces()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |