|
|||||||||
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.CAnimatedCanvas | +--adm.CIndicator | +--adm.CSlider
CSlider is an awt component bean. It provide a convenient means for
allowing a user to control a device property's value in a control system.
The size, bound, foreground, background and the font of the label on the
slider can be set like an awt component.
There are four label styles which can be selected, with a default of
LABEL_NONE. If LABEL_AXIS is used, tick marks and display range will
appear. The property's value will also shown if LABEL_VALUE is selected.
All the information including the device and property name will on the
widget when the LABEL_ALL is used.
The orientation of the CSilder widget can be either VERTICAL (default)
or HORIZONTAL.
There are two ways to adjust the value: (1) dragging the thumb and
(2) clicking the face of the slider. When the thumb is dragged, only a
change larger than precision will be sent to the control system. The
precision value will be obtained from control system if it is available.
Otherwise the default value of 1% of the control range will be used.
When clicking on the face, the value of the property will increase or
decrease a unit increment depending upon the clicking position.
By default the unit increment is the same as the precision, and they
can be changed using either the setPrecision(double) or
setUnitIncrement(double) method. Double clicking the thumb, a new window
will pop up to allow the user to change the unit increment value on the
fly. Create a slider component. It is used to control the device
property value.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CSlider()
Null Constructor. |
|
CSlider(int w,
int h)
Constructor. |
|
CSlider(int w,
int h,
java.awt.Color fg,
java.awt.Color bg)
Constructor Defines the canvas size and sets foreground and background colors. |
|
CSlider(java.lang.String dName,
java.lang.String pName)
Constructor with device name and property name |
Method Summary | |
void |
deviceChanged(DeviceEvent event)
|
double |
getControlHi()
Return control high |
double |
getControlLo()
Return control low |
double |
getPrecision()
Return the precision value. |
double |
getUnitIncrement()
Return the unit increment value. |
void |
mouseClicked(java.awt.event.MouseEvent me)
Handles mouse click. |
void |
mouseDragged(java.awt.event.MouseEvent me)
Handle the mouse drag. |
void |
mouseEntered(java.awt.event.MouseEvent me)
MouseListener interface |
void |
mouseExited(java.awt.event.MouseEvent me)
MouseListener interface |
void |
mouseMoved(java.awt.event.MouseEvent me)
MouseMotionListener interface |
void |
mousePressed(java.awt.event.MouseEvent me)
Press the mouse in the thumb area to initiate a drag, and monitoring will be suspended. |
void |
mouseReleased(java.awt.event.MouseEvent me)
Handle the mouse release. |
void |
setControlHi(double hi)
Set control high. |
void |
setControlLo(double lo)
Set control low. |
void |
setControlRange(double lo,
double hi)
Set control high and control low. |
void |
setPrecision(double newPrecision)
Set precision. |
void |
setUnitIncrement(double newUnitIncrement)
Set unit increment value. |
Methods inherited from class adm.CIndicator |
getOrientation,
setOrientation |
Methods inherited from class adm.CAnimatedCanvas |
getBackground,
getColorMode,
getDisplayHi,
getDisplayLo,
getFont,
getForeground,
getFrameWidth,
getLabelStyle,
getRangeStyle,
paint,
setBackground,
setBounds,
setBounds,
setColorMode,
setDisplayHi,
setDisplayLo,
setDisplayRange,
setFont,
setForeground,
setFrameWidth,
setLabelStyle,
setRangeStyle,
setSize,
setSize,
update |
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,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFontMetrics,
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,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setLocale,
setLocation,
setLocation,
setName,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CSlider()
public CSlider(java.lang.String dName, java.lang.String pName)
dName
- device namepName
- property namepublic CSlider(int w, int h)
width
- component widthheight
- component heightpublic CSlider(int w, int h, java.awt.Color fg, java.awt.Color bg)
width
- component widthheight
- component heightfg
- foreground colorbg
- background colorMethod Detail |
public void setControlRange(double lo, double hi)
lo
- the display lowHi
- the display high
hi must be larger than lo otherwise nothing is changed.public void setControlHi(double hi)
Hi
- the display high
hi must be larger than controlLo otherwise nothing is changed.public void setControlLo(double lo)
lo
- the display low
lo must be smaller than controlHi otherwise nothing is changed.public double getControlHi()
public double getControlLo()
public void setUnitIncrement(double newUnitIncrement)
public double getUnitIncrement()
public void setPrecision(double newPrecision)
public double getPrecision()
public void deviceChanged(DeviceEvent event)
public void mouseEntered(java.awt.event.MouseEvent me)
public void mouseExited(java.awt.event.MouseEvent me)
public void mouseClicked(java.awt.event.MouseEvent me)
public void mousePressed(java.awt.event.MouseEvent me)
public void mouseReleased(java.awt.event.MouseEvent me)
public void mouseDragged(java.awt.event.MouseEvent me)
public void mouseMoved(java.awt.event.MouseEvent me)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |