adm
Class CPen

java.lang.Object
  |
  +--java.awt.Component
        |
        +--adm.CPen

public class CPen
extends java.awt.Component
implements CInterface, DeviceListener

Pen data model for CStripChart. It does not remember the history data. It only returns the current data and the met-data.

Since:
adm0.2
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
CPen()
          Null constructor.
CPen(java.lang.String dName, java.lang.String pName)
          Constructor with parameters
 
Method Summary
 void deviceChanged(DeviceEvent de)
           
 java.lang.String getDeviceName()
          Return the device name to which this component is connected.
 double getDisplayHi()
          Return display high
 double getDisplayLo()
          Return display low
 double getNewValue()
           
 java.awt.Color getPenColor()
          Return the color of Pen
 java.lang.String getPropertyName()
          Return the device property name to which this component is connected.
 void setDeviceAndPropertyName(java.lang.String newDeviceName, java.lang.String newPropertyName)
          Set device name and device property name
 void setDeviceName(java.lang.String newName)
          Set the Device name
 void setDisplayHi(double hi)
          set display high.
 void setDisplayLo(double lo)
          set display low.
 void setDisplayRange(double min, double max)
          Set display range.
 void setPenColor(java.awt.Color aColor)
          Set the color of Pen
 void setPropertyName(java.lang.String newName)
          Set device property name
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, 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, 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, paint, 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, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPen

public CPen()
Null constructor.

CPen

public CPen(java.lang.String dName,
            java.lang.String pName)
Constructor with parameters
Parameters:
dName - the name of device this Pen connected
pName - the name of property this Pen connected
Method Detail

setDeviceName

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

getDeviceName

public java.lang.String getDeviceName()
Return the device name to which this component is connected. If device name is not set, return empty string "".
Specified by:
getDeviceName in interface CInterface

setPropertyName

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

getPropertyName

public java.lang.String getPropertyName()
Return the device property name to which this component is connected. If property name is not set, return empty string "".
Specified by:
getPropertyName in interface CInterface

setDeviceAndPropertyName

public void setDeviceAndPropertyName(java.lang.String newDeviceName,
                                     java.lang.String newPropertyName)
Set device name and device property name
Parameters:
newDeviceName - the device name you want to connect
newPropertyName - the device property name you want to connect

setPenColor

public void setPenColor(java.awt.Color aColor)
Set the color of Pen

getPenColor

public java.awt.Color getPenColor()
Return the color of Pen

setDisplayRange

public void setDisplayRange(double min,
                            double max)
Set display range. Use min as max if the min > max.
Parameters:
min - the display low value
max - the display high value

setDisplayHi

public void setDisplayHi(double hi)
set display high.
Parameters:
hi - the display high value

setDisplayLo

public void setDisplayLo(double lo)
set display low.
Parameters:
lo - the display low value

getDisplayHi

public double getDisplayHi()
Return display high

getDisplayLo

public double getDisplayLo()
Return display low

getNewValue

public double getNewValue()

deviceChanged

public void deviceChanged(DeviceEvent de)
Specified by:
deviceChanged in interface DeviceListener