Package org.csstudio.swt.widgets.figures
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
LED figure
-
Nested Class Summary
Nested classes/interfaces inherited from class org.csstudio.swt.widgets.figures.AbstractBoolFigure
AbstractBoolFigure.BoolLabelPosition, AbstractBoolFigure.TotalBits
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
Modifier and TypeFieldDescriptionstatic final Color
static final int
static final Color[]
static final Color
static final String
static final String[]
static final double[]
static final int
Fields inherited from class org.csstudio.swt.widgets.figures.AbstractBoolFigure
bit, booleanValue, boolLabel, boolLabelPosition, offColor, offLabel, onColor, onLabel, showBooleanLabel, value
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
-
Method Summary
Modifier and TypeMethodDescriptionint
getStateColor
(int idx) getStateLabel
(int idx) getStateValue
(int idx) boolean
boolean
protected void
layout()
protected void
paintClientArea
(org.eclipse.draw2d.Graphics graphics) void
setBulbBorderColor
(Color bulbBorderColor) void
setBulbBorderWidth
(int bulbBorderWidth) protected void
setBulbColorAndLabel
(Color color, String label) void
setEffect3D
(boolean effect3D) void
setNStates
(int nStates) void
setOffColor
(Color offColor) void
setOnColor
(Color onColor) void
setSquareLED
(boolean squareLED) void
setStateColor
(int idx, Color color) void
setStateFallbackColor
(Color color) void
setStateFallbackLabel
(String label) void
setStateLabel
(int idx, String label) void
setStateValue
(int idx, double value) void
setValue
(double value) void
setValue
(long value) protected void
update the boolValue from value and bit.protected void
Methods inherited from class org.csstudio.swt.widgets.figures.AbstractBoolFigure
calculateLabelLocation, getBeanInfo, getBit, getBooleanValue, getBoolLabelPosition, getLabelLocation, getLabelLocation, getOffColor, getOffLabel, getOnColor, getOnLabel, getTotalBits, getValue, invalidate, isOpaque, isShowBooleanLabel, setBit, setBooleanValue, setBoolLabelPosition, setEnabled, setFont, setOffLabel, setOnLabel, setShowBooleanLabel, setTotalBits, updateValue
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, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, optimizeClip, paint, paintBorder, paintChildren, 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
-
Field Details
-
MAX_NSTATES
public static final int MAX_NSTATES- See Also:
-
DEFAULT_STATE_LABELS
-
DEFAULT_STATE_COLORS
-
DEFAULT_STATE_VALUES
public static final double[] DEFAULT_STATE_VALUES -
DEFAULT_STATE_FALLBACK_LABAL
- See Also:
-
DEFAULT_STATE_FALLBACK_COLOR
-
DEFAULT_BULB_BORDER_WIDTH
public static final int DEFAULT_BULB_BORDER_WIDTH- See Also:
-
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 classorg.eclipse.draw2d.Figure
-
paintClientArea
protected void paintClientArea(org.eclipse.draw2d.Graphics graphics) - Overrides:
paintClientArea
in classorg.eclipse.draw2d.Figure
-
setEffect3D
public void setEffect3D(boolean effect3D) - Parameters:
effect3D
- the effect3D to set
-
setOffColor
- Overrides:
setOffColor
in classAbstractBoolFigure
- Parameters:
offColor
- the offColor to set
-
setOnColor
- Overrides:
setOnColor
in classAbstractBoolFigure
- 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 classAbstractBoolFigure
-
getNStates
public int getNStates() -
setNStates
public void setNStates(int nStates) -
getStateFallbackColor
-
setStateFallbackColor
-
getStateFallbackLabel
-
setStateFallbackLabel
-
getStateColor
-
setStateColor
-
getStateLabel
-
setStateLabel
-
getStateValue
-
setStateValue
public void setStateValue(int idx, double value) -
setValue
public void setValue(double value) - Overrides:
setValue
in classAbstractBoolFigure
- Parameters:
value
- the value to set
-
setValue
public void setValue(long value) - Overrides:
setValue
in classAbstractBoolFigure
- Parameters:
value
- the value to set
-
updateStateValue
protected void updateStateValue() -
setBulbColorAndLabel
-
setBulbBorderWidth
public void setBulbBorderWidth(int bulbBorderWidth) -
setBulbBorderColor
-