org.vishia.gral.ifc

## Interface GralWindowMng_ifc

-     public interface GralWindowMng_ifc

  This interface supports to deal with the graphical implementation, especially the graphic thread. The graphic thread is associated with a graphic device usually. The graphic device handles all window appearances and events.
  Events usual calls methods from the user because the methods are registered to the events. Therefore some actions in user space are done in the graphic thread. If there are not additional actions, all operations with a GUI like Button press, mouse move, input in fields act in the graphic thread. This actions may block the execution of the application. Therefore actions which waits for something etc should run in extra threads. The adaption of a graphic device supports a queue mechanism to send events to the graphic from any other thread.
  In the eclipse.SWT graphic the actions with SWT-widgets tests the thread and causes an exception on error. In the Swing graphic some actions are possible to call in another thread, but they are not threadsafe. The gral adaption helps to handle that problems.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `version` Version, history and license.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDispatchListener(GralGraphicTimeOrder listener)` Adds a listener, which will be called in the dispatch loop.
    `void` | `exit()`
    `long` | `getThreadIdGui()` Returns the identification number of the already started graphic thread.
    `boolean` | `isRunning()` Returns true if the graphical application runs.
    `void` | `removeDispatchListener(GralGraphicTimeOrder listener)` Removes a listener, which was called in the dispatch loop.

- - ### Field Detail

    - #### version

          static final int version

      Version, history and license.
      - 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

  - ### Method Detail

    - #### getThreadIdGui

          long getThreadIdGui()

      Returns the identification number of the already started graphic thread. This number can be compared with the own thread id (java.lang.Thread.getId()). If there are equal, the current thread is the graphic thread.
      Returns:
        The id of the graphic thread or 0 if it isn't started.

    - #### isRunning

          boolean isRunning()

      Returns true if the graphical application runs.
      Returns:

    - #### exit

          void exit()

    - #### addDispatchListener

          void addDispatchListener(GralGraphicTimeOrder listener)

      Adds a listener, which will be called in the dispatch loop.
      Parameters:
        `listener` -

    - #### removeDispatchListener

          void removeDispatchListener(GralGraphicTimeOrder listener)

      Removes a listener, which was called in the dispatch loop.
      Parameters:
        `listener` -