org.vishia.gral.swt

## Class SwtTabbedPanel

- java.lang.Object
- - org.vishia.gral.base.GralWidget.ImplAccess
  - - org.vishia.gral.base.GralPanelContent.ImplAccess
    - - org.vishia.gral.base.GralTabbedPanel.ImplAccess
      - - org.vishia.gral.swt.SwtTabbedPanel

- All Implemented Interfaces:
    GralWidgImpl_ifc

      public class SwtTabbedPanel
      extends GralTabbedPanel.ImplAccess

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) org.eclipse.swt.events.FocusListener` | `focusTabListener`
    `(package private) SwtMng` | `mng`
    `(package private) org.eclipse.swt.events.ControlListener` | `resizeItemListener`
    `(package private) org.eclipse.swt.events.ControlListener` | `resizeListener`
    `org.eclipse.swt.events.SelectionListener` | `tabItemSelectListener`
    `static int` | `version` Version, history and license.
    `(package private) org.eclipse.swt.widgets.TabFolder` | `widgetSwt` The Swt TabFolder implementation.

    - ### Fields inherited from class org.vishia.gral.base.GralTabbedPanel.ImplAccess

      `widgg`

    - ### Fields inherited from class org.vishia.gral.base.GralWidget.ImplAccess

      `chgBitsDerived, chgColorBack, chgColorLine, chgColorText, chgEditable, chgFloat, chgFocus, chgFont, chgIntg, chgInvisible, chgObjects, chgPos, chgText, chgVisible, chgVisibleInfo, pixBounds, wdgimpl`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwtTabbedPanel(GralTabbedPanel panelg, SwtMng mng, GralPanelActivated_ifc user, int property)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GralPanelContent` | `addCanvasPanel(GralPanelContent panelg, java.lang.String sLabel)`
    `GralPanelContent` | `addGridPanel(GralPanelContent panelg, java.lang.String sLabel, int yGrid, int xGrid, int yGrid2, int xGrid2)` Adds a grid-panel in the TabPanel.
    `GralRectangle` | `getPixelPositionSize()` Returns the absolute position of this panel on screen and its size.
    `GralRectangle` | `getPixelSize()` Returns the size of this panel in pixel.
    `org.eclipse.swt.widgets.Widget` | `getWidgetImplementation()` Returns the implementation class of the widget.
    `void` | `removeWidgetImplementation()` Removes the graphical widget in the graphic.
    `void` | `repaintGthread()` This method should be implemented in all Widget implementations of the adapter for the underlying graphic system.
    `GralPanelContent` | `selectTab(java.lang.String name)` See `GralWidget#setFocusGThread()`
    `void` | `setBoundsPixel(int x, int y, int dx, int dy)`
    `boolean` | `setFocusGThread()` Sets the focus to the widget.
    `void` | `setVisibleGThread(boolean bVisible)` Sets the implementation widget(s) visible state.
    `(package private) void` | `stop()`

    - ### Methods inherited from class org.vishia.gral.base.GralTabbedPanel.ImplAccess

      `getFocusedTab, setFocusedTab`

    - ### Methods inherited from class org.vishia.gral.base.GralPanelContent.ImplAccess

      `gralPanel`

    - ### Methods inherited from class org.vishia.gral.base.GralWidget.ImplAccess

      `acknChanged, actionShow, dyda, getActionChange, getChanged, gralWidgetFromImplData, setDragEnable, setDropEnable, setFocused, setTextChanged, setVisibleState, XXXfocusGained`

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

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

- - ### Field Detail

    - #### version

          public static final int version

      Version, history and license.
      - 2012-03-31 Hartmut new: supports `GralPanelContent.MethodsCalledbackFromImplementation#setVisibleState(boolean)`
      - 2011-06-00 Hartmut created
      Copyright/Copyleft:
      For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but doesn't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you intent to use this source without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### widgetSwt

          org.eclipse.swt.widgets.TabFolder widgetSwt

      The Swt TabFolder implementation.

    - #### mng

          final SwtMng mng

    - #### tabItemSelectListener

          public org.eclipse.swt.events.SelectionListener tabItemSelectListener

    - #### resizeListener

          org.eclipse.swt.events.ControlListener resizeListener

    - #### resizeItemListener

          org.eclipse.swt.events.ControlListener resizeItemListener

    - #### focusTabListener

          org.eclipse.swt.events.FocusListener focusTabListener

  - ### Constructor Detail

    - #### SwtTabbedPanel

          SwtTabbedPanel(GralTabbedPanel panelg,
                         SwtMng mng,
                         GralPanelActivated_ifc user,
                         int property)

  - ### Method Detail

    - #### addGridPanel

          public GralPanelContent addGridPanel(GralPanelContent panelg,
                                               java.lang.String sLabel,
                                               int yGrid,
                                               int xGrid,
                                               int yGrid2,
                                               int xGrid2)

      Description copied from class: `GralTabbedPanel.ImplAccess`
      Adds a grid-panel in the TabPanel. The panel will be registered in the GuiPanelMng, so the access to the panel can be done with its name. The position of the widget manager is set to full area of this panel.
      Specified by:
        `addGridPanel` in class `GralTabbedPanel.ImplAccess`
        `sLabel` - to designate the tab for view. A "&" left from a character determines the hot-key to select the tab.
        `yGrid` - number of units per grid line vertical. It may be 1.
        `xGrid` - number of units per grid line horizontal. It may be 1.
        `yGrid2` - Number of grid lines vertical per wider ranges for lines
        `xGrid2` - Number of grid lines horizontal per wider ranges for lines
      Returns:

    - #### addCanvasPanel

          public GralPanelContent addCanvasPanel(GralPanelContent panelg,
                                                 java.lang.String sLabel)

      Specified by:
        `addCanvasPanel` in class `GralTabbedPanel.ImplAccess`

    - #### selectTab

          public GralPanelContent selectTab(java.lang.String name)

      See `GralWidget#setFocusGThread()`
      Specified by:
        `selectTab` in class `GralTabbedPanel.ImplAccess`
      Returns:
      See Also:
        `GralTabbedPanel.selectTab(java.lang.String)`

    - #### getWidgetImplementation

          public org.eclipse.swt.widgets.Widget getWidgetImplementation()

      Description copied from interface: `GralWidgImpl_ifc`
      Returns the implementation class of the widget. If the widget has more as one implementation widgets, this method returns one of the widgets, usual the first important one respectively that widget which represents the implementation layer. A widget of the implementation layer is a SWT.control or a `Component`.
      If more as one widget are part of the GralWidget, use the special `GralWidget._wdgImpl` class which should contain the references to that implementation widgets.

    - #### getPixelPositionSize

          public GralRectangle getPixelPositionSize()

      Description copied from class: `GralPanelContent.ImplAccess`
      Returns the absolute position of this panel on screen and its size. If it is a main window, the useable area of the window without title and menu bar is returned.
      Specified by:
        `getPixelPositionSize` in interface `GralWidgImpl_ifc`
      Specified by:
        `getPixelPositionSize` in class `GralPanelContent.ImplAccess`

    - #### setFocusGThread

          public boolean setFocusGThread()

      Description copied from interface: `GralWidgImpl_ifc`
      Sets the focus to the widget. See `GralMng_ifc#setFocus(GralWidget)`.
      Returns:
        true if it has the focus after this operation. false on any error.

    - #### setVisibleGThread

          public void setVisibleGThread(boolean bVisible)

      Description copied from interface: `GralWidgImpl_ifc`
      Sets the implementation widget(s) visible state. The widgets are really invisible, or they are visible in principle, but they can be covered by other windows or clipping. This method should set the `GralWidget.bVisibleState` too. Therewith it is able to quest `GralWidget.isVisible()` in any thread.
      Parameters:
        `bVisible` - true then the widget should be visible, false it is set to invisible.

    - #### setBoundsPixel

          public void setBoundsPixel(int x,
                                     int y,
                                     int dx,
                                     int dy)

    - #### repaintGthread

          public void repaintGthread()

      Description copied from interface: `GralWidgImpl_ifc`
      This method should be implemented in all Widget implementations of the adapter for the underlying graphic system.
      Implementation hints: In SWT it should call redraw().
      It is possible that the widget consists of more as one graphical widget, then all of it should be redrawn. It is possible that some data are set in another thread, they should be applied to the widgets firstly. It is possible that the widget is removed though a repaintGthread-order is pending from the time before deleting, for example if the graphic layout is changed.
      See `#repaintRequ`

    - #### removeWidgetImplementation

          public void removeWidgetImplementation()

      Description copied from interface: `GralWidgImpl_ifc`
      Removes the graphical widget in the graphic.

    - #### stop

          void stop()

    - #### getPixelSize

          public GralRectangle getPixelSize()

      Description copied from class: `GralPanelContent.ImplAccess`
      Returns the size of this panel in pixel.
      Specified by:
        `getPixelSize` in class `GralPanelContent.ImplAccess`
      Returns:
        the x and y is 0, the dy and dy is the size.