# Interface GenericPlatform

All Superinterfaces:
  `FontManager`

All Known Implementing Classes:
  `AwtPlatform, JsPlatform, Platform, Platform, Platform`

public interface GenericPlatform extends FontManager

## Field Summary

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

## Method Summary

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

### Methods inherited from interface FontManager

`fontStringWidth, getFontAscent, getFontDescent, getFontMetrics, newFont`

## Field Details

### 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 Details

### setViewer

void setViewer(PlatformViewer vwr, Object display)

### isHeadless

boolean isHeadless()
//// Display

### convertPointFromScreen

void convertPointFromScreen(Object display, P3 ptTemp)

### getFullScreenDimensions

void getFullScreenDimensions(Object display, int[] widthHeight)

### hasFocus

boolean hasFocus(Object display)

### prompt

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

### repaint

void repaint(Object display)

### requestFocusInWindow

void requestFocusInWindow(Object display)

### setCursor

void setCursor(int i, Object display)

### setTransparentCursor

void setTransparentCursor(Object display)

### getMouseManager

GenericMouseInterface getMouseManager(double privateKey, Object display)
/ Mouse

### allocateRgbImage

Object allocateRgbImage(int windowWidth, int windowHeight, int[] pBuffer, int windowSize, boolean backgroundTransparent, boolean isImageWrite)
// core Image handling

### disposeGraphics

void disposeGraphics(Object graphicForText)

### drawImage

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

### drawImageToBuffer

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

### flushImage

void flushImage(Object imagePixelBuffer)

### getStaticGraphics

Object getStaticGraphics(Object image, boolean backgroundTransparent)

### getGraphics

Object getGraphics(Object image)

### getImageWidth

int getImageWidth(Object image)

### getImageHeight

int getImageHeight(Object image)

### newBufferedImage

Object newBufferedImage(Object image, int width, int height)

### newOffScreenImage

Object newOffScreenImage(int w, int h)

### renderScreenImage

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

### getTextPixels

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

### createImage

Object createImage(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(Object image, int width, int height, int[] pixels)

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

### waitForDisplay

boolean waitForDisplay(Object boolIsEcho, Object image) throws InterruptedException
can be ignored (return false) if platform cannot save images

Parameters:
  `boolIsEcho` -
  `image` -
Returns:
  false only if this platform cannot save images
Throws:
  `InterruptedException`

### getMenuPopup

GenericMenuInterface getMenuPopup(String menuStructure, char type)

### getJsObjectInfo

Object getJsObjectInfo(Object[] jsObject, String method, Object[] args)

### isSingleThreaded

boolean isSingleThreaded()

### notifyEndOfRendering

void notifyEndOfRendering()

### getDateFormat

String getDateFormat(String isoType)

### newFile

GenericFileInterface newFile(String name)

### getBufferedFileInputStream

Object getBufferedFileInputStream(String name)

### getURLContents

Object getURLContents(URL url, byte[] outputBytes, String post, boolean asString)

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

### getLocalUrl

String getLocalUrl(String fileName)

### getImageDialog

GenericImageDialog getImageDialog(String title, Map<String, GenericImageDialog> imageMap)

### forceAsyncLoad

boolean forceAsyncLoad(String filename)

### getInChI

Object getInChI()

### confirm

int confirm(String msg, String msgNo)