Class SpinnerFigure

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

public class SpinnerFigure extends org.eclipse.draw2d.Figure implements Introspectable
The figure for a spinner widget.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    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
     
     
    int
     
     
     
    double
     
    double
     
    double
     
    int
     
    double
     
    double
     
    boolean
     
    boolean
     
    protected void
     
    boolean
    manualSetValue(double value)
    Set Value from manual control of the widget.
    protected void
    Cause the spinner to decrease its value by its step increment;
    protected void
    Cause the spinner to increase its value by its step increment;
    void
     
    void
    setArrowButtonsHorizontal(boolean arrowButtonsHorizontal)
    Set the layout of the arrow buttons
    void
    setArrowButtonsOnLeft(boolean arrowButtonsOnLeft)
    Set the position of arrow buttons
    void
    setButtonWidth(int buttonWidth)
     
    void
    setDisplayValue(double value)
    Set the displayed value in the spinner.
    void
    setEnabled(boolean value)
     
    void
     
    void
    setMax(double max)
     
    void
    setMin(double min)
     
    void
    setPageIncrement(double pageIncrement)
     
    void
    setPrecision(int precision)
     
    void
    setStepIncrement(double stepIncrement)
     
    void
    setValue(double value)
    Set the value of the spinner.
    void
    showText(boolean isVisible)
    Show or hide the 'text' of the spinner.
    protected void
    Cause the spinner to decrease its value by its step increment;
    protected void
    Cause the spinner to increase its value by its step increment;

    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, 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

    • SpinnerFigure

      public SpinnerFigure()
  • Method Details

    • addManualValueChangeListener

      public void addManualValueChangeListener(IManualValueChangeListener listener)
    • getButtonWidth

      public int getButtonWidth()
      Returns:
      the buttonWidth
    • setButtonWidth

      public void setButtonWidth(int buttonWidth)
      Parameters:
      buttonWidth - the buttonWidth to set
    • getFormatType

      public SpinnerFigure.NumericFormatType getFormatType()
      Returns:
      the formatType
    • getLabelFigure

      public TextFigure getLabelFigure()
    • getMax

      public double getMax()
      Returns:
      the max
    • getMin

      public double getMin()
      Returns:
      the min
    • getPageIncrement

      public double getPageIncrement()
    • getPrecision

      public int getPrecision()
      Returns:
      the precision
    • getStepIncrement

      public double getStepIncrement()
      Returns:
      the stepIncrement
    • getValue

      public double getValue()
      Returns:
      the value
    • isArrowButtonsOnLeft

      public boolean isArrowButtonsOnLeft()
      Returns:
      true if arrow buttons on left side of the figure.
    • isArrowButtonsHorizontal

      public boolean isArrowButtonsHorizontal()
      Returns:
      true if arrow buttons layout is horizontal.
    • layout

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

      public boolean manualSetValue(double value)
      Set Value from manual control of the widget. Value will be coerced in range.
      Parameters:
      value -
    • pageDown

      protected void pageDown()
      Cause the spinner to decrease its value by its step increment;
    • pageUp

      protected void pageUp()
      Cause the spinner to increase its value by its step increment;
    • removeManualValueChangeListener

      public void removeManualValueChangeListener(IManualValueChangeListener listener)
    • setArrowButtonsOnLeft

      public void setArrowButtonsOnLeft(boolean arrowButtonsOnLeft)
      Set the position of arrow buttons
      Parameters:
      arrowButtonsOnLeft - true if on left.
    • setArrowButtonsHorizontal

      public void setArrowButtonsHorizontal(boolean arrowButtonsHorizontal)
      Set the layout of the arrow buttons
      Parameters:
      arrowButtonsHorizontal - true if horizontal.
    • setDisplayValue

      public void setDisplayValue(double value)
      Set the displayed value in the spinner. It may out of the range.
      Parameters:
      value - the value to be displayed
    • setEnabled

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

      public void setFormatType(SpinnerFigure.NumericFormatType formatType)
    • setMax

      public void setMax(double max)
      Parameters:
      max - the max to set
    • setMin

      public void setMin(double min)
      Parameters:
      min - the min to set
    • setPageIncrement

      public void setPageIncrement(double pageIncrement)
    • setPrecision

      public void setPrecision(int precision)
      Parameters:
      precision - the precision to set
    • setStepIncrement

      public void setStepIncrement(double stepIncrement)
      Parameters:
      stepIncrement - the stepIncrement to set
    • setValue

      public void setValue(double value)
      Set the value of the spinner. It will be coerced in the range. This only update the text. It will not notify listeners about the value change.
      Parameters:
      value - the value to set
    • stepDown

      protected void stepDown()
      Cause the spinner to decrease its value by its step increment;
    • stepUp

      protected void stepUp()
      Cause the spinner to increase its value by its step increment;
    • getBeanInfo

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

      public void showText(boolean isVisible)
      Show or hide the 'text' of the spinner. If False the spinner just shows the 'up' and 'down' buttons.
      Parameters:
      isVisible -