|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Label | +--adm.CLabel
CLabel is an awt component bean. It is used to display a value of the
specified device property in the control system as a text label. The
size, bound, foreground, background, the font and alignment of the label
can be set by the user. It also can display the specific string if
setText(String) method is called.
The color of the text will be the same as the foreground color if the
color mode is set to CLRMOD_STATIC (default). The color of the text
will change to yellow or red if the property is in a warning or alarm
state (as determined by warning and alarm limits) when the color mode
is set to CLRMOD_ALARM.
The display value can be formatted following printf conventions, or
using one of following static format constants:
Fields inherited from class java.awt.Label |
CENTER,
LEFT,
RIGHT |
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 | |
CLabel()
Null constructor. |
|
CLabel(java.lang.String aText)
Constructs a new label with the specified string of text, left justfied |
|
CLabel(java.lang.String dName,
java.lang.String pName)
Null constructor with device name and property name |
Method Summary | |
void |
deviceChanged(DeviceEvent evt)
At first call, try to get the limits. |
int |
getColorMode()
Return the color mode property |
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. |
void |
setColorMode(int newColorMode)
Set the color mode property |
void |
setDeviceName(java.lang.String newName)
Set the Device name |
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 aText)
Set the text for this label to the specified text. |
Methods inherited from class java.awt.Label |
addNotify,
getAlignment,
getText,
setAlignment |
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 CLabel()
public CLabel(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property namepublic CLabel(java.lang.String aText)
sText
- the text string that this label presents.Method Detail |
public final void setColorMode(int newColorMode)
newColorMode
- the new color mode, which may be one of:
public final int getColorMode()
public void setText(java.lang.String aText)
sText
- the text string that this label presents.public final java.lang.String getFormat()
public final 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 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 deviceChanged(DeviceEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |