Class ByteMonitorFigure

java.lang.Object
org.eclipse.draw2d.Figure
org.csstudio.swt.widgets.figures.ByteMonitorFigure
All Implemented Interfaces:
Introspectable, org.eclipse.draw2d.IFigure

public class ByteMonitorFigure extends org.eclipse.draw2d.Figure implements Introspectable
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

    org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch, org.eclipse.draw2d.Figure.ReverseFigureChildrenIterator

    Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

    org.eclipse.draw2d.IFigure.NoInsets
  • Field Summary

    Fields inherited from class org.eclipse.draw2d.Figure

    bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip

    Fields inherited from interface org.eclipse.draw2d.IFigure

    MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Color the rectangles with values appropriate for the value.
     
    int
    returns the maximum number of bits to be displayed
    int
    The number of bits to display
    Get the color to be displayed if a bit is 0.
    Get the color to be displayed if a bit is 1.
    int
    Return the starting bit for the display
    long
     
    boolean
     
    boolean
    Check if shapes corresponding to bits should be vertical or horizontal.
    boolean
    Return true if the display order of the bits should be reversed.
    boolean
     
    protected void
     
    void
    setEffect3D(boolean newValue)
    Set that the displayed LEDs should have a 3D effect
    void
    setHorizontal(boolean isHorizontal)
    sets the direction that shapes corresponding to bits should be displayed.
    void
     
    void
    Set the LED border color
    void
    setLedBorderWidth(int value)
    Set the LED border width, i.e. the spacing between the LEDs in the widget
    void
    setNumBits(int numBits)
    Set the number of bits to display
    void
    Set the color to be displayed if a bit is 0.
    void
    Set the color to be displayed if a bit is 1.
    void
    setPackedLEDs(boolean packLEDs)
     
    void
    setReverseBits(boolean reverseBits)
    Sets the order to display the bits.
    void
    setSquareLED(boolean squareLED)
    Set if the displayed LEDs should be square or round.
    void
    setStartBit(int startBit)
    Set the starting bit for the display
    void
    setValue(double value)
     
    void
    setValue(int value)
     
    void
    setValue(long value)
    Change the value to the last read value

    Methods inherited from class org.eclipse.draw2d.Figure

    add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, optimizeClip, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ByteMonitorFigure

      public ByteMonitorFigure()
  • Method Details

    • drawValue

      public void drawValue()
      Color the rectangles with values appropriate for the value. Rectangles are colored with onColor if the bit is 1. They are colored offColor if the bit is 0.
    • getMAX_BITS

      public int getMAX_BITS()
      returns the maximum number of bits to be displayed
      Returns:
    • getNumBits

      public int getNumBits()
      The number of bits to display
      Returns:
      the numBits
    • getOffColor

      public Color getOffColor()
      Get the color to be displayed if a bit is 0.
      Returns:
    • getOnColor

      public Color getOnColor()
      Get the color to be displayed if a bit is 1.
      Returns:
    • getStartBit

      public int getStartBit()
      Return the starting bit for the display
      Returns:
      the starting bit for the display
    • getValue

      public long getValue()
      Returns:
      the value
    • isEffect3D

      public boolean isEffect3D()
      Returns:
      the effect3D
    • isHorizontal

      public boolean isHorizontal()
      Check if shapes corresponding to bits should be vertical or horizontal. Bits are displayed horizontally if true and vertically if false.
      Returns:
      the isHorizontal
    • isReverseBits

      public boolean isReverseBits()
      Return true if the display order of the bits should be reversed. If true the start bit is on the left or top. If false it is on the right or bottom.
      Returns:
      the reverseBits
    • isSquareLED

      public boolean isSquareLED()
      Returns:
      the squareLED
    • layout

      protected void layout()
      Overrides:
      layout in class org.eclipse.draw2d.Figure
    • setEffect3D

      public void setEffect3D(boolean newValue)
      Set that the displayed LEDs should have a 3D effect
      Parameters:
      newValue - boolean true if 3D, false if not
    • setHorizontal

      public void setHorizontal(boolean isHorizontal)
      sets the direction that shapes corresponding to bits should be displayed. Bits are displayed horizontally if true and vertically if false.
      Parameters:
      isHorizontal - the isHorizontal to set
    • setNumBits

      public void setNumBits(int numBits)
      Set the number of bits to display
      Parameters:
      numBits -
    • setOffColor

      public void setOffColor(Color rgb)
      Set the color to be displayed if a bit is 0.
    • setOnColor

      public void setOnColor(Color rgb)
      Set the color to be displayed if a bit is 1.
    • setReverseBits

      public void setReverseBits(boolean reverseBits)
      Sets the order to display the bits. If true the start bit is on the left or top. If false it is on the right or bottom.
      Parameters:
      reverseBits - the reverseBits to set
    • setSquareLED

      public void setSquareLED(boolean squareLED)
      Set if the displayed LEDs should be square or round.
      Parameters:
      squareLED - boolean true if square, false if round
    • setStartBit

      public void setStartBit(int startBit)
      Set the starting bit for the display
      Parameters:
      startBit -
    • setValue

      public void setValue(int value)
      Parameters:
      value - the value to set
    • setValue

      public void setValue(double value)
    • setLedBorderWidth

      public void setLedBorderWidth(int value)
      Set the LED border width, i.e. the spacing between the LEDs in the widget
    • setLedBorderColor

      public void setLedBorderColor(Color value)
      Set the LED border color
    • setValue

      public void setValue(long value)
      Change the value to the last read value
      Parameters:
      value -
    • getBeanInfo

      public BeanInfo getBeanInfo() throws IntrospectionException
      Specified by:
      getBeanInfo in interface Introspectable
      Throws:
      IntrospectionException
    • setLabels

      public void setLabels(List<String> labels)
    • setPackedLEDs

      public void setPackedLEDs(boolean packLEDs)