|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Checkbox | +--adm.CCheckbox
CCheckbox is an awt-like Checkbox widget. It only works with the
device/property with boolean value or the two state Enum type.
If the data type is not right, the checkbox label will be set to
"Error!!!" and there is no action occur.
By default the widget has no label. Call the setLabel(String label)
method, can add the label to the CCheckbox widget.
The device name and property name must be set using setDeviceName
and setPropertyName or the correct constructor
CCheckbox(String dname, String pname).
If the current state is true or 1 (second Enum state), the checkbox
is be checked (on). Otherwise is not be checked (off). Clicking on
check box widget set its state from "on" to "off," or from "off" to
"on." If the set operation failed, the checkbox will back to the
original state.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CCheckbox()
Constructor |
|
CCheckbox(java.lang.String dName,
java.lang.String pName)
Constructor with device name and property name |
Method Summary | |
void |
deviceChanged(DeviceEvent event)
First call back to check the device-property type, there is no action occurs if none boolean data type. |
java.lang.String |
getDeviceName()
Return the device name to which this component is connected. |
java.lang.String |
getLabel()
|
java.lang.String |
getPropertyName()
Return the device property name to which this component is connected. |
void |
itemStateChanged(java.awt.event.ItemEvent evt)
Set the change back to control system and monitor the result. |
void |
setDeviceName(java.lang.String newName)
Set the Device name |
void |
setLabel(java.lang.String newLabel)
|
void |
setPropertyName(java.lang.String newName)
Set device property name |
Methods inherited from class java.awt.Checkbox |
addItemListener,
addNotify,
getCheckboxGroup,
getSelectedObjects,
getState,
removeItemListener,
setCheckboxGroup,
setState |
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 CCheckbox()
public CCheckbox(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property nameMethod Detail |
public void setLabel(java.lang.String newLabel)
public java.lang.String getLabel()
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 itemStateChanged(java.awt.event.ItemEvent evt)
public void deviceChanged(DeviceEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |