Class ArrayFigure

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

public class ArrayFigure extends org.eclipse.draw2d.Figure implements Introspectable
The figure for array widget.
  • Nested Class Summary

    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
     
    protected org.eclipse.draw2d.geometry.Dimension
    Calculate the preferred size based current layout and elements' size.
    int
    calcVisibleElementsCount(org.eclipse.draw2d.geometry.Dimension elementSize)
    Calculate the number of visible elements that the array pane can hold.
    org.eclipse.draw2d.geometry.Dimension
    calcWidgetSizeForElements(int visibleElementsCount, org.eclipse.draw2d.geometry.Dimension elementSize)
    Calculate the proposed widget size for the proposed visible elements count.
    protected void
    fireIndexChanged(int newIndex)
     
    int
     
     
    org.eclipse.draw2d.IFigure
     
    org.eclipse.draw2d.geometry.Dimension
     
    int
     
    org.eclipse.draw2d.geometry.Dimension
    getPreferredSize(int wHint, int hHint)
     
     
    int
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    protected void
     
    void
    setArrayLength(int arrayLength)
     
    void
    setCursor(Cursor cursor)
     
    void
    setEnabled(boolean value)
     
    void
    setHorizontal(boolean horizontal)
     
    void
    setIndex(int index)
     
    void
    setShowScrollbar(boolean showScrollbar)
     
    void
    setShowSpinner(boolean showSpinner)
     
    void
    setSpinnerWidth(int spinnerWidth)
     
    protected void
     

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

    • ArrayFigure

      public ArrayFigure()
  • Method Details

    • addIndexChangeListener

      public void addIndexChangeListener(IManualValueChangeListener listener)
    • fireIndexChanged

      protected void fireIndexChanged(int newIndex)
    • getArrayLength

      public int getArrayLength()
    • getBeanInfo

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

      public org.eclipse.draw2d.IFigure getContentPane()
      Returns:
      the content pane to hold array element widgets.
    • getIndex

      public int getIndex()
    • getSpinner

      public SpinnerFigure getSpinner()
    • getSpinnerWidth

      public int getSpinnerWidth()
    • calcVisibleElementsCount

      public int calcVisibleElementsCount(org.eclipse.draw2d.geometry.Dimension elementSize)
      Calculate the number of visible elements that the array pane can hold. This is a round number since the array pane will not fit an integer number of elements. The client should call calcWidgetSizeForElements(int, Dimension) to get the proposed size this number of elements.
      Parameters:
      elementSize - size of element.
      Returns:
    • calcWidgetSizeForElements

      public org.eclipse.draw2d.geometry.Dimension calcWidgetSizeForElements(int visibleElementsCount, org.eclipse.draw2d.geometry.Dimension elementSize)
      Calculate the proposed widget size for the proposed visible elements count.
      Parameters:
      visibleElementsCount - number of visible elements.
      elementSize - size of element.
      Returns:
    • getElementSize

      public org.eclipse.draw2d.geometry.Dimension getElementSize()
      Returns:
      each element widget's size. If no children, return null.
    • getVisibleElementsCount

      public int getVisibleElementsCount()
    • isHorizontal

      public boolean isHorizontal()
    • isShowIndexSpinner

      public boolean isShowIndexSpinner()
    • isShowScrollbar

      public boolean isShowScrollbar()
    • calculatePreferredSize

      protected org.eclipse.draw2d.geometry.Dimension calculatePreferredSize()
      Calculate the preferred size based current layout and elements' size.
    • getPreferredSize

      public org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint, int hHint)
      Specified by:
      getPreferredSize in interface org.eclipse.draw2d.IFigure
      Overrides:
      getPreferredSize in class org.eclipse.draw2d.Figure
    • layout

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

      public void setArrayLength(int arrayLength)
    • setCursor

      public void setCursor(Cursor cursor)
      Specified by:
      setCursor in interface org.eclipse.draw2d.IFigure
      Overrides:
      setCursor in class org.eclipse.draw2d.Figure
    • setEnabled

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

      public void setHorizontal(boolean horizontal)
    • setIndex

      public void setIndex(int index)
    • updateElementsEnability

      protected void updateElementsEnability()
    • setShowSpinner

      public void setShowSpinner(boolean showSpinner)
    • setShowScrollbar

      public void setShowScrollbar(boolean showScrollbar)
    • setSpinnerWidth

      public void setSpinnerWidth(int spinnerWidth)