|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.TextComponent | +--java.awt.TextField | +--adm.CTextField
CTextField is an awt component bean. It is used to control and monitor
a value of the specified device property in the control system. Its size,
bound, foreground, background and the font can be set by the user.
The color of the text will be the same as the foreground if the color
mode is set to CLRMOD_STATIC (default). When the color mode is set to
CLRMOD_ALARM the color of the text will change to yellow or red if the
property is in a warning or alarm state (determined by warning and alarm
limits).
The display value can be formatted following C "printf" conventions, or
use one of following static format constants:
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Fields inherited from interface adm.CConstants |
ALIGN_CENTER,
ALIGN_LEFT,
ALIGN_RIGHT,
AXIS_BOTTOM,
AXIS_LEFT,
AXIS_RIGHT,
AXIS_STYLE_LINEAR,
AXIS_STYLE_LOG10,
AXIS_TOP,
CLASS_QUERY,
CLRMOD_ALARM,
CLRMOD_STATIC,
COLUMN,
DEVICE_QUERY,
DIR_DOWN,
DIR_LEFT,
DIR_RIGHT,
DIR_UP,
FILL_FROM_CENTER,
FILL_FROM_EDGE,
FRMT_AUTO,
FRMT_FLOAT,
FRMT_HEX,
FRMT_INTEGER,
FRMT_OCTAL,
FRMT_SCIENTIFIC,
HORIZONTAL,
LABEL_ALL,
LABEL_AXIS,
LABEL_NONE,
LABEL_VALUE,
PROPERTY_QUERY,
RANGE_AUTO,
RANGE_FROM_PROPERTY,
RANGE_STATIC,
ROW,
STYLE_FILLUNDER,
STYLE_LINE,
STYLE_POINT,
VERTICAL |
Constructor Summary | |
CTextField()
Null Constructor |
|
CTextField(java.lang.String dName,
java.lang.String pName)
Null constructor with device name and property name |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Send the new value to the control system and resume monitoring |
void |
deviceChanged(DeviceEvent evt)
|
void |
focusGained(java.awt.event.FocusEvent evt)
for FocusListener interface Stop the monitor when component gains focus, so that the user can enter the new update value. |
void |
focusLost(java.awt.event.FocusEvent evt)
for FocusListener interface Start the monitor and stop the timer thread. |
int |
getColorMode()
|
java.lang.String |
getDeviceName()
Return the device name to which this component is connected. |
java.lang.String |
getFormat()
Return the text format (format is following the printf conventions) |
java.lang.String |
getPropertyName()
Return the device property name to which this component is connected. |
boolean |
isFacusLock()
Return focus lock |
void |
keyPressed(java.awt.event.KeyEvent e)
for KeyListener interface |
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
for KeyListener interface Reset the timeout counter |
void |
run()
Sleep a timeout period then remove the focus |
void |
setColorMode(int newColorMode)
Set the color mode property |
void |
setDeviceName(java.lang.String newName)
Set the Device name |
void |
setFocusLock(boolean b)
Set focus lock action |
void |
setFormat(java.lang.String aFormat)
Set the text format. |
void |
setPropertyName(java.lang.String newName)
Set device property name |
void |
setText(java.lang.String s)
Overwrite parent setText method to set the value in control system as well |
Methods inherited from class java.awt.TextField |
addActionListener,
addNotify,
echoCharIsSet,
getColumns,
getEchoChar,
getMinimumSize,
getMinimumSize,
getPreferredSize,
getPreferredSize,
minimumSize,
minimumSize,
preferredSize,
preferredSize,
removeActionListener,
setColumns,
setEchoChar,
setEchoCharacter |
Methods inherited from class java.awt.TextComponent |
addTextListener,
getCaretPosition,
getSelectedText,
getSelectionEnd,
getSelectionStart,
getText,
isEditable,
removeNotify,
removeTextListener,
select,
selectAll,
setCaretPosition,
setEditable,
setSelectionEnd,
setSelectionStart |
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,
getName,
getParent,
getPeer,
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,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paint,
paintAll,
postEvent,
prepareImage,
prepareImage,
print,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
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 CTextField()
public CTextField(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property nameMethod Detail |
public void setColorMode(int newColorMode)
newColorMode
- the new color mode, which may be one of:
public int getColorMode()
public java.lang.String getFormat()
public void setFormat(java.lang.String aFormat)
format
- the format of the label text, which following printf
conventions. Or use one of following string:
public void run()
public void keyTyped(java.awt.event.KeyEvent e)
public void keyPressed(java.awt.event.KeyEvent e)
public void keyReleased(java.awt.event.KeyEvent e)
public void focusGained(java.awt.event.FocusEvent evt)
public void focusLost(java.awt.event.FocusEvent evt)
public void setFocusLock(boolean b)
b
- true (default) has focus lock timer on
false no focus lockpublic boolean isFacusLock()
public void actionPerformed(java.awt.event.ActionEvent evt)
public void setText(java.lang.String s)
public void setDeviceName(java.lang.String newName)
newName
- the name of the device to monitorpublic 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 deviceChanged(DeviceEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |