org.vishia.gral.ifc

## Interface GralWindow_ifc

- All Superinterfaces:
    GralWidget_ifc, GralWindow_getifc, GralWindow_setifc, Removeable
  All Known Implementing Classes:
    GralWindow

      public interface GralWindow_ifc
      extends GralWindow_getifc, GralWindow_setifc, GralWidget_ifc

  Interface to a Gral Window. In SWT ist is named as 'shell'. An application can have more as one window. The base classes `GralWindow` is the base of implementation. This interface contains the get and set access-interfaces (the base ones) and contains the build-method-definition for windows.

- - ### Nested Class Summary

    - ### 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
    --- | ---
    `static int` | `version` Version, history and license.
    `static int` | `windConcurrently` Property defines that the window is opened concurrently together with other windows of the application, especially concurrently to the primary window.
    `static int` | `windExclusive` Property defines that the window is opened exclusive for the application.
    `static int` | `windHasMenu`
    `static int` | `windIsMain`
    `static int` | `windOnTop`
    `static int` | `windRemoveOnClose` Property defines that the window should be removed on closing.
    `static int` | `windResizeable` Property defines that the window is able to resize

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

      `sVersion`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMenuBarItemGThread(java.lang.String nameWidg, java.lang.String sMenuPath, GralUserAction action)` Deprecated. use `getMenuBar()` and then `GralMenu.addMenuItem(String, String, GralUserAction)`
    `GralMenu` | `getMenuBar()` Gets the menu bar to add a menu item.
    `void` | `setFullScreen(boolean full)`
    `void` | `setMouseAction(GralUserAction action)` Sets an action which is invoked if any mouse button is pressed in the windows area on the screen.
    `void` | `setResizeAction(GralUserAction action)` Sets an action which is invoked if the whole window is resized by user handling on the window borders.
    `void` | `setTitle(java.lang.String sTitle)`
    `void` | `specifyActionOnCloseWindow(GralUserAction action)` Sets an action which is invoked if the window is set invisible or it is disposed.

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

      `getPixelPositionSize, isWindowsVisible`

    - ### Methods inherited from interface org.vishia.gral.base.GralWindow_setifc

      `closeWindow, setWindowVisible`

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

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

    - ### Methods inherited from interface org.vishia.util.Removeable

      `remove`

- - ### Field Detail

    - #### version

          static final int version

      Version, history and license.
      - 2016-09-18 Hartmut chg: renaming `specifyActionOnCloseWindow(GralUserAction)` instead 'setActionOnSettingInvisible', more expressive name.
      - 2015-04-27 Hartmut new `windRemoveOnClose`
      - 2012-03-16 Hartmut new: 16 defined and supported in SWT-implementation.
      - 2012-03-13 Hartmut chg: This interface should be used for building the window. Therefore all building methods should be contained here. Gotten from implementors.
      - 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

    - #### windRemoveOnClose

          static final int windRemoveOnClose

      Property defines that the window should be removed on closing. If this is not set the window is set to invisible but remain. It can be set to visible with its given content anytime again.
      See Also:
        Constant Field Values

    - #### windResizeable

          static final int windResizeable

      Property defines that the window is able to resize
      See Also:
        Constant Field Values

    - #### windExclusive

          static final int windExclusive

      Property defines that the window is opened exclusive for the application. It means that the primary window is not accessible if this window is opened. It is 'application modal'.
      See Also:
        Constant Field Values

    - #### windConcurrently

          static final int windConcurrently

      Property defines that the window is opened concurrently together with other windows of the application, especially concurrently to the primary window. This property should be set if the `windExclusive` property is not set. It is 'application non-modal'.
      See Also:
        Constant Field Values

    - #### windOnTop

          static final int windOnTop

      See Also:
        Constant Field Values

    - #### windHasMenu

          static final int windHasMenu

      See Also:
        Constant Field Values

    - #### windIsMain

          static final int windIsMain

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setResizeAction

          void setResizeAction(GralUserAction action)

      Sets an action which is invoked if the whole window is resized by user handling on the window borders.
      Parameters:
        `action` - The `GralUserAction.userActionGui(int, GralWidget, Object...)` will be called without parameter.

    - #### setMouseAction

          void setMouseAction(GralUserAction action)

      Sets an action which is invoked if any mouse button is pressed in the windows area on the screen.
      Parameters:
        `action` - The `GralUserAction.userActionGui(int, GralWidget, Object...)` will be called with parameter key: The mouse key. params[0]: Instance of `GralRectangle` with mouse coordinates.

    - #### addMenuBarItemGThread

          @Deprecated
          void addMenuBarItemGThread(java.lang.String nameWidg,
                                                  java.lang.String sMenuPath,
                                                  GralUserAction action)

      Deprecated. use `getMenuBar()` and then `GralMenu.addMenuItem(String, String, GralUserAction)`
      Adds any menu item
      Parameters:
        `name` - name of the menu, it is used as widget name.
        `sMenuPath` - Menu position. Use slash as separator, use & for hot key. For example "&edit/&search/co&ntinue" creates a menu 'edit' or uses the existing one in the top level (menu bar), then creates the search menu item as pull down in menu bar, and then 'continue' with 'n' as hot key as sub-menu. It is stored in `GralWidget.sDataPath`
        `action` - called on menu activation.

    - #### getMenuBar

          GralMenu getMenuBar()

      Gets the menu bar to add a menu item. If this window hasn't a gral menu bar, then the menu bar is created by calling `GralMng#createMenuBar(GralWindow)`. If the window has a menu bar already, it is stored in the reference `#menuBarGral`.
      Returns:
        the menu root for this window.

    - #### specifyActionOnCloseWindow

          void specifyActionOnCloseWindow(GralUserAction action)

      Sets an action which is invoked if the window is set invisible or it is disposed. Note that depending of the property `windRemoveOnClose` the window is disposed or it is set invisible without disposing if the close action is done by the user. In both cases this action will be invoked.
      Parameters:
        `action` - The `GralUserAction.userActionGui(int, GralWidget, Object...)` will be called without parameter.
      Since:
        2015-09 renamed, old identifier is 'setActionOnSettingInvisible'

    - #### setFullScreen

          void setFullScreen(boolean full)

      Specified by:
        `setFullScreen` in interface `GralWindow_setifc`

    - #### setTitle

          void setTitle(java.lang.String sTitle)