Class LEDFigure

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

public class LEDFigure extends AbstractBoolFigure
LED figure
  • Field Details

    • MAX_NSTATES

      public static final int MAX_NSTATES
      See Also:
    • DEFAULT_STATE_LABELS

      public static final String[] DEFAULT_STATE_LABELS
    • DEFAULT_STATE_COLORS

      public static final Color[] DEFAULT_STATE_COLORS
    • DEFAULT_STATE_VALUES

      public static final double[] DEFAULT_STATE_VALUES
    • DEFAULT_STATE_FALLBACK_LABAL

      public static final String DEFAULT_STATE_FALLBACK_LABAL
      See Also:
    • DEFAULT_STATE_FALLBACK_COLOR

      public static final Color DEFAULT_STATE_FALLBACK_COLOR
    • DEFAULT_BULB_BORDER_WIDTH

      public static final int DEFAULT_BULB_BORDER_WIDTH
      See Also:
    • DEFAULT_BULB_BORDER_COLOR

      public static final Color DEFAULT_BULB_BORDER_COLOR
  • Constructor Details

    • LEDFigure

      public LEDFigure()
  • Method Details

    • isEffect3D

      public boolean isEffect3D()
    • isSquareLED

      public boolean isSquareLED()
    • layout

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

      protected void paintClientArea(org.eclipse.draw2d.Graphics graphics)
      Overrides:
      paintClientArea in class org.eclipse.draw2d.Figure
    • setEffect3D

      public void setEffect3D(boolean effect3D)
      Parameters:
      effect3D - the effect3D to set
    • setOffColor

      public void setOffColor(Color offColor)
      Overrides:
      setOffColor in class AbstractBoolFigure
      Parameters:
      offColor - the offColor to set
    • setOnColor

      public void setOnColor(Color onColor)
      Overrides:
      setOnColor in class AbstractBoolFigure
      Parameters:
      onColor - the onColor to set
    • setSquareLED

      public void setSquareLED(boolean squareLED)
    • updateBoolValue

      protected void updateBoolValue()
      Description copied from class: AbstractBoolFigure
      update the boolValue from value and bit. All the boolValue based behavior changes should be implemented here by inheritance.
      Overrides:
      updateBoolValue in class AbstractBoolFigure
    • getNStates

      public int getNStates()
    • setNStates

      public void setNStates(int nStates)
    • getStateFallbackColor

      public Color getStateFallbackColor()
    • setStateFallbackColor

      public void setStateFallbackColor(Color color)
    • getStateFallbackLabel

      public String getStateFallbackLabel()
    • setStateFallbackLabel

      public void setStateFallbackLabel(String label)
    • getStateColor

      public Color getStateColor(int idx)
    • setStateColor

      public void setStateColor(int idx, Color color)
    • getStateLabel

      public String getStateLabel(int idx)
    • setStateLabel

      public void setStateLabel(int idx, String label)
    • getStateValue

      public Double getStateValue(int idx)
    • setStateValue

      public void setStateValue(int idx, double value)
    • setValue

      public void setValue(double value)
      Overrides:
      setValue in class AbstractBoolFigure
      Parameters:
      value - the value to set
    • setValue

      public void setValue(long value)
      Overrides:
      setValue in class AbstractBoolFigure
      Parameters:
      value - the value to set
    • updateStateValue

      protected void updateStateValue()
    • setBulbColorAndLabel

      protected void setBulbColorAndLabel(Color color, String label)
    • setBulbBorderWidth

      public void setBulbBorderWidth(int bulbBorderWidth)
    • setBulbBorderColor

      public void setBulbBorderColor(Color bulbBorderColor)