org.vishia.gral.base

## Class GralTabbedPanel

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

- All Implemented Interfaces:
    GetGralWidget_ifc, GralSetValue_ifc, GralVisibleWidgets_ifc, GralWidget_ifc, Removeable

      public class GralTabbedPanel
      extends GralPanelContent
      implements GralVisibleWidgets_ifc

  This class is the common base class for Tabbed-Panels. A TabbbedPanel is the container for Tabs. It doesn't contain other widgets than Tabs. It is a `GralPanelContent` because it can be used as one of the areas in `GralArea9Window`. It is a `GralWidget` because it is used as one member inside another Panel. The Implementation of this class should create a swt.TabFolder or adequate A Tab inside the TabPanel is a Panel.
  Concepts in base graphic:
  - SWT: TabFolder, TabItem
  - Swing: TabbedPane

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GralTabbedPanel.ImplAccess`

    - ### Nested classes/interfaces inherited from class org.vishia.gral.base.GralPanelContent

      `GralPanelContent.MethodsCalledbackFromImplementation`

    - ### Nested classes/interfaces inherited from class org.vishia.gral.base.GralWidget

      `GralWidget.ActionChangeSelect, GralWidget.ConfigData, GralWidget.DynamicData`

    - ### Nested classes/interfaces inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.List<GralWidget>` | `newWidgetsVisible` Deprecated.
    `GralPanelActivated_ifc` | `notifyingUserInstanceWhileSelectingTab`
    `protected java.util.Map<java.lang.String,GralPanelContent>` | `panels`
    `static int` | `version` The version and history: 2013-10-22 Hartmut bugfix: `#setMngToTabbedPanel()` necessary because a new Tab should refer to this parent.
    `java.util.List<GralWidget>` | `widgetsVisible` Deprecated.

    - ### Fields inherited from class org.vishia.gral.base.GralPanelContent

      `bGridZoomed, bZoomed, canvas, primaryWidget, widgetList, widgetsToResize`

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

      `_wdgImpl, bEditable, bHasFocus, bShouldInitialize, buildMng, bVisibleState, cfg, contextMenu, dateUser, dyda, htmlHelp, itsMng, lastTimeSetVisible, name, repaintDelay, repaintDelayMax, sCmd, sFormat, sToolTip, sVersion, whatIs`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `sVersion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralTabbedPanel(java.lang.String posString, java.lang.String sName, GralPanelActivated_ifc user, int property)` The constructor can only be invoked from a implementing class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `GralPanelContent` | `addCanvasPanel(java.lang.String sName, java.lang.String sLabel)`
    `GralPanelContent` | `addGridPanel(java.lang.String sName, java.lang.String sLabel, int yGrid, int xGrid, int yGrid2, int xGrid2)` Adds a grid-panel in the TabPanel.
    `GralPanelContent` | `getFocusedTab()`
    `java.util.List<GralWidget>` | `getWidgetsVisible()` Deprecated.
    `(package private) boolean` | `removePanel(GralPanelContent panel)`
    `boolean` | `removePanel(java.lang.String namePanel)` Removes the named panel from this panel container.
    `GralPanelContent` | `selectTab(java.lang.String name)`
    `void` | `setVisibleState(boolean visible)` Sets the visible state to all widgets of the panel, but not to windows (that is only in the primaryWindow)

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

      `addWidget, createImplWidget_Gthread, getTextFrom, getWidget, getWidgetImplementation, getWidgetList, remove, removeWidget, setPrimaryWidget, setTextIn, toString, widgetList, XXXsetFocusGThread`

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

      `chgPos, clearShowParam, getActionChange, getActionChangeStrict, getActionDrag, getActionDrop, getActionFocused, getActionShow, getBackColor, getCfgElement, getCmd, getCmd, getContentIdent, getContentInfo, getContextMenu, getData, getDataIx, getDataPath, getDataPath, getFloatValue, getFormat, getGralWidget, getHtmlHelp, getImpl, getItsPanel, getLongValue, getName, getShowMethod, getShowParam, getsToolTip, getText, getValue, getVariable, getVariableFromContentInfo, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, pos, refreshFromVariable, refreshFromVariable, registerWidget, repaint, repaint, requestNewValueForVariable, setActionChange, setActionFocused, setActionMouse, setActionShow, setBackColor, setBackgroundColor, setBoundsPixel, setCfgElement, setCmd, setContentIdent, setContentInfo, setData, setDataIx, setDataPath, setDragEnable, setDropEnable, setEditable, setFocus, setFocus, setForegroundColor, setFormat, setHtmlHelp, setLineColor, setLongValue, setMinMax, setPanelMng, setPrimaryWidgetOfPanel, setText, setTextColor, setToolTip, setToPanel, setValue, setValue, setValue, setValue, setVisible, setVisibleStateWidget, specifyActionChange, specifyContextMenu, stop, XXXgetPixelPositionSize, XXXgetWidgetImplementation, XXXremoveWidgetImplementation, XXXrepaintGthread, XXXsetVisibleGThread`

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

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

    - ### Methods inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `getActionChange, getBackColor, getCmd, getContentIdent, getContentInfo, getData, getDataPath, getName, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, refreshFromVariable, refreshFromVariable, repaint, repaint, setBackColor, setBackgroundColor, setBoundsPixel, setCmd, setContentIdent, setData, setDataPath, setEditable, setFocus, setFocus, setForegroundColor, setHtmlHelp, setLineColor, setText, setTextColor, setToPanel, setVisible`

- - ### Field Detail

    - #### version

          public static final int version

      The version and history:
      - 2013-10-22 Hartmut bugfix: `#setMngToTabbedPanel()` necessary because a new Tab should refer to this parent. On `addCanvasPanel(String, String)` or `addGridPanel(String, String, int, int, int, int)` the mng should refer this as `GralMng.pos()`.parent.
      - 2012-01-08 Hartmut new: `removePanel(String)`
      - 2011-11-07 Hartmut chg: a TabbedPanel is a GralWidget too,
      - 2011-10-01 Hartmut new: abstract method `selectTab(String)`.
      - 2011-09-10 Hartmut chg: move this class from gral/gridPanel/TabPanel to gral/base/GralTabbedPanel Reason: it isn't a concept of the grid panel but a basic concept of gral. It hasn't any dependencies to gridPanel.
      - 2011-09-08 Hartmut chg: The `widgetsVisible` were stored in the GuiPanelMngBase before. But an application can have more as one tabbed panel, and any of them can change the visible widgets while changing the tab. The visible widgets are not an concpet of the grid panel manager but a topic of the panel content. It is not a question of one PanelContent but a question of the TabbedPanel which contains some panels.
      - 2011-08-31 Hartmut chg: The `#focusedTab` and `getFocusedTab()` is moved from GuiPanelMngBase to here. Reason: One application can have more as one tabbed panel.
      - 2011-05-26 Hartmut chg: `addCanvasPanel(String, String)` now returns `GralPanelContent` instead an untyped Object.
      - 2010-05-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 ist 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 don'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 are indent to use this sources without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### notifyingUserInstanceWhileSelectingTab

          public final GralPanelActivated_ifc notifyingUserInstanceWhileSelectingTab

    - #### panels

          protected final java.util.Map<java.lang.String,GralPanelContent> panels

    - #### widgetsVisible

          @Deprecated
          public java.util.List<GralWidget> widgetsVisible

      Deprecated.
      The actual widgets in the visible panel. It may a sub-panel or changed content. The list can be changed.

    - #### newWidgetsVisible

          @Deprecated
          public java.util.List<GralWidget> newWidgetsVisible

      Deprecated.
      A new list of actual widgets, set while select another tab etc. The reference may be set in the GUI-Thread (GUI-listener). The communication-manager thread reads whether it isn't null, processes it and sets this reference to null if it is processed.

  - ### Constructor Detail

    - #### GralTabbedPanel

          public GralTabbedPanel(java.lang.String posString,
                                 java.lang.String sName,
                                 GralPanelActivated_ifc user,
                                 int property)

      The constructor can only be invoked from a implementing class.
      Parameters:
        `user` -

  - ### Method Detail

    - #### getFocusedTab

          public GralPanelContent getFocusedTab()

    - #### addGridPanel

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

      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.
      Parameters:
        `sName` - The name, used in
        `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(java.lang.String sName,
                                                 java.lang.String sLabel)

    - #### selectTab

          public GralPanelContent selectTab(java.lang.String name)

    - #### getWidgetsVisible

          @Deprecated
          public java.util.List<GralWidget> getWidgetsVisible()

      Deprecated.
      Description copied from interface: `GralVisibleWidgets_ifc`
      Gets the list of all widgets which are visible yet and should be updated with values therefore.
      Specified by:
        `getWidgetsVisible` in interface `GralVisibleWidgets_ifc`
      Returns:
        The list.

    - #### setVisibleState

          public void setVisibleState(boolean visible)

      Sets the visible state to all widgets of the panel, but not to windows (that is only in the primaryWindow)
      Overrides:
        `setVisibleState` in class `GralPanelContent`
      See Also:
        `GralWidget.setVisibleState(boolean)`

    - #### removePanel

          boolean removePanel(GralPanelContent panel)

    - #### removePanel

          public boolean removePanel(java.lang.String namePanel)

      Removes the named panel from this panel container.
      Parameters:
        `namePanel` - The name which was given by `addCanvasPanel(String, String)` or `addGridPanel(String, String, int, int, int, int)` and which is stored in `GralPanelContent#namePanel`.
      Returns:
        true if removed, false if the namePanel isn't ok and therefore nothing is removed.