adm
Class CWheelSwitch

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--adm.CWheelSwitch

public class CWheelSwitch
extends java.awt.Container
implements java.awt.event.ActionListener

This widget contains one CTextField on the left and two ArrowButtons on the right. It only works when connect to the device-property with numerical number value.

The textfield is used to display the value and the two arrow buttons are used to adjust the value. The digit at left of the cursor will increase or decrease one when user clicks the up arrow button or the down arrow button.

Like CTextField, the device name, property name and color mode can be controlled by the user. The color mode has the default value, CConstants.CLRMOD_STATIC. But the device name and property name must be set when using this widget.

Since:
adm1.0
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
CWheelSwitch()
          Null Constructor
CWheelSwitch(java.lang.String dname, java.lang.String pname)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 int getColorMode()
           
 java.lang.String getDeviceName()
          Return the device name.
 java.lang.String getPropertyName()
          Return the device property name.
 void setColorMode(int mode)
           
 void setDeviceName(java.lang.String newName)
          Set the Device name
 void setPropertyName(java.lang.String newName)
          Set device property name.
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CWheelSwitch

public CWheelSwitch()
Null Constructor

CWheelSwitch

public CWheelSwitch(java.lang.String dname,
                    java.lang.String pname)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setDeviceName

public void setDeviceName(java.lang.String newName)
Set the Device name
Parameters:
newName - the name of device you want to connect

getDeviceName

public java.lang.String getDeviceName()
Return the device name. If device name is not set, return empty string "".

setPropertyName

public void setPropertyName(java.lang.String newName)
Set device property name.
Parameters:
newName - the name of device property you want to connect

getPropertyName

public java.lang.String getPropertyName()
Return the device property name. If property name is not set, return empty string "".

setColorMode

public void setColorMode(int mode)

getColorMode

public int getColorMode()