public class SimpleStateViewer extends JSmoothLabel implements IDevStateScalarListener
SimpleStateViewer is a viewer to surveil a state attribute
DevStateScalar. Background color are defined in
ATKConstant . SimpleStateViewer offer
the possibility to use Antialiased font for better rendering.
SimpleStateViewer has no label. Normally one connects the DevStateScalar attribute
with the viewer like this:
IDevStateScalar stateAtt = (IDevStateScalar) attributeList.add("myStateAttName");
SimpleStateViewer statev = new SimpleStateViewer();
statev.setModel(stateAtt);
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasToolTip |
protected IDevStateScalar |
model |
protected boolean |
stateClickable |
protected boolean |
stateInTooltip |
CENTER_ALIGNMENT, CLASSIC_BEHAVIOR, LEFT_ALIGNMENT, MATRIX_BEHAVIOR, RIGHT_ALIGNMENT| Constructor and Description |
|---|
SimpleStateViewer()
Contructs a SimpleStateViewer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearModel() |
void |
devStateScalarChange(DevStateScalarEvent evt) |
void |
errorChange(ErrorEvent evt) |
IDeviceApplication |
getApplication()
Gets the application attached to this state viewer.
|
IDevStateScalar |
getModel()
getModel gets the model of this stateviewer. |
IDevicePopUp |
getPopUp()
Get the value of popUp.
|
boolean |
getStateClickable()
getStateClickable returns if the state is clickable or not. |
static void |
main(java.lang.String[] args) |
void |
setApplication(IDeviceApplication runnable)
Set the application which will be displayed on right mouse click.
|
void |
setHasToolTip(boolean b)
setHasToolTip display or not a tooltip for this viewer |
void |
setModel(IDevStateScalar stateAtt)
setModel sets the model of this viewer. |
void |
setPopUp(IDevicePopUp v)
Set the popup which will be displayed on left mouse click.
|
void |
setStateClickable(boolean clickable)
setStateClickable will the state be clickable? |
void |
stateChange(AttributeStateEvent e) |
protected void |
stateViewerMouseClicked(java.awt.event.MouseEvent evt) |
getHorizontalAlignment, getMinimumSize, getPreferredSize, getSizingBehavior, getText, getVerticalOffset, paintComponent, setHorizontalAlignment, setSizingBehavior, setText, setValueOffsets, setVerticalOffsetaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected IDevStateScalar model
protected boolean stateClickable
protected boolean hasToolTip
protected boolean stateInTooltip
protected void stateViewerMouseClicked(java.awt.event.MouseEvent evt)
public void setHasToolTip(boolean b)
setHasToolTip display or not a tooltip for this viewerb - If True the attribute full name will be displayed as tooltip for the viewerpublic void setModel(IDevStateScalar stateAtt)
setModel sets the model of this viewer.
If the textLabel property is not set, the name of the device is
shown on the textLabel.IDevStateScalar - a stateAtt to surveilpublic void clearModel()
public IDevStateScalar getModel()
getModel gets the model of this stateviewer.IDevStateScalar valuepublic void setStateClickable(boolean clickable)
setStateClickable will the state be clickable?clickable - a boolean valuepublic boolean getStateClickable()
getStateClickable returns if the state is clickable or not.boolean valuepublic void setApplication(IDeviceApplication runnable)
runnable - Application to be launchedpublic IDeviceApplication getApplication()
public IDevicePopUp getPopUp()
setPopUp(fr.esrf.tangoatk.widget.device.IDevicePopUp)public void setPopUp(IDevicePopUp v)
v - Value to assign to popUp.public void devStateScalarChange(DevStateScalarEvent evt)
devStateScalarChange in interface IDevStateScalarListenerpublic void stateChange(AttributeStateEvent e)
stateChange in interface IAttributeStateListenerpublic void errorChange(ErrorEvent evt)
errorChange in interface IErrorListenerpublic static void main(java.lang.String[] args)