Class AbstractBoolFigure

java.lang.Object
org.eclipse.draw2d.Figure
org.csstudio.swt.widgets.figures.AbstractBoolFigure
All Implemented Interfaces:
Introspectable, org.eclipse.draw2d.IFigure
Direct Known Subclasses:
AbstractBoolControlFigure, LEDFigure

public class AbstractBoolFigure extends org.eclipse.draw2d.Figure implements Introspectable
Base figure for a widget based on AbstractBoolWidgetModel.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
    static enum 
     

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

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

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected boolean
     
    protected org.eclipse.draw2d.Label
     
     
    protected Color
     
    protected String
     
    protected Color
     
    protected String
     
    protected boolean
     
    protected long
     

    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
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    calculateLabelLocation(org.eclipse.draw2d.geometry.Point defaultLocation)
     
     
    int
     
    boolean
     
     
    protected org.eclipse.draw2d.geometry.Point
    getLabelLocation(int x, int y)
     
    protected org.eclipse.draw2d.geometry.Point
    getLabelLocation(org.eclipse.draw2d.geometry.Point defaultLocation)
     
     
     
     
     
     
    long
     
    void
     
    boolean
     
    boolean
     
    void
    setBit(int bit)
     
    void
    setBooleanValue(boolean value)
     
    void
     
    void
    setEnabled(boolean value)
     
    void
     
    void
    setOffColor(Color offColor)
     
    void
    setOffLabel(String offLabel)
     
    void
    setOnColor(Color onColor)
     
    void
    setOnLabel(String onLabel)
     
    void
    setShowBooleanLabel(boolean showBooleanLabel)
     
    void
     
    void
    setValue(double value)
     
    void
    setValue(long value)
     
    protected void
    update the boolValue from value and bit.
    protected void
    update the value from boolValue

    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, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, 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, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, 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, setFlag, setFocusTraversable, 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
  • Field Details

    • boolLabel

      protected org.eclipse.draw2d.Label boolLabel
    • value

      protected long value
    • bit

      protected int bit
    • showBooleanLabel

      protected boolean showBooleanLabel
    • booleanValue

      protected boolean booleanValue
    • onLabel

      protected String onLabel
    • offLabel

      protected String offLabel
    • boolLabelPosition

      protected AbstractBoolFigure.BoolLabelPosition boolLabelPosition
    • onColor

      protected Color onColor
    • offColor

      protected Color offColor
  • Constructor Details

    • AbstractBoolFigure

      protected AbstractBoolFigure()
  • Method Details

    • calculateLabelLocation

      protected void calculateLabelLocation(org.eclipse.draw2d.geometry.Point defaultLocation)
    • getBit

      public int getBit()
      Returns:
      the bit
    • getBooleanValue

      public boolean getBooleanValue()
      Returns:
      the boolValue
    • getLabelLocation

      protected org.eclipse.draw2d.geometry.Point getLabelLocation(int x, int y)
    • getLabelLocation

      protected org.eclipse.draw2d.geometry.Point getLabelLocation(org.eclipse.draw2d.geometry.Point defaultLocation)
      Parameters:
      defaultLocation - The default location.
      Returns:
      the location of the boolean label
    • getBoolLabelPosition

      public AbstractBoolFigure.BoolLabelPosition getBoolLabelPosition()
    • getOffColor

      public Color getOffColor()
      Returns:
      the offColor
    • getOffLabel

      public String getOffLabel()
      Returns:
      the offLabel
    • getOnColor

      public Color getOnColor()
      Returns:
      the onColor
    • getOnLabel

      public String getOnLabel()
      Returns:
      the onLabel
    • getValue

      public long getValue()
      Returns:
      the value
    • invalidate

      public void invalidate()
      Specified by:
      invalidate in interface org.eclipse.draw2d.IFigure
      Overrides:
      invalidate in class org.eclipse.draw2d.Figure
    • isOpaque

      public boolean isOpaque()
      Specified by:
      isOpaque in interface org.eclipse.draw2d.IFigure
      Overrides:
      isOpaque in class org.eclipse.draw2d.Figure
    • isShowBooleanLabel

      public boolean isShowBooleanLabel()
      Returns:
      the showBooleanLabel
    • setBit

      public void setBit(int bit)
      Parameters:
      bit - the bit to set
    • setBooleanValue

      public void setBooleanValue(boolean value)
    • setEnabled

      public void setEnabled(boolean value)
      Specified by:
      setEnabled in interface org.eclipse.draw2d.IFigure
      Overrides:
      setEnabled in class org.eclipse.draw2d.Figure
    • setFont

      public void setFont(Font f)
      Specified by:
      setFont in interface org.eclipse.draw2d.IFigure
      Overrides:
      setFont in class org.eclipse.draw2d.Figure
    • setBoolLabelPosition

      public void setBoolLabelPosition(AbstractBoolFigure.BoolLabelPosition labelPosition)
    • setOffColor

      public void setOffColor(Color offColor)
      Parameters:
      offColor - the offColor to set
    • setOffLabel

      public void setOffLabel(String offLabel)
      Parameters:
      offLabel - the offLabel to set
    • setOnColor

      public void setOnColor(Color onColor)
      Parameters:
      onColor - the onColor to set
    • setOnLabel

      public void setOnLabel(String onLabel)
      Parameters:
      onLabel - the onLabel to set
    • setShowBooleanLabel

      public void setShowBooleanLabel(boolean showBooleanLabel)
      Parameters:
      showBooleanLabel - the showBooleanLabel to set
    • setValue

      public void setValue(double value)
    • setValue

      public void setValue(long value)
    • updateBoolValue

      protected void updateBoolValue()
      update the boolValue from value and bit. All the boolValue based behavior changes should be implemented here by inheritance.
    • updateValue

      protected void updateValue()
      update the value from boolValue
    • getTotalBits

      public AbstractBoolFigure.TotalBits getTotalBits()
    • setTotalBits

      public void setTotalBits(AbstractBoolFigure.TotalBits totalBits)
      Parameters:
      totalBits - number of total bits
    • getBeanInfo

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