|
|
|||||||
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.DigitalMeter
The DigitMeter.class is a GUI component used to dynamically display values using an LED or LCD digital type meter display composed of seven-element digits. Each element in the digit can either be active or inactive.
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.HorizontalSlider, or vipratech.beans.VerticalSlider.
If the meter is to display negative values, then an extra digit should be added at design time to display the minus sign.
The value of the meter may also be set using a property change event. For example, the meter may be wired up to vipratech.beans.SimpleDataSource at design time.
Each digit in the meter is an instance of the vipratech.beans.Digit object.
MeterSupport
,
Digit
, Serialized FormFields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
DigitalMeter()
|
Method Summary | |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
Method for receiving adjustment events. |
void |
destroy()
Cleans up offscreen graphics. |
java.awt.Color |
getActive()
Returns the color of the active digit elements. |
boolean |
getBevel()
Returns the toggle of 3D edge effect on the border. |
int |
getBorder()
Returns the background color of the meter. |
java.awt.Color |
getInactive()
Returns the color of the inactive digit elements. |
float |
getInitValue()
Returns the start and reset value to be displayed in the meter. |
boolean |
getInterfaceColors()
Returns the toggle for the colors to match the current interface.. |
java.awt.Color |
getMeterColor()
Returns the background color of the meter. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum meter size. |
boolean |
getNegatives()
Returns the toggle for negative numbers. |
int |
getNumberOfDigits()
Returns the number of digits to be displayed. |
int |
getPlaces()
Returns the number of decimal places to be displayed. |
java.lang.String |
getUnit()
Returns the unit to be displayed. |
float |
getValue()
Returns the value to be displayed in the meter. |
void |
paint(java.awt.Graphics g)
Updates of screen image, then draw image to screen. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Method to receive property change events. |
void |
reset()
Resets the meter to the initial value. |
void |
setActive(java.awt.Color active)
Sets the color of the active digit elements. |
void |
setBevel(boolean bevel)
Toggle 3D edge effect on the border. |
void |
setBorder(int border)
Sets the border size of the meter. |
void |
setInactive(java.awt.Color inactive)
Sets the color of the inactive digit elements. |
void |
setInitValue(float initValue)
Sets the start and reset value to be displayed in the meter. |
void |
setInterfaceColors(boolean interfaceColors)
Toggle the colors to match the current interface. |
void |
setMeterColor(java.awt.Color meterColor)
Sets the background color of the meter. |
void |
setNegatives(boolean negatives)
Toggle display of negative numbers. |
void |
setNumberOfDigits(int numberOfDigits)
Sets the number of digits to be displayed. |
void |
setPlaces(int places)
Sets the number of decimal places to be displayed. |
void |
setUnit(java.lang.String unit)
Sets the unit to be displayed. |
void |
setValue(float value)
Sets the value to be displayed in the meter. |
void |
stop()
Freezes the meter at the current value. |
void |
update(java.awt.Graphics g)
Overidden method to avoid flickering during repaint. |
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 DigitalMeter()
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 void destroy()
public final java.awt.Dimension getMinimumSize()
public final void setValue(float value)
public final float getValue()
public final void setInitValue(float initValue)
public final float getInitValue()
public final void setNumberOfDigits(int numberOfDigits)
public final int getNumberOfDigits()
public final void setPlaces(int places)
public final int getPlaces()
public final void setActive(java.awt.Color active)
public final java.awt.Color getActive()
public final void setInactive(java.awt.Color inactive)
public final java.awt.Color getInactive()
public final void setMeterColor(java.awt.Color meterColor)
public final java.awt.Color getMeterColor()
public final void setUnit(java.lang.String unit)
public final java.lang.String getUnit()
public final void setBorder(int border)
public final int getBorder()
public final void setBevel(boolean bevel)
public final boolean getBevel()
public final void setInterfaceColors(boolean interfaceColors)
public final boolean getInterfaceColors()
public final void setNegatives(boolean negatives)
public final boolean getNegatives()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |