org.eclipse.eef.properties.ui.internal.page.propertylist

## Class EEFTabbedPropertyList

- java.lang.Object
- - org.eclipse.swt.widgets.Widget
  - - org.eclipse.swt.widgets.Control
    - - org.eclipse.swt.widgets.Scrollable
      - - org.eclipse.swt.widgets.Composite
        - - org.eclipse.eef.properties.ui.internal.page.propertylist.EEFTabbedPropertyList

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

    public class EEFTabbedPropertyList
    extends org.eclipse.swt.widgets.Composite

Shows the list of tabs in the tabbed property sheet page.

### Field Summary

Fields
`static int` `INDENT` The number of spaces used to indent a tab.
`static int` `NONE` This constant is used to indicate NONE (for example the index of the currently selected tab).

### Fields inherited from class org.eclipse.swt.widgets.Control

`view`

### Constructor Summary

Constructors
Constructor and Description
`EEFTabbedPropertyList(org.eclipse.swt.widgets.Composite parent, EEFWidgetFactory widgetFactory)` The constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`org.eclipse.swt.graphics.Point` `computeSize(int wHint, int hHint, boolean changed)`
`protected void` `computeTabsThatFitInComposite()` Calculate the number of tabs that will fit in the tab list composite.
`void` `deselectAll()` Deselects all the elements in the list.
`EEFBottomNavigationElement` `getBottomNavigationElement()` Return the bottomNavigationElement.
`int` `getBottomVisibleIndex()` Return the bottomVisibleIndex.
`EEFTabbedPropertyListColorHolder` `getColorHolder()`
`EEFListElement` `getElementAt(int index)` Returns the element with the given index from this list viewer.
`boolean` `getFocus()` Return the focus.
`int` `getNumberOfElements()` Returns the number of elements in this list viewer.
`int` `getSelectionIndex()` Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected.
`EEFTopNavigationElement` `getTopNavigationElement()` Return the topNavigationElement.
`int` `getTopVisibleIndex()` Return the topVisibleIndex.
`int` `getWidestLabelIndex()` Returns zero-relative index of the widest item, or -1 if this list is empty.
`boolean` `isDownScrollRequired()` Determine if a downward scrolling is required.
`boolean` `isUpScrollRequired()` Determine if an upward scrolling is required.
`void` `layoutTabs()` Layout the tabs.
`void` `removeAll()` Remove all the elements from this list.
`void` `select(int index)` Selects one of the elements in the list.
`void` `setBottomVisibleIndex(int bottomVisibleIndex)` Sets the bottomVisibleIndex.
`void` `setDynamicImageCount(java.util.Map<IEEFTabItem,java.lang.Integer> map)` Sets a map containing an IEEFTabItem as key and number of dynamic images as value.
`void` `setElements(java.lang.Object[] children)` Sets the new list elements.
`void` `setFocus(boolean focus)` Sets the focus.
`void` `setTopVisibleIndex(int topVisibleIndex)` Sets the topVisibleIndex.

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

### Methods inherited from class org.eclipse.swt.widgets.Scrollable

`computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar`

### Methods inherited from class org.eclipse.swt.widgets.Control

`addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update`

### Methods inherited from class org.eclipse.swt.widgets.Widget

`addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### NONE

    public static final int NONE

This constant is used to indicate NONE (for example the index of the currently selected tab).

See Also:
  Constant Field Values

#### INDENT

    public static final int INDENT

The number of spaces used to indent a tab.

See Also:
  Constant Field Values

### Constructor Detail

#### EEFTabbedPropertyList

    public EEFTabbedPropertyList(org.eclipse.swt.widgets.Composite parent,
                                 EEFWidgetFactory widgetFactory)

The constructor.

Parameters:
  `parent` - The parent composite
  `widgetFactory` - The widget factory

### Method Detail

#### removeAll

    public void removeAll()

Remove all the elements from this list.

#### computeTabsThatFitInComposite

    protected void computeTabsThatFitInComposite()

Calculate the number of tabs that will fit in the tab list composite.

#### getNumberOfElements

    public int getNumberOfElements()

Returns the number of elements in this list viewer.

Returns:
  number of elements

#### getElementAt

    public EEFListElement getElementAt(int index)

Returns the element with the given index from this list viewer. Returns `null` if the index is out of range.

Parameters:
  `index` - the zero-based index
Returns:
  the element at the given index, or `null` if the index is out of range

#### getSelectionIndex

    public int getSelectionIndex()

Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected.

Returns:
  the index of the selected item

#### getWidestLabelIndex

    public int getWidestLabelIndex()

Returns zero-relative index of the widest item, or -1 if this list is empty.

Returns:
  zero-relative index of the widest item, or -1 if this list is empty.

#### setDynamicImageCount

    public void setDynamicImageCount(java.util.Map<IEEFTabItem,java.lang.Integer> map)

Sets a map containing an IEEFTabItem as key and number of dynamic images as value. It is used to calculate the width of the widest tab by setting aside enough space (16 pixels per image) for displaying the dynamic images. Individual dynamic images are displayed/removed from a tab by using the showDynamicImage() and hideDynamicImage() methods on the tab's ListElement object.

Parameters:
  `map` - The new map of tabs to dynamic image count

#### setElements

    public void setElements(java.lang.Object[] children)

Sets the new list elements.

Parameters:
  `children` - The children

#### select

    public void select(int index)

Selects one of the elements in the list.

Parameters:
  `index` - the index of the element to select.

#### deselectAll

    public void deselectAll()

Deselects all the elements in the list.

#### computeSize

    public org.eclipse.swt.graphics.Point computeSize(int wHint,
                                                      int hHint,
                                                      boolean changed)

Overrides:
  `computeSize` in class `org.eclipse.swt.widgets.Composite`
See Also:
  `Composite.computeSize(int, int, boolean)`

#### isDownScrollRequired

    public boolean isDownScrollRequired()

Determine if a downward scrolling is required.

Returns:
  true if downward scrolling is required.

#### isUpScrollRequired

    public boolean isUpScrollRequired()

Determine if an upward scrolling is required.

Returns:
  true if upward scrolling is required.

#### layoutTabs

    public void layoutTabs()

Layout the tabs.

#### getColorHolder

    public EEFTabbedPropertyListColorHolder getColorHolder()

#### getTopVisibleIndex

    public int getTopVisibleIndex()

Return the topVisibleIndex.

Returns:
  the topVisibleIndex

#### setTopVisibleIndex

    public void setTopVisibleIndex(int topVisibleIndex)

Sets the topVisibleIndex.

Parameters:
  `topVisibleIndex` - the topVisibleIndex to set

#### getBottomVisibleIndex

    public int getBottomVisibleIndex()

Return the bottomVisibleIndex.

Returns:
  the bottomVisibleIndex

#### setBottomVisibleIndex

    public void setBottomVisibleIndex(int bottomVisibleIndex)

Sets the bottomVisibleIndex.

Parameters:
  `bottomVisibleIndex` - the bottomVisibleIndex to set

#### getTopNavigationElement

    public EEFTopNavigationElement getTopNavigationElement()

Return the topNavigationElement.

Returns:
  the topNavigationElement

#### getBottomNavigationElement

    public EEFBottomNavigationElement getBottomNavigationElement()

Return the bottomNavigationElement.

Returns:
  the bottomNavigationElement

#### getFocus

    public boolean getFocus()

Return the focus.

Returns:
  the focus

#### setFocus

    public void setFocus(boolean focus)

Sets the focus.

Parameters:
  `focus` - the focus to set