adm
Class CIndicator

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--adm.CCanvas
                    |
                    +--adm.CAnimatedCanvas
                          |
                          +--adm.CIndicator
Direct Known Subclasses:
CBar, CSlider

public class CIndicator
extends CAnimatedCanvas

CIndicator is an awt component bean. It display a property's value in the control system as a moving triangle (indicator). 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 moving triangle 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 control 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 mark and display range will appear on the widget. The property's value will also shown on the widget if LABEL_VALUE is selected. The device and property name will on the widget when LABEL_ALL is used.

The orientation of the CIndicator widget can be either VERTICAL (default) or HORIZONTAL.

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
CIndicator()
          Null Constructor.
CIndicator(int w, int h)
          Constructor.
CIndicator(int w, int h, java.awt.Color fg, java.awt.Color bg)
          Constructor.
CIndicator(java.lang.String dName, java.lang.String pName)
          Constructor with device name and property name.
 
Method Summary
 int getOrientation()
          Get the orientation
 void setOrientation(int newOrientation)
          Set the orientation
 
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

CIndicator

public CIndicator()
Null Constructor.

CIndicator

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

CIndicator

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

CIndicator

public CIndicator(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
Method Detail

setOrientation

public void setOrientation(int newOrientation)
Set the orientation
Parameters:
newOrientation - new orientation, which may be one of:
  1. CConstants.HORIZONTAL
  2. CConstants.VERTICAL

getOrientation

public int getOrientation()
Get the orientation