Class PWTabContainer

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

    class PWTabContainer
    extends org.eclipse.swt.widgets.Composite
    Instances of this class are a container that allows the user to select a tab
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.swt.widgets.Composite buttonContainer  
      private java.util.List<FlatButton> buttons  
      private org.eclipse.swt.widgets.Composite container  
      private org.eclipse.swt.graphics.Image oldButtonContainerImage  
      private java.util.List<PWTab> tabs  
      • Fields inherited from class org.eclipse.swt.widgets.Composite

        embeddedHandle
      • Fields inherited from class org.eclipse.swt.widgets.Widget

        handle
    • Constructor Summary

      Constructors 
      Constructor Description
      PWTabContainer​(org.eclipse.swt.widgets.Composite parent, int style, java.util.List<PWTab> tabs)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void build()
      Build the container
      private void createButtons()
      Create the buttons
      private void createButtonsContainer()
      Create the buttons container
      private void createButtonsContainerBackground()
      Create the background of the container
      private void createContainer()
      Create the container
      private void createContentContainer()
      Create the content container, ie the composite that will contain all widgets
      (package private) void select​(int index)
      Select a given button
      • 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, 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

      • tabs

        private final java.util.List<PWTab> tabs
      • container

        private org.eclipse.swt.widgets.Composite container
      • oldButtonContainerImage

        private org.eclipse.swt.graphics.Image oldButtonContainerImage
      • buttons

        private final java.util.List<FlatButton> buttons
      • buttonContainer

        private org.eclipse.swt.widgets.Composite buttonContainer
    • Constructor Detail

      • PWTabContainer

        PWTabContainer​(org.eclipse.swt.widgets.Composite parent,
                       int style,
                       java.util.List<PWTab> tabs)
        Constructor
        Parameters:
        parent - parent composite
        style - style (not used)
        tabs - list of tabs
    • Method Detail

      • build

        void build()
        Build the container
      • createButtonsContainer

        private void createButtonsContainer()
        Create the buttons container
      • createContainer

        private void createContainer()
        Create the container
      • createButtonsContainerBackground

        private void createButtonsContainerBackground()
        Create the background of the container
      • createButtons

        private void createButtons()
        Create the buttons
      • select

        void select​(int index)
        Select a given button
        Parameters:
        index - index of the selected button
      • createContentContainer

        private void createContentContainer()
        Create the content container, ie the composite that will contain all widgets