org.vishia.gral.area9

## Interface GralArea9_ifc

- All Superinterfaces:
    GralMngApplAdapter_ifc
  All Known Implementing Classes:
    GralArea9Window

      public interface GralArea9_ifc
      extends GralMngApplAdapter_ifc

  This interface supports the usage of a window which is divide into 9 areas. The 2 horizontal and 2 vertical separation lines may able to move in the implementation class. In that kind the areas are adjustable in size. Some of the 9 areas in a rectangle can be combined to build a greater area. In that kind a proper user-adequate dividing of the window is possible. In opposite to some other graphic systems the user have fix positions for some input or output areas, which can only adjusted in size. This may be an advantage in opposite to a free changeable window layout.
  The 9 areas:

       +---------+-------------------+--------------+
       |         |                   |              |
       +---------+-------------------+--------------+
       |         |                   |              |
       |         |                   |              |
       +---------+-------------------+--------------+
       |         |                   |              |
       +---------+-------------------+--------------+

  Example for combined areas:

       +---------+-------------------+--------------+
       | select  |                                  |
       +---------+     edit area                    |
       |         |                                  |
       | broswing|                                  |
       +         +-------------------+--------------+
       |         |    output area    | status       |
       +---------+-------------------+--------------+

  Usual an application needs only a few but stable areas.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `version` Version history: 2012-05-17 Hartmut new: `setMinMaxSizeArea(String, int, int, int, int)`: The size can be given with gral units, as min, max or absolute (min, max are equal).

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFrameArea(int xArea, int yArea, int dxArea, int dyArea, GralPanelContent component)` Deprecated. use `addFrameArea(String, GralPanelContent)`.
    `void` | `addFrameArea(java.lang.String sArea, GralPanelContent component)` Sets a Panel into a defined area.
    `void` | `addMenuBarArea9ItemGThread(java.lang.String nameWidg, java.lang.String sMenuPath, GralUserAction action)` Deprecated. use `getMenuBar()` and then `GralMenu.addMenuItem(String, String, GralUserAction)`
    `GralUserAction` | `getActionAbout()` Returns the prepared action about which opens the help window.
    `GralUserAction` | `getActionHelp()` Returns the prepared action help which opens the help window.
    `GralMng` | `getGralMng()`
    `MainCmd_ifc` | `getMainCmd()`
    `GralMenu` | `getMenuBar()` Gets the menu bar for the window, see `GralWindow.getMenuBar()`.
    `GralTextBox` | `getOutputBox()` Returns the text box which is used as output box for common messages of the application.
    `GralPanelContent` | `getOutputPanel()` Returns the outputArea, which was created by the graphic thread.
    `void` | `initGraphic(java.lang.String outputArea)` Initializes the graphic of the Area9-Window.
    `GralWindow_ifc` | `mainWindow()`
    `void` | `setFrameAreaBorders(int x1p, int x2p, int y1p, int y2p)` Sets the divisions of the frame.
    `void` | `setFullScreen(boolean full)`
    `void` | `setHelpBase(java.lang.String path)` Set a path which is used as help url base path.
    `void` | `setMinMaxSizeArea(java.lang.String sArea, int yMinUnit, int yMaxUnit, int xMinUnit, int xMaxUnit)` Sets the minimal and maximal size.
    `void` | `setStandardMenusGThread(java.io.File openStandardDirectory, GralUserAction actionFile)` Adds a Menu for file open and save only.

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

      `setHelpUrl`

- - ### Field Detail

    - #### version

          static final int version

      Version history:
      - 2012-05-17 Hartmut new: `setMinMaxSizeArea(String, int, int, int, int)`: The size can be given with gral units, as min, max or absolute (min, max are equal). The size of a area border can be changed on runtime.
      - 2012-03-25 Hartmut new/chg: `addFrameArea(String, GralPanelContent)` now with String designation of area. It should be used instead designation with 4 integers in range 1..3.
      - 2011-12-26 Hartmut new extends `GralMngApplAdapter_ifc`
      - 2011-11-12 Hartmut chg: `initGraphic(String)` instead initOutputArea().
      - 2011-11-12 Hartmut new: `getActionAbout()` and `getActionAbout()` to support menu setting by user
      - 2011-08-06 Hartmut chg: This interface is based on MainCmd_ifc. It is a non-side-effect change because the implementation classes `MainCmdSwt` and maybe the adequate Swing class base on `MainCmd`. Using this change only this interface is necessary for applications to use `MainCmdSwt` or adequate Swing
      - 2011-05-03 Hartmut created: The idea is a common GUI interface independent of Swing or SWT graphics. The classes `mainGuiSwt.MainCmdSwt` and `MainCmdSwing` exists. The interface should combine the usage of both. Second approach is the documentation of the concept of the 9 areas in a non-implementing class.
      - All other changes from 2010 and in the past
      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

  - ### Method Detail

    - #### initGraphic

          void initGraphic(java.lang.String outputArea)

      Initializes the graphic of the Area9-Window. It sets the Output window to a defined area and creates Windows for Help, About and InfoBoxes. This method can be invoked after construction immediately in any thread.
      In the implementation class `GralArea9Window` the working is done in the graphic thread. The caller thread waits for success in this method. The following actions are done:
      - Creation of all sub windows for InfoBox, InfoLog, Help and About.
      - Creation of the output Area.
      - Adding the `GralGraphicTimeOrder` `GralArea9Window.writeOutputTextDirectly` which transfers text lines stored in `GralArea9Window.outputTexts` to the output area.
      Parameters:
        `outputArea` - Two letter combination A1..C3 for horizontal and vertical area. A..C is left to right, 1..3 is top to bottom. The first combination is the top left area for output, the second combination is the bottom right area. The output area can use more as one basic areas. For example "A3C3" means that the output area uses the full bottom part of window. For example "B2C3" means an area consist of 4 basic areas right bottom.

    - #### addMenuBarArea9ItemGThread

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

      Deprecated. use `getMenuBar()` and then `GralMenu.addMenuItem(String, String, GralUserAction)`
      It is like `GralWindow_ifc.addMenuBarItemGThread(String, String, GralUserAction)`.

    - #### getMenuBar

          GralMenu getMenuBar()

      Gets the menu bar for the window, see `GralWindow.getMenuBar()`.
      Returns:
        The menu bar of the window.

    - #### setStandardMenusGThread

          void setStandardMenusGThread(java.io.File openStandardDirectory,
                                       GralUserAction actionFile)

      Adds a Menu for file open and save only. All other menu items are not set because the order of menus.
      Parameters:
        `openStandardDirectory` -
        `actionFile` -

    - #### getOutputPanel

          GralPanelContent getOutputPanel()

      Returns the outputArea, which was created by the graphic thread.

    - #### setFrameAreaBorders

          void setFrameAreaBorders(int x1p,
                                   int x2p,
                                   int y1p,
                                   int y2p)

      Sets the divisions of the frame. The frame is divide into 9 parts, where two horizontal and two vertical lines built them:

           +=======+===============+===========+
           |       |               |           |
           +-------+---------------+-----------+
           |       |               |           |
           |       |               |           |
           +-------+---------------+-----------+
           |       |               |           |
           |       |               |           |
           +=======+===============+===========+

      Parameters:
        `x1p` - percent from left for first vertical divide line.
        `x2p` - percent from left for second vertical divide line.
        `y1p` - percent from left for first horizontal divide line.
        `y2p` - percent from left for first horizontal divide line.

    - #### addFrameArea

          void addFrameArea(java.lang.String sArea,
                            GralPanelContent component)
                     throws java.lang.IndexOutOfBoundsException

      Sets a Panel into a defined area. See `setFrameAreaBorders(int, int, int, int)`. It should be called only in the GUI-Thread.
      Parameters:
        `sArea` - Area identifcation, e.g. "B3C3" where alpha-char A..C is column, numeric char 1..3 is row. If a range is given, the whole area of that areas is used.
        `component` - The component.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the arguments are false or the area is occupied already.

    - #### setMinMaxSizeArea

          void setMinMaxSizeArea(java.lang.String sArea,
                                 int yMinUnit,
                                 int yMaxUnit,
                                 int xMinUnit,
                                 int xMaxUnit)
                          throws java.lang.IndexOutOfBoundsException

      Sets the minimal and maximal size.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the arguments sArea are false.

    - #### addFrameArea

          @Deprecated
          void addFrameArea(int xArea,
                                         int yArea,
                                         int dxArea,
                                         int dyArea,
                                         GralPanelContent component)
                                  throws java.lang.IndexOutOfBoundsException

      Deprecated. use `addFrameArea(String, GralPanelContent)`.
      Sets a Panel into a defined area. See `setFrameAreaBorders(int, int, int, int)`. It should be called only in the GUI-Thread.
      Parameters:
        `xArea` - 1 to 3 for left, middle, right
        `yArea` - 1 to 3 for top, middle, bottom
        `dxArea` - 1 to 3 for 1 field to 3 fields to right.
        `dyArea` - 1 to 3 for 1 field to 3 field to bottom
        `component` - The component.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the arguments are false or the area is occupied already.

    - #### getOutputBox

          GralTextBox getOutputBox()

      Returns the text box which is used as output box for common messages of the application.
      Returns:
        null if no output window is given.

    - #### setFullScreen

          void setFullScreen(boolean full)

    - #### getGralMng

          GralMng getGralMng()

    - #### getActionHelp

          GralUserAction getActionHelp()

      Returns the prepared action help which opens the help window. It should be used for the users call of `addMenuBarArea9ItemGThread(String, String, GralUserAction)` to install the help menu.

    - #### getActionAbout

          GralUserAction getActionAbout()

      Returns the prepared action about which opens the help window. It should be used for the users call of `addMenuBarArea9ItemGThread(String, String, GralUserAction)` to install the help menu.

    - #### mainWindow

          GralWindow_ifc mainWindow()

    - #### getMainCmd

          MainCmd_ifc getMainCmd()

    - #### setHelpBase

          void setHelpBase(java.lang.String path)

      Set a path which is used as help url base path.
      Parameters:
        `path` - An absolute given path on a local file system, or html page in internet.