org.vishia.gral.base

## Class GralMng.ImplAccess

- java.lang.Object
- - org.vishia.gral.base.GralMng.ImplAccess

- Direct Known Subclasses:
    AwtWidgetMng, SwtMng
  Enclosing class:
    GralMng

      public abstract static class GralMng.ImplAccess
      extends java.lang.Object

  This class is used only for the implementation level of the graphic. It is not intent to use by any application. It is public because the implementation level should accesses it. It is the super class for several Graphic-Adapters (AWT/Swing, SWT etc.).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GralMng` | `mng`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImplAccess(GralMng mng, GralGridProperties props)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract GralCurveView` | `addCurveViewY(java.lang.String sName, int nrofXvalues, GralCurveView.CommonCurve common)`
    `abstract void` | `addFocusAction(GralWidget widgetInfo, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)`
    `abstract GralWidget` | `addFocusAction(java.lang.String sName, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)`
    `abstract GralHtmlBox` | `addHtmlBox(java.lang.String name)`
    `abstract java.lang.Object` | `addImage(java.lang.String sName, java.io.InputStream imageStream, int height, int width, java.lang.String sCmd)`
    `abstract GralWidget` | `addSlider(java.lang.String sName, GralUserAction action, java.lang.String sShowMethod, java.lang.String sDataPath)`
    `abstract GralTabbedPanel` | `addTabbedPanel(java.lang.String namePanel, GralPanelActivated_ifc user, int property)`
    `abstract GralTable` | `addTable(java.lang.String sName, int height, int[] columnWidths)` Deprecated.
    `abstract GralWidget` | `addText(java.lang.String sText, char size, int color)` Deprecated.
    `abstract GralRectangle` | `calcWidgetPosAndSize(GralPos pos, int widthwidgetNat, int heigthWidgetNat)` Calculates the bounds of a widget with a given pos independent of this `pos()`.
    `protected abstract GralPanelContent` | `createCompositeBox(java.lang.String name)` Creates a box inside the current panel to hold some widgets.
    `protected abstract GralMenu` | `createContextMenu(GralWidget widgg)` Creates the context menu for the given widget for right-mouse pressing.
    `abstract GralFileDialog_ifc` | `createFileDialog()`
    `protected abstract GralPanelContent` | `createGridPanel(java.lang.String namePanel, GralColor backGround, int xG, int yG, int xS, int yS)` Creates an independent grid panel which is managed by this.
    `abstract void` | `createImplWidget_Gthread(GralWidget widgg)`
    `protected abstract GralMenu` | `createMenuBar(GralWindow windg)` Creates the menu bar for the given window.
    `protected abstract void` | `createSubWindow(GralWindow windowGral)`
    `abstract GralWindow` | `createWindow(java.lang.String name, java.lang.String title, int windProps)` Deprecated.
    `abstract java.lang.Object` | `getColorImpl(GralColor color)` Gets the color of the graphic implementation (swt.Color, swing.TODO) Either the implementation color instance is stored already in the GralColor, or it will be created, stored in GralColor and returned here.
    `abstract java.lang.Object` | `getCurrentPanel()`
    `abstract java.lang.String` | `getValueFromWidget(GralWidget widgd)` Deprecated.
    `protected GralWidget` | `indexNameWidgets(java.lang.String name)`
    `protected void` | `listVisiblePanels_add(GralTabbedPanel panel)`
    `protected GralPos` | `pos()`
    `protected abstract void` | `redrawWidget(java.lang.String sName)` Forces the redrawing for all set samples.
    `abstract boolean` | `remove(GralPanelContent compositeBox)`
    `protected abstract void` | `resizeWidget(GralWidget widgd, int xSizeParent, int ySizeParent)` Forces the resizing of the given widged.
    `protected java.lang.String` | `sCurrPanel()`
    `protected abstract void` | `setSampleCurveViewY(java.lang.String sName, float[] values)` Adds a sampling value set.
    `protected abstract boolean` | `showContextMenuGthread(GralWidget widg)` Shows the context menu of any widget independent of the internal right-mouse invocation.
    `protected GralUserAction` | `userMainKeyAction()`
    `protected abstract GralMenu` | `XXXaddPopupMenu(java.lang.String sName)`
    `protected abstract boolean` | `XXXsetWindowsVisible(GralWindow_ifc window, GralPos atPos)` Deprecated.

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

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

- - ### Field Detail

    - #### mng

          public GralMng mng

  - ### Constructor Detail

    - #### ImplAccess

          public ImplAccess(GralMng mng,
                            GralGridProperties props)

  - ### Method Detail

    - #### pos

          protected GralPos pos()

    - #### sCurrPanel

          protected java.lang.String sCurrPanel()

    - #### listVisiblePanels_add

          protected void listVisiblePanels_add(GralTabbedPanel panel)

    - #### getCurrentPanel

          public abstract java.lang.Object getCurrentPanel()

    - #### indexNameWidgets

          protected GralWidget indexNameWidgets(java.lang.String name)

    - #### userMainKeyAction

          protected GralUserAction userMainKeyAction()

    - #### createImplWidget_Gthread

          public abstract void createImplWidget_Gthread(GralWidget widgg)

    - #### createContextMenu

          protected abstract GralMenu createContextMenu(GralWidget widgg)

      Creates the context menu for the given widget for right-mouse pressing. This method is invoked only in `GralWidget.getContextMenu()` whereby an existing context menu is stored in the `GralWidget.contextMenu` association. The widget have to be set to panel already, an implementation widget have to be existing. It means `GralWidget#getWidgetImplementation()` should be return that instance where the menu is to be added. This method is package protected because it should only be called internally.
      Parameters:
        `widg` - The widget

    - #### createCompositeBox

          protected abstract GralPanelContent createCompositeBox(java.lang.String name)

      Creates a box inside the current panel to hold some widgets.
      Returns:
      Since:
        2010-05-01

    - #### createGridPanel

          protected abstract GralPanelContent createGridPanel(java.lang.String namePanel,
                                                              GralColor backGround,
                                                              int xG,
                                                              int yG,
                                                              int xS,
                                                              int yS)

      Creates an independent grid panel which is managed by this. The panel can be associated to any graphic frame.
      Parameters:
        `namePanel` -
        `backGround` -
        `xG` -
        `yG` -
        `xS` -
        `yS` -
      Returns:

    - #### remove

          public abstract boolean remove(GralPanelContent compositeBox)

    - #### createMenuBar

          protected abstract GralMenu createMenuBar(GralWindow windg)

      Creates the menu bar for the given window. This method is invoked only in `GralWindow.getMenuBar()` whereby an existing menu bar is stored in the `GralWindow.menuBarGral` association.
      Parameters:
        `windg` - The window

    - #### createWindow

          @Deprecated
          public abstract GralWindow createWindow(java.lang.String name,
                                                               java.lang.String title,
                                                               int windProps)

      Deprecated.

    - #### createSubWindow

          protected abstract void createSubWindow(GralWindow windowGral)

    - #### addTabbedPanel

          public abstract GralTabbedPanel addTabbedPanel(java.lang.String namePanel,
                                                         GralPanelActivated_ifc user,
                                                         int property)

    - #### addText

          @Deprecated
          public abstract GralWidget addText(java.lang.String sText,
                                                          char size,
                                                          int color)

      Deprecated.

    - #### addHtmlBox

          public abstract GralHtmlBox addHtmlBox(java.lang.String name)

    - #### addImage

          public abstract java.lang.Object addImage(java.lang.String sName,
                                                    java.io.InputStream imageStream,
                                                    int height,
                                                    int width,
                                                    java.lang.String sCmd)

    - #### addSlider

          public abstract GralWidget addSlider(java.lang.String sName,
                                               GralUserAction action,
                                               java.lang.String sShowMethod,
                                               java.lang.String sDataPath)

    - #### addCurveViewY

          public abstract GralCurveView addCurveViewY(java.lang.String sName,
                                                      int nrofXvalues,
                                                      GralCurveView.CommonCurve common)

    - #### addFocusAction

          public abstract GralWidget addFocusAction(java.lang.String sName,
                                                    GralUserAction action,
                                                    java.lang.String sCmdEnter,
                                                    java.lang.String sCmdRelease)

    - #### addFocusAction

          public abstract void addFocusAction(GralWidget widgetInfo,
                                              GralUserAction action,
                                              java.lang.String sCmdEnter,
                                              java.lang.String sCmdRelease)

    - #### addTable

          @Deprecated
          public abstract GralTable addTable(java.lang.String sName,
                                                          int height,
                                                          int[] columnWidths)

      Deprecated.

    - #### createFileDialog

          public abstract GralFileDialog_ifc createFileDialog()

    - #### XXXaddPopupMenu

          protected abstract GralMenu XXXaddPopupMenu(java.lang.String sName)

    - #### calcWidgetPosAndSize

          public abstract GralRectangle calcWidgetPosAndSize(GralPos pos,
                                                             int widthwidgetNat,
                                                             int heigthWidgetNat)

      Calculates the bounds of a widget with a given pos independent of this `pos()`. This method is a part of the implementing GralMng because the GralPos is not implemented for any underlying graphic system and the `#propertiesGuiSwt` are used. This method is not intent to use from an application, only for implementing methods of Gral. Therefore it isn't a member of the `GralWindowMng_ifc` and `GralMngBuild_ifc` It is possible to tune the bounds after calculation, for example to enhance the width if a text is larger then the intended position.
      Parameters:
        `pos` - The position.
        `widthwidgetNat` - The natural size of the component.
        `heigthWidgetNat` - The natural size of the component.
      Returns:
        A rectangle with position and size.

    - #### getValueFromWidget

          @Deprecated
          public abstract java.lang.String getValueFromWidget(GralWidget widgd)

      Deprecated.

    - #### getColorImpl

          public abstract java.lang.Object getColorImpl(GralColor color)

      Gets the color of the graphic implementation (swt.Color, swing.TODO) Either the implementation color instance is stored already in the GralColor, or it will be created, stored in GralColor and returned here.
      Parameters:
        `color` - The Color.
      Returns:
        Instance of the implementation color.

    - #### redrawWidget

          protected abstract void redrawWidget(java.lang.String sName)

      Forces the redrawing for all set samples. It should be called after { @link #setSampleCurveViewY(String, float[])}.
      Parameters:
        `sName` - The name of the widget.

    - #### resizeWidget

          protected abstract void resizeWidget(GralWidget widgd,
                                               int xSizeParent,
                                               int ySizeParent)

      Forces the resizing of the given widged.
      Parameters:
        `widgd` - the widget

    - #### setSampleCurveViewY

          protected abstract void setSampleCurveViewY(java.lang.String sName,
                                                      float[] values)

      Adds a sampling value set.
      Parameters:
        `sName` - The registered name
        `values` - The values.

    - #### showContextMenuGthread

          protected abstract boolean showContextMenuGthread(GralWidget widg)

      Shows the context menu of any widget independent of the internal right-mouse invocation.
      Parameters:
        `widg` - The widget.
      Returns:
        true if the widget have a context menu.

    - #### XXXsetWindowsVisible

          @Deprecated
          protected abstract boolean XXXsetWindowsVisible(GralWindow_ifc window,
                                                                       GralPos atPos)

      Deprecated.
      Sets a given and registered window visible at the given position and size or set it invisible.
      A window can be created by invoking `org.vishia.gral.ifc.GralMngBuild_ifc#createWindow(String, boolean)` in the build phase of the gui. It can be hidden because it is not necessary to show and operate with them. In a adequate phase of operate it can be shown and focused.
      The position is given relative to that panel, which is stored in `GralPos.panel`. To get a position instance, you can set a position invoking
      - `GralMngBuild_ifc.selectPanel(String)`
      - `GralMngBuild_ifc.setPosition(float, float, float, float, int, char)`
      - GralGridPos pos = `GralMngBuild_ifc.getPositionInPanel()`.
      That can be done in the build phase of the graphic. The position can be stored. It is possible to adjust the position relative to the unchanged panel by changing the values of `GralPos.x` etc. It is possible too to change the Panel which relates to the position. Then the grid managing instance have to be known via the `GralMngBuild_ifc` to select a panel. The panels may be moved or resized. With the knowledge of the relative position of the window in respect to a panel of the parent window, the window can be placed onto a proper position of the whole display.
      Parameters:
        `window` - the instance of the window wrapper.
        `atPos` - If null then hide the window. If not null then show the window. The position and size of the window is given related to any panel of any other window.
      Returns:
        true if it is visible.