|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Button | +--adm.CButton
CButton is an awt-like Button widget. It does not post monitorOn but
sets the device property to a specified value when pressed.
There is a stringValue and label text associated with the CButton.
When the button is pressed, the device/property in the control system
will be set to the user specified value (stringValue). The StringValue
can be a String or numerical number, such as int, float or double
depending on the nature of the device property. But it must be treated
as a String and set through the setStringValue (String val) method.
CButton is responsible to convert this StringValue to a correct data type
prior to the set action. If the set command fails due to the convertion
or a permission problem, the button will be disabled and the label color
of the button will be set to red.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CButton()
Constructor |
|
CButton(java.lang.String dName,
java.lang.String pName)
Constructor with device name and property name |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Send a value to the control system. |
void |
deviceChanged(DeviceEvent de)
Check the error message back from device.set(..) |
java.lang.String |
getDeviceName()
Return the device name to which this component is connected. |
java.lang.String |
getPropertyName()
Return the device property name to which this component is connected. |
java.lang.String |
getStringValue()
Return the the string/value associated with the button |
void |
setDeviceName(java.lang.String newName)
Set the Device name |
void |
setPropertyName(java.lang.String newName)
Set device property name |
void |
setStringValue(java.lang.String v)
Set the value that gets sent to the control system when the button is pressed. |
Methods inherited from class java.awt.Button |
addActionListener,
addNotify,
getActionCommand,
getLabel,
removeActionListener,
setActionCommand,
setLabel |
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,
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 |
public CButton()
public CButton(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property nameMethod Detail |
public void setStringValue(java.lang.String v)
v
- the string/value to sendpublic java.lang.String getStringValue()
public void setDeviceName(java.lang.String newName)
newName
- the name of device you want to connectpublic java.lang.String getDeviceName()
public void setPropertyName(java.lang.String newName)
newName
- the name of device property to monitorpublic java.lang.String getPropertyName()
public void actionPerformed(java.awt.event.ActionEvent evt)
public void deviceChanged(DeviceEvent de)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |