public class SignalScalarLightViewer extends javax.swing.JButton implements INumberScalarListener, IBooleanScalarListener
javax.swing.JButton.AccessibleJButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static javax.swing.ImageIcon |
blueLED |
static int |
booleanLabel
int representing the option to see attribute's boolean value as label
|
static javax.swing.ImageIcon |
brownGrayLED |
static javax.swing.ImageIcon |
bulbKO |
static javax.swing.ImageIcon |
bulbOff |
static javax.swing.ImageIcon |
bulbOn |
static int |
completeName
int representing the option to see attribute's complete Name as label
|
static int |
customLabel
int representing the option to see a custom Label as label
|
static javax.swing.ImageIcon |
darkGrayLED |
static javax.swing.ImageIcon |
darkGreenLED |
static javax.swing.ImageIcon |
darkOrangeLED |
static javax.swing.ImageIcon |
grayLED |
static javax.swing.ImageIcon |
greenLED |
static javax.swing.ImageIcon |
KOLED |
static int |
label
int representing the option to see attribute's label as label
|
static int |
labelAndBoolean
int representing the option to see attribute's label and the boolean value as label
|
static javax.swing.ImageIcon |
lightOrangeLED |
static int |
name
int representing the option to see attribute's name as label
|
static int |
nameAndBoolean
int representing the option to see attribute's name and the boolean value as label
|
static javax.swing.ImageIcon |
pinkLED |
static javax.swing.ImageIcon |
redLED |
static javax.swing.ImageIcon |
whiteLED |
static javax.swing.ImageIcon |
yellowLED |
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
SignalScalarLightViewer()
Constructs a SignalScalarLightViewer with a devicePropertyModel = null and will not
show devicePropertyModel's label on setModel(...)
|
SignalScalarLightViewer(boolean viewLabel)
Constructs a SignalScalarLightViewer with a devicePropertyModel = null
will show devicePropertyModel's label on setModel(...)
|
Modifier and Type | Method and Description |
---|---|
void |
booleanScalarChange(BooleanScalarEvent arg0) |
void |
clearAttributeModel()
Clears all devicePropertyModel and listener attached to the components
|
void |
errorChange(ErrorEvent arg0) |
IAttribute |
getAttributeModel() |
int |
getChosenLabel() |
java.lang.String |
getFalseLabel() |
java.lang.String |
getTrueLabel() |
boolean |
isViewLabel()
To know whether devicePropertyModel's label is text of this JLabel or not
|
static void |
main(java.lang.String[] args)
Main class, so you can have an example.
|
void |
numberScalarChange(NumberScalarEvent arg0) |
void |
setAttributeModel(IAttribute numberModel)
Associates an attribute to this component.
|
void |
setChosenLabel(int chosenLabel) |
void |
setFalseLabel(java.lang.String falseLabel) |
void |
setIconLightKO(javax.swing.ImageIcon icon)
sets the icon associated with "KO" value = "could not get value"
(default : SignalScalarLightViewer.KOLED)
|
void |
setIconLightOff(javax.swing.ImageIcon icon)
sets the icon associated with the "false" or "0" value
(default : SignalScalarLightViewer.grayLED)
|
void |
setIconLightOn(javax.swing.ImageIcon icon)
sets the icon associated with the "true" or "1" value
(default : SignalScalarLightViewer.redLED)
|
void |
setTrueLabel(java.lang.String trueLabel) |
void |
setViewLabel(boolean b)
To set or unset devicePropertyModel's label as text of this JLabel
|
void |
stateChange(AttributeStateEvent arg0) |
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, 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, transferFocusDownCycle, validate, validateTree
action, 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, 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, transferFocusUpCycle
public static final javax.swing.ImageIcon bulbOff
public static final javax.swing.ImageIcon bulbOn
public static final javax.swing.ImageIcon bulbKO
public static final javax.swing.ImageIcon blueLED
public static final javax.swing.ImageIcon brownGrayLED
public static final javax.swing.ImageIcon darkGrayLED
public static final javax.swing.ImageIcon darkOrangeLED
public static final javax.swing.ImageIcon grayLED
public static final javax.swing.ImageIcon greenLED
public static final javax.swing.ImageIcon darkGreenLED
public static final javax.swing.ImageIcon lightOrangeLED
public static final javax.swing.ImageIcon pinkLED
public static final javax.swing.ImageIcon redLED
public static final javax.swing.ImageIcon whiteLED
public static final javax.swing.ImageIcon yellowLED
public static final javax.swing.ImageIcon KOLED
public static final int booleanLabel
public static final int label
public static final int name
public static final int completeName
public static final int customLabel
public static final int labelAndBoolean
public static final int nameAndBoolean
public SignalScalarLightViewer()
public SignalScalarLightViewer(boolean viewLabel)
public void numberScalarChange(NumberScalarEvent arg0)
numberScalarChange
in interface INumberScalarListener
INumberScalarListener.numberScalarChange(fr.esrf.tangoatk.core.NumberScalarEvent)
public void setViewLabel(boolean b)
b
- a boolean to set or unset devicePropertyModel's label as text of this JLabel.
if true
and devicePropertyModel is not null, it will set devicePropertyModel's label as text.
otherwise it will erase textpublic boolean isViewLabel()
public void stateChange(AttributeStateEvent arg0)
stateChange
in interface IAttributeStateListener
IAttributeStateListener.stateChange(fr.esrf.tangoatk.core.AttributeStateEvent)
public void errorChange(ErrorEvent arg0)
errorChange
in interface IErrorListener
IErrorListener.errorChange(fr.esrf.tangoatk.core.ErrorEvent)
public IAttribute getAttributeModel()
public void setAttributeModel(IAttribute numberModel)
numberModel
- The numberModel to set.public void clearAttributeModel()
public int getChosenLabel()
public void setChosenLabel(int chosenLabel)
public java.lang.String getFalseLabel()
public void setFalseLabel(java.lang.String falseLabel)
public java.lang.String getTrueLabel()
public void setTrueLabel(java.lang.String trueLabel)
public void setIconLightOn(javax.swing.ImageIcon icon)
public void setIconLightOff(javax.swing.ImageIcon icon)
public void setIconLightKO(javax.swing.ImageIcon icon)
public void booleanScalarChange(BooleanScalarEvent arg0)
booleanScalarChange
in interface IBooleanScalarListener
IBooleanScalarListener.booleanScalarChange(fr.esrf.tangoatk.core.BooleanScalarEvent)
public static void main(java.lang.String[] args)