|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--adm.CCanvas | +--adm.CToggleButton
CToggleButton implements a toggle button widget with 2 mutually
exclusive buttons. This widget must be connected to a property of
binary Enum type. The Enum strings will be the labels on the button.
These two mutually exclusive buttons are represented by a raised
and a etched rectangle. The etched button use to indicate the current
state. Only the raised button works like a real push button. When the
button is pressed the set action is sent to control system and the
waiting cursor will appear. If the operation succeeds, the raised
button will change to etched and etched button becomes raised. The
cursor will revert to the default cursor.
If the connected device/property is not of type of binary Enum, the
"not" and "binary" strings will be the label of the buttons. No action
perform when the either button is pressed.
The toggle button can be stacked by ROW or by COLUMN using
setStacking(int) method. The default stacking is COLUMN.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CToggleButton()
Null constructor. |
|
CToggleButton(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. |
byte |
getStacking()
Get the stacking position |
void |
mouseClicked(java.awt.event.MouseEvent me)
|
void |
mouseEntered(java.awt.event.MouseEvent me)
|
void |
mouseExited(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent me)
Handle the mouse press. |
void |
mouseReleased(java.awt.event.MouseEvent me)
To send the new value to the control system. |
void |
paint(java.awt.Graphics g)
Draw two buttons and labels |
void |
setStacking(byte newStacking)
Set the stacking position |
Methods inherited from class adm.CCanvas |
getDeviceName,
getPropertyName,
setDeviceAndPropertyName,
setDeviceName,
setPropertyName |
Methods inherited from class java.awt.Canvas |
addNotify |
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,
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 CToggleButton()
public CToggleButton(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property nameMethod Detail |
public void setStacking(byte newStacking)
newStacking
- new stacking position, which may be one of:
public byte getStacking()
public void paint(java.awt.Graphics g)
public void mousePressed(java.awt.event.MouseEvent me)
public void mouseReleased(java.awt.event.MouseEvent me)
public void mouseClicked(java.awt.event.MouseEvent me)
public void mouseEntered(java.awt.event.MouseEvent me)
public void mouseExited(java.awt.event.MouseEvent me)
public void deviceChanged(DeviceEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |