adm
Class CMeter

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--adm.CCanvas
                    |
                    +--adm.CAnimatedCanvas
                          |
                          +--adm.CMeter

public class CMeter
extends CAnimatedCanvas

CMeter is an awt component bean. It displays a property's value in the control system as a semi-circular meter object enclosed in a rectangle. The size, bound, foreground, background and the font of the label on the widget can be set like an awt component.

The color of the meter's needle is same as the foreground if the color mode property is set to CLRMOD_STATIC (default). It will change from foreground color to yellow or red depending on the value, warning and alarm limits when CLRMOD_ALARM is used.

There are four label styles which can be selected, with a default of LABEL_NONE. If LABEL_AXIS is used, the tick marks and display range will appear on the widget. In addition, the property's value will also shown on the widget if LABEL_VALUE is selected. The device and property name will be added when LABEL_ALL is used.

Since:
adm0.1
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
CMeter()
          Null Constructor.
CMeter(int w, int h)
          Constructor Defines the canvas size and use default foreground and background color
CMeter(int w, int h, java.awt.Color fg, java.awt.Color bg)
          Constructor Defines the canvas size and sets foreground and background colors.
CMeter(java.lang.String dName, java.lang.String pName)
          Constructor with device name and property name
 
Methods inherited from class adm.CAnimatedCanvas
deviceChanged, getBackground, getColorMode, getDisplayHi, getDisplayLo, getFont, getForeground, getFrameWidth, getLabelStyle, getRangeStyle, paint, setBackground, setBounds, setBounds, setColorMode, setDisplayHi, setDisplayLo, setDisplayRange, setFont, setForeground, setFrameWidth, setLabelStyle, setRangeStyle, setSize, setSize, update
 
Methods inherited from class adm.CCanvas
getDeviceName, getPropertyName, setDeviceAndPropertyName, setDeviceName, setPropertyName
 
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, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, 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, setComponentOrientation, setCursor, setDropTarget, setEnabled, setLocale, setLocation, setLocation, setName, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMeter

public CMeter()
Null Constructor.

CMeter

public CMeter(java.lang.String dName,
              java.lang.String pName)
Constructor with device name and property name
Parameters:
dName - device name
pName - property name

CMeter

public CMeter(int w,
              int h)
Constructor Defines the canvas size and use default foreground and background color
Parameters:
width - component width
height - component height

CMeter

public CMeter(int w,
              int h,
              java.awt.Color fg,
              java.awt.Color bg)
Constructor Defines the canvas size and sets foreground and background colors.
Parameters:
width - component width
height - component height
fg - foreground color
bg - background color