GenericPlatform
Date: 2019-10-22

org.jmol.api

## Interface GenericPlatform

- All Superinterfaces:
    FontManager
  All Known Implementing Classes:
    Platform, Platform, Platform

      public interface GenericPlatform
      extends FontManager

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CURSOR_CROSSHAIR`
    `static int` | `CURSOR_DEFAULT`
    `static int` | `CURSOR_HAND`
    `static int` | `CURSOR_MOVE`
    `static int` | `CURSOR_WAIT`
    `static int` | `CURSOR_ZOOM`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `allocateRgbImage(int windowWidth, int windowHeight, int[] pBuffer, int windowSize, boolean backgroundTransparent, boolean isImageWrite)`
    `void` | `convertPointFromScreen(java.lang.Object display, javajs.util.P3 ptTemp)`
    `java.lang.Object` | `createImage(java.lang.Object ret)` can be ignored (return null) if platform cannot save images
    `void` | `disposeGraphics(java.lang.Object graphicForText)`
    `void` | `drawImage(java.lang.Object g, java.lang.Object img, int x, int y, int width, int height, boolean isDTI)`
    `int[]` | `drawImageToBuffer(java.lang.Object gObj, java.lang.Object imageOffscreen, java.lang.Object image, int width, int height, int bgcolor)`
    `void` | `flushImage(java.lang.Object imagePixelBuffer)`
    `boolean` | `forceAsyncLoad(java.lang.String filename)`
    `java.lang.Object` | `getBufferedFileInputStream(java.lang.String name)`
    `java.lang.String` | `getDateFormat(java.lang.String isoType)`
    `void` | `getFullScreenDimensions(java.lang.Object display, int[] widthHeight)`
    `java.lang.Object` | `getGraphics(java.lang.Object image)`
    `GenericImageDialog` | `getImageDialog(java.lang.String title, java.util.Map<java.lang.String,GenericImageDialog> imageMap)`
    `int` | `getImageHeight(java.lang.Object image)`
    `int` | `getImageWidth(java.lang.Object image)`
    `java.lang.Object` | `getJsObjectInfo(java.lang.Object[] jsObject, java.lang.String method, java.lang.Object[] args)`
    `java.lang.String` | `getLocalUrl(java.lang.String fileName)`
    `GenericMenuInterface` | `getMenuPopup(java.lang.String menuStructure, char type)`
    `GenericMouseInterface` | `getMouseManager(double privateKey, java.lang.Object display)`
    `java.lang.Object` | `getStaticGraphics(java.lang.Object image, boolean backgroundTransparent)`
    `int[]` | `getTextPixels(java.lang.String text, Font font3d, java.lang.Object gObj, java.lang.Object image, int mapWidth, int height, int ascent)`
    `java.lang.Object` | `getURLContents(java.net.URL url, byte[] outputBytes, java.lang.String post, boolean asString)`
    `int[]` | `grabPixels(java.lang.Object image, int width, int height, int[] pixels, int startRow, int nRows)`
    `boolean` | `hasFocus(java.lang.Object display)`
    `boolean` | `isHeadless()`
    `boolean` | `isSingleThreaded()`
    `java.lang.Object` | `newBufferedImage(java.lang.Object image, int i, int height)`
    `GenericFileInterface` | `newFile(java.lang.String name)`
    `java.lang.Object` | `newOffScreenImage(int w, int h)`
    `void` | `notifyEndOfRendering()`
    `java.lang.String` | `prompt(java.lang.String label, java.lang.String data, java.lang.String[] list, boolean asButtons)`
    `void` | `renderScreenImage(java.lang.Object g, java.lang.Object currentSize)` Deprecated.
    `void` | `repaint(java.lang.Object display)`
    `void` | `requestFocusInWindow(java.lang.Object display)`
    `void` | `setCursor(int i, java.lang.Object display)`
    `void` | `setTransparentCursor(java.lang.Object display)`
    `void` | `setViewer(PlatformViewer vwr, java.lang.Object display)`
    `boolean` | `waitForDisplay(java.lang.Object boolIsEcho, java.lang.Object image)` can be ignored (return false) if platform cannot save images

    - ### Methods inherited from interface org.jmol.api.FontManager

      `fontStringWidth, getFontAscent, getFontDescent, getFontMetrics, newFont`

- - ### Field Detail

    - #### CURSOR_DEFAULT

          static final int CURSOR_DEFAULT

      See Also:
        Constant Field Values

    - #### CURSOR_CROSSHAIR

          static final int CURSOR_CROSSHAIR

      See Also:
        Constant Field Values

    - #### CURSOR_WAIT

          static final int CURSOR_WAIT

      See Also:
        Constant Field Values

    - #### CURSOR_ZOOM

          static final int CURSOR_ZOOM

      See Also:
        Constant Field Values

    - #### CURSOR_HAND

          static final int CURSOR_HAND

      See Also:
        Constant Field Values

    - #### CURSOR_MOVE

          static final int CURSOR_MOVE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setViewer

          void setViewer(PlatformViewer vwr,
                         java.lang.Object display)

    - #### isHeadless

          boolean isHeadless()

    - #### convertPointFromScreen

          void convertPointFromScreen(java.lang.Object display,
                                      javajs.util.P3 ptTemp)

    - #### getFullScreenDimensions

          void getFullScreenDimensions(java.lang.Object display,
                                       int[] widthHeight)

    - #### hasFocus

          boolean hasFocus(java.lang.Object display)

    - #### prompt

          java.lang.String prompt(java.lang.String label,
                                  java.lang.String data,
                                  java.lang.String[] list,
                                  boolean asButtons)

    - #### repaint

          void repaint(java.lang.Object display)

    - #### requestFocusInWindow

          void requestFocusInWindow(java.lang.Object display)

    - #### setCursor

          void setCursor(int i,
                         java.lang.Object display)

    - #### setTransparentCursor

          void setTransparentCursor(java.lang.Object display)

    - #### getMouseManager

          GenericMouseInterface getMouseManager(double privateKey,
                                                java.lang.Object display)

    - #### allocateRgbImage

          java.lang.Object allocateRgbImage(int windowWidth,
                                            int windowHeight,
                                            int[] pBuffer,
                                            int windowSize,
                                            boolean backgroundTransparent,
                                            boolean isImageWrite)

    - #### disposeGraphics

          void disposeGraphics(java.lang.Object graphicForText)

    - #### drawImage

          void drawImage(java.lang.Object g,
                         java.lang.Object img,
                         int x,
                         int y,
                         int width,
                         int height,
                         boolean isDTI)

    - #### drawImageToBuffer

          int[] drawImageToBuffer(java.lang.Object gObj,
                                  java.lang.Object imageOffscreen,
                                  java.lang.Object image,
                                  int width,
                                  int height,
                                  int bgcolor)

    - #### flushImage

          void flushImage(java.lang.Object imagePixelBuffer)

    - #### getStaticGraphics

          java.lang.Object getStaticGraphics(java.lang.Object image,
                                             boolean backgroundTransparent)

    - #### getGraphics

          java.lang.Object getGraphics(java.lang.Object image)

    - #### getImageWidth

          int getImageWidth(java.lang.Object image)

    - #### getImageHeight

          int getImageHeight(java.lang.Object image)

    - #### newBufferedImage

          java.lang.Object newBufferedImage(java.lang.Object image,
                                            int i,
                                            int height)

    - #### newOffScreenImage

          java.lang.Object newOffScreenImage(int w,
                                             int h)

    - #### renderScreenImage

          @Deprecated
          void renderScreenImage(java.lang.Object g,
                                             java.lang.Object currentSize)

      Deprecated.

    - #### getTextPixels

          int[] getTextPixels(java.lang.String text,
                              Font font3d,
                              java.lang.Object gObj,
                              java.lang.Object image,
                              int mapWidth,
                              int height,
                              int ascent)

    - #### createImage

          java.lang.Object createImage(java.lang.Object ret)

      can be ignored (return null) if platform cannot save images
      Parameters:
        `ret` -
      Returns:
        null only if this platform cannot save images

    - #### grabPixels

          int[] grabPixels(java.lang.Object image,
                           int width,
                           int height,
                           int[] pixels,
                           int startRow,
                           int nRows)

      Parameters:
        `image` -
        `width` -
        `height` -
        `pixels` -
        `startRow` -
        `nRows` -
      Returns:
        pixels

    - #### waitForDisplay

          boolean waitForDisplay(java.lang.Object boolIsEcho,
                                 java.lang.Object image)
                          throws java.lang.InterruptedException

      can be ignored (return false) if platform cannot save images
      Parameters:
        `boolIsEcho` -
        `image` -
      Returns:
        false only if this platform cannot save images
      Throws:
        `java.lang.InterruptedException`

    - #### getMenuPopup

          GenericMenuInterface getMenuPopup(java.lang.String menuStructure,
                                            char type)

    - #### getJsObjectInfo

          java.lang.Object getJsObjectInfo(java.lang.Object[] jsObject,
                                           java.lang.String method,
                                           java.lang.Object[] args)

    - #### isSingleThreaded

          boolean isSingleThreaded()

    - #### notifyEndOfRendering

          void notifyEndOfRendering()

    - #### getDateFormat

          java.lang.String getDateFormat(java.lang.String isoType)

    - #### newFile

          GenericFileInterface newFile(java.lang.String name)

    - #### getBufferedFileInputStream

          java.lang.Object getBufferedFileInputStream(java.lang.String name)

    - #### getURLContents

          java.lang.Object getURLContents(java.net.URL url,
                                          byte[] outputBytes,
                                          java.lang.String post,
                                          boolean asString)

      Parameters:
        `url` -
        `outputBytes` -
        `post` -
        `asString` -
      Returns:
        may be javajs.util.SB or byte[] or java.io.InputStream

    - #### getLocalUrl

          java.lang.String getLocalUrl(java.lang.String fileName)

    - #### getImageDialog

          GenericImageDialog getImageDialog(java.lang.String title,
                                            java.util.Map<java.lang.String,GenericImageDialog> imageMap)

    - #### forceAsyncLoad

          boolean forceAsyncLoad(java.lang.String filename)