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.TotalBitsNested classes/interfaces inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch, org.eclipse.draw2d.Figure.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsets -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Colorstatic final intstatic final Color[]static final Colorstatic final Stringstatic final String[]static final double[]static final intFields inherited from class org.csstudio.swt.widgets.figures.AbstractBoolFigure
bit, booleanValue, boolLabel, boolLabelPosition, offColor, offLabel, onColor, onLabel, showBooleanLabel, valueFields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetStateColor(int idx) getStateLabel(int idx) getStateValue(int idx) booleanbooleanprotected voidlayout()protected voidpaintClientArea(org.eclipse.draw2d.Graphics graphics) voidsetBulbBorderColor(Color bulbBorderColor) voidsetBulbBorderWidth(int bulbBorderWidth) protected voidsetBulbColorAndLabel(Color color, String label) voidsetEffect3D(boolean effect3D) voidsetNStates(int nStates) voidsetOffColor(Color offColor) voidsetOnColor(Color onColor) voidsetSquareLED(boolean squareLED) voidsetStateColor(int idx, Color color) voidsetStateFallbackColor(Color color) voidsetStateFallbackLabel(String label) voidsetStateLabel(int idx, String label) voidsetStateValue(int idx, double value) voidsetValue(double value) voidsetValue(long value) protected voidupdate the boolValue from value and bit.protected voidMethods 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, updateValueMethods 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:
layoutin classorg.eclipse.draw2d.Figure
-
paintClientArea
protected void paintClientArea(org.eclipse.draw2d.Graphics graphics) - Overrides:
paintClientAreain classorg.eclipse.draw2d.Figure
-
setEffect3D
public void setEffect3D(boolean effect3D) - Parameters:
effect3D- the effect3D to set
-
setOffColor
- Overrides:
setOffColorin classAbstractBoolFigure- Parameters:
offColor- the offColor to set
-
setOnColor
- Overrides:
setOnColorin classAbstractBoolFigure- Parameters:
onColor- the onColor to set
-
setSquareLED
public void setSquareLED(boolean squareLED) -
updateBoolValue
protected void updateBoolValue()Description copied from class:AbstractBoolFigureupdate the boolValue from value and bit. All the boolValue based behavior changes should be implemented here by inheritance.- Overrides:
updateBoolValuein 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:
setValuein classAbstractBoolFigure- Parameters:
value- the value to set
-
setValue
public void setValue(long value) - Overrides:
setValuein classAbstractBoolFigure- Parameters:
value- the value to set
-
updateStateValue
protected void updateStateValue() -
setBulbColorAndLabel
-
setBulbBorderWidth
public void setBulbBorderWidth(int bulbBorderWidth) -
setBulbBorderColor
-