|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Choice | +--adm.CChoice
CChoice is subclass of awt.Choice. It is used to control a device/property
value of enumerated type. If the connected device/property is not an
Enum data type, three items "Invalid", deviceName and propertyName will
be shown in the choice. The selection is fixed on the first item (Invalid).
The state change event action is built into this widget. When the item
state is changed, the cursor will change to the waiting cursor and a set
action will be sent to the control system. If the set fails, the selected
item (display) will revert to the old one and an error message will be
printed to standard output. The selection is also disabled.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CChoice()
Null constructor. |
|
CChoice(java.lang.String dName,
java.lang.String pName)
Null constructor with device name and property name |
Method Summary | |
void |
deviceChanged(DeviceEvent event)
Get the Enum value from control system and add to the choice at first call. |
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. |
void |
itemStateChanged(java.awt.event.ItemEvent evt)
To send the new value to the control system. |
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 |
setPropertyName(java.lang.String newName)
Set device property name |
Methods inherited from class java.awt.Choice |
add,
addItem,
addItemListener,
addNotify,
countItems,
getItem,
getItemCount,
getSelectedIndex,
getSelectedItem,
getSelectedObjects,
insert,
remove,
remove,
removeAll,
removeItemListener,
select,
select |
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 CChoice()
public CChoice(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property nameMethod Detail |
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 you want to connectpublic java.lang.String getPropertyName()
public void setDeviceAndPropertyName(java.lang.String newDeviceName, java.lang.String newPropertyName)
newDeviceName
- the device name you want to connectnewPropertyName
- the device property name you want to connectpublic void deviceChanged(DeviceEvent event)
public void itemStateChanged(java.awt.event.ItemEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |