fr.esrf.tangoatk.widget.attribute
Class AScalarViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by fr.esrf.tangoatk.widget.attribute.AScalarViewer
All Implemented Interfaces:
IAttributeStateListener, IErrorListener, IAttributeViewer, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
StringScalarViewer

public class AScalarViewer
extends javax.swing.JPanel
implements IAttributeStateListener, IErrorListener, IAttributeViewer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AScalarViewer()
          Creates new form NumberScalarViewer
 
Method Summary
 void errorChange(ErrorEvent errorEvent)
           
 void fullStateChange(java.lang.String state)
           
 Trend getGlobalTrend()
           
protected  PropertyViewer getLabel()
           
 javax.swing.border.Border getLabelBorder()
           
 java.awt.Font getLabelFont()
           
 int getLabelMaximumLength()
           
 java.awt.Dimension getLabelPreferredSize()
           
 double getLabelWidth()
           
 IAttribute getModel()
           
protected  PropertyViewer getUnit()
           
 javax.swing.border.Border getUnitBorder()
           
 java.awt.Font getUnitFont()
           
 int getUnitMaximumLength()
           
 java.awt.Dimension getUnitPreferredSize()
           
 double getUnitWidth()
           
 ATKFormat getUserFormat()
           
protected  ATKField getValue()
           
 javax.swing.border.Border getValueBorder()
           
 java.awt.Font getValueFont()
           
 int getValueMaximumLength()
           
 java.awt.Dimension getValuePreferredSize()
           
 double getValueWidth()
           
protected  void init(IScalarAttribute model)
           
 boolean isAlarmEnabled()
          Get the value of alarmEnabled.
 boolean isFullState()
          Get the value of fullState.
 boolean isInfoVisible()
           
 boolean isLabelOpaque()
           
 boolean isLabelVisible()
           
 boolean isOpaque()
           
 boolean isPropertyListEditable()
           
 boolean isSetter()
           
 boolean isUnitOpaque()
           
 boolean isUnitVisible()
           
 boolean isValueEditable()
           
 boolean isValueOpaque()
           
static void main(java.lang.String[] args)
           
 void setAlarmEnabled(boolean v)
          Set the value of alarmEnabled.
 void setBackground(java.awt.Color color)
           
 void setFont(java.awt.Font f)
           
 void setForeground(java.awt.Color color)
           
 void setFullState(boolean v)
          Set the value of fullState.
 void setGlobalTrend(Trend t)
           
 void setInfoVisible(boolean b)
           
 void setLabelBorder(javax.swing.border.Border border)
           
 void setLabelFont(java.awt.Font f)
           
 void setLabelMaximumLength(int characters)
           
 void setLabelOpaque(boolean isOpaque)
           
 void setLabelPreferredSize(java.awt.Dimension d)
           
 void setLabelVisible(boolean b)
           
 void setLabelWidth(double width)
           
 void setOpaque(boolean isOpaque)
           
 void setPropertyListEditable(boolean b)
           
 void setSetter(boolean b)
           
 void setUnitBorder(javax.swing.border.Border border)
           
 void setUnitFont(java.awt.Font f)
           
 void setUnitMaximumLength(int characters)
           
 void setUnitOpaque(boolean isOpaque)
           
 void setUnitPreferredSize(java.awt.Dimension d)
           
 void setUnitVisible(boolean b)
           
 void setUnitWidth(double width)
           
 void setUserFormat(ATKFormat format)
           
 void setValueBorder(javax.swing.border.Border border)
           
 void setValueEditable(boolean b)
           
protected  void setValueField(ATKField field)
           
 void setValueFont(java.awt.Font f)
           
 void setValueMaximumLength(int characters)
           
 void setValueOpaque(boolean isOpaque)
           
 void setValuePreferredSize(java.awt.Dimension d)
           
 void setValueWidth(double width)
           
 void stateChange(AttributeStateEvent attributeStateEvent)
           
 void stateChange(java.lang.String state)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AScalarViewer

public AScalarViewer()
Creates new form NumberScalarViewer

Method Detail

setFont

public void setFont(java.awt.Font f)
Overrides:
setFont in class javax.swing.JComponent

setValueField

protected void setValueField(ATKField field)

fullStateChange

public void fullStateChange(java.lang.String state)

stateChange

public void stateChange(java.lang.String state)

init

protected void init(IScalarAttribute model)

isFullState

public boolean isFullState()
Get the value of fullState.

Returns:
value of fullState.

setFullState

public void setFullState(boolean v)
Set the value of fullState.

Parameters:
v - Value to assign to fullState.

setUserFormat

public void setUserFormat(ATKFormat format)

getUserFormat

public ATKFormat getUserFormat()

setLabelFont

public void setLabelFont(java.awt.Font f)

getLabelFont

public java.awt.Font getLabelFont()

setUnitFont

public void setUnitFont(java.awt.Font f)

getUnitFont

public java.awt.Font getUnitFont()

setValueFont

public void setValueFont(java.awt.Font f)

getValueFont

public java.awt.Font getValueFont()

getLabelPreferredSize

public java.awt.Dimension getLabelPreferredSize()

setLabelPreferredSize

public void setLabelPreferredSize(java.awt.Dimension d)

getValuePreferredSize

public java.awt.Dimension getValuePreferredSize()

setValuePreferredSize

public void setValuePreferredSize(java.awt.Dimension d)

setGlobalTrend

public void setGlobalTrend(Trend t)

getGlobalTrend

public Trend getGlobalTrend()

getUnitPreferredSize

public java.awt.Dimension getUnitPreferredSize()

setUnitPreferredSize

public void setUnitPreferredSize(java.awt.Dimension d)

setUnitMaximumLength

public void setUnitMaximumLength(int characters)

getUnitMaximumLength

public int getUnitMaximumLength()

setLabelMaximumLength

public void setLabelMaximumLength(int characters)

getLabelMaximumLength

public int getLabelMaximumLength()

setValueMaximumLength

public void setValueMaximumLength(int characters)

getValueMaximumLength

public int getValueMaximumLength()

main

public static void main(java.lang.String[] args)

setForeground

public void setForeground(java.awt.Color color)
Overrides:
setForeground in class javax.swing.JComponent

setBackground

public void setBackground(java.awt.Color color)
Overrides:
setBackground in class javax.swing.JComponent

setUnitVisible

public void setUnitVisible(boolean b)

isUnitVisible

public boolean isUnitVisible()

isLabelVisible

public boolean isLabelVisible()

setLabelVisible

public void setLabelVisible(boolean b)

setInfoVisible

public void setInfoVisible(boolean b)

isInfoVisible

public boolean isInfoVisible()

setPropertyListEditable

public void setPropertyListEditable(boolean b)

isPropertyListEditable

public boolean isPropertyListEditable()

setSetter

public void setSetter(boolean b)

isSetter

public boolean isSetter()

setValueEditable

public void setValueEditable(boolean b)

isValueEditable

public boolean isValueEditable()
Specified by:
isValueEditable in interface IAttributeViewer

setValueBorder

public void setValueBorder(javax.swing.border.Border border)

getValueBorder

public javax.swing.border.Border getValueBorder()

setLabelBorder

public void setLabelBorder(javax.swing.border.Border border)

getLabelBorder

public javax.swing.border.Border getLabelBorder()

setUnitBorder

public void setUnitBorder(javax.swing.border.Border border)

getUnitBorder

public javax.swing.border.Border getUnitBorder()

setValueOpaque

public void setValueOpaque(boolean isOpaque)

isValueOpaque

public boolean isValueOpaque()

setLabelOpaque

public void setLabelOpaque(boolean isOpaque)

isLabelOpaque

public boolean isLabelOpaque()

setUnitOpaque

public void setUnitOpaque(boolean isOpaque)

isUnitOpaque

public boolean isUnitOpaque()

setOpaque

public void setOpaque(boolean isOpaque)
Overrides:
setOpaque in class javax.swing.JComponent

isOpaque

public boolean isOpaque()
Overrides:
isOpaque in class javax.swing.JComponent

getUnit

protected PropertyViewer getUnit()

getLabel

protected PropertyViewer getLabel()

getValue

protected ATKField getValue()

getValueWidth

public double getValueWidth()

getLabelWidth

public double getLabelWidth()

getUnitWidth

public double getUnitWidth()

setLabelWidth

public void setLabelWidth(double width)

setUnitWidth

public void setUnitWidth(double width)

setValueWidth

public void setValueWidth(double width)

isAlarmEnabled

public boolean isAlarmEnabled()
Get the value of alarmEnabled.

Returns:
value of alarmEnabled.

setAlarmEnabled

public void setAlarmEnabled(boolean v)
Set the value of alarmEnabled.

Parameters:
v - Value to assign to alarmEnabled.

errorChange

public void errorChange(ErrorEvent errorEvent)
Specified by:
errorChange in interface IErrorListener

stateChange

public void stateChange(AttributeStateEvent attributeStateEvent)
Specified by:
stateChange in interface IAttributeStateListener

getModel

public IAttribute getModel()
Specified by:
getModel in interface IAttributeViewer