public class Platform extends java.lang.Object implements ApiPlatform
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.Object |
canvas |
(package private) java.lang.Object |
context |
private JmolFileAdapter |
fileAdapter |
(package private) JmolViewer |
viewer |
| Constructor and Description |
|---|
Platform() |
| 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 canvas,
P3 ptTemp) |
java.lang.Object |
createImage(java.lang.Object data)
could be byte[] (from ZIP file) or String (local file name) or URL
|
void |
disposeGraphics(java.lang.Object gOffscreen) |
void |
drawImage(java.lang.Object context,
java.lang.Object canvas,
int x,
int y,
int width,
int height) |
int[] |
drawImageToBuffer(java.lang.Object gOffscreen,
java.lang.Object imageOffscreen,
java.lang.Object canvas,
int width,
int height,
int bgcolor) |
void |
flushImage(java.lang.Object imagePixelBuffer) |
int |
fontStringWidth(JmolFont font,
java.lang.Object context,
java.lang.String text) |
java.lang.String |
getDateFormat() |
JmolFileAdapterInterface |
getFileAdapter() |
int |
getFontAscent(java.lang.Object context) |
int |
getFontDescent(java.lang.Object context) |
java.lang.Object |
getFontMetrics(JmolFont font,
java.lang.Object context) |
void |
getFullScreenDimensions(java.lang.Object canvas,
int[] widthHeight) |
java.lang.Object |
getGraphics(java.lang.Object image) |
int |
getImageHeight(java.lang.Object canvas) |
int |
getImageWidth(java.lang.Object canvas) |
java.lang.Object |
getJpgImage(Viewer viewer,
int quality,
java.lang.String comment)
used for JPG writing only; can be ignored
|
java.lang.Object |
getJsObjectInfo(java.lang.Object[] jsObject,
java.lang.String method,
java.lang.Object[] args) |
JmolPopupInterface |
getMenuPopup(Viewer viewer,
java.lang.String menuStructure,
char type) |
JmolMouseInterface |
getMouseManager(Viewer viewer,
ActionManager actionManager) |
java.lang.Object |
getStaticGraphics(java.lang.Object image,
boolean backgroundTransparent) |
int[] |
getTextPixels(java.lang.String text,
JmolFont font3d,
java.lang.Object context,
java.lang.Object image,
int width,
int height,
int ascent) |
int[] |
grabPixels(java.lang.Object canvas,
int width,
int height,
int[] pixels,
int startRow,
int nRows) |
boolean |
hasFocus(java.lang.Object canvas) |
boolean |
isHeadless() |
boolean |
isSingleThreaded() |
java.lang.Object |
newBufferedImage(java.lang.Object image,
int w,
int h) |
JmolFileInterface |
newFile(java.lang.String name) |
java.lang.Object |
newFont(java.lang.String fontFace,
boolean isBold,
boolean isItalic,
float fontSize) |
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(JmolViewer viewer,
java.lang.Object context,
java.lang.Object size)
legacy apps will use this
|
void |
repaint(java.lang.Object canvas) |
void |
requestFocusInWindow(java.lang.Object canvas) |
void |
setCursor(int c,
java.lang.Object canvas) |
void |
setTransparentCursor(java.lang.Object canvas) |
void |
setViewer(JmolViewer viewer,
java.lang.Object canvas) |
boolean |
waitForDisplay(java.lang.Object echoNameAndPath,
java.lang.Object zipBytes)
can be ignored (return false) if platform cannot save images
|
java.lang.Object canvas
JmolViewer viewer
java.lang.Object context
private JmolFileAdapter fileAdapter
public void setViewer(JmolViewer viewer, java.lang.Object canvas)
setViewer in interface ApiPlatformpublic boolean isSingleThreaded()
isSingleThreaded in interface ApiPlatformpublic java.lang.Object getJsObjectInfo(java.lang.Object[] jsObject,
java.lang.String method,
java.lang.Object[] args)
getJsObjectInfo in interface ApiPlatformpublic boolean isHeadless()
isHeadless in interface ApiPlatformpublic JmolFileAdapterInterface getFileAdapter()
getFileAdapter in interface ApiPlatformpublic JmolFileInterface newFile(java.lang.String name)
newFile in interface ApiPlatformpublic JmolMouseInterface getMouseManager(Viewer viewer, ActionManager actionManager)
getMouseManager in interface ApiPlatformpublic void convertPointFromScreen(java.lang.Object canvas,
P3 ptTemp)
convertPointFromScreen in interface ApiPlatformpublic void getFullScreenDimensions(java.lang.Object canvas,
int[] widthHeight)
getFullScreenDimensions in interface ApiPlatformpublic JmolPopupInterface getMenuPopup(Viewer viewer, java.lang.String menuStructure, char type)
getMenuPopup in interface ApiPlatformpublic boolean hasFocus(java.lang.Object canvas)
hasFocus in interface ApiPlatformpublic java.lang.String prompt(java.lang.String label,
java.lang.String data,
java.lang.String[] list,
boolean asButtons)
prompt in interface ApiPlatformpublic void renderScreenImage(JmolViewer viewer, java.lang.Object context, java.lang.Object size)
renderScreenImage in interface ApiPlatformviewer - context - size - public void drawImage(java.lang.Object context,
java.lang.Object canvas,
int x,
int y,
int width,
int height)
drawImage in interface ApiPlatformpublic void requestFocusInWindow(java.lang.Object canvas)
requestFocusInWindow in interface ApiPlatformpublic void repaint(java.lang.Object canvas)
repaint in interface ApiPlatformpublic void setTransparentCursor(java.lang.Object canvas)
setTransparentCursor in interface ApiPlatformpublic void setCursor(int c,
java.lang.Object canvas)
setCursor in interface ApiPlatformpublic java.lang.Object allocateRgbImage(int windowWidth,
int windowHeight,
int[] pBuffer,
int windowSize,
boolean backgroundTransparent,
boolean isImageWrite)
allocateRgbImage in interface ApiPlatformpublic void notifyEndOfRendering()
notifyEndOfRendering in interface ApiPlatformpublic java.lang.Object createImage(java.lang.Object data)
createImage in interface ApiPlatformdata - public void disposeGraphics(java.lang.Object gOffscreen)
disposeGraphics in interface ApiPlatformpublic int[] grabPixels(java.lang.Object canvas,
int width,
int height,
int[] pixels,
int startRow,
int nRows)
grabPixels in interface ApiPlatformpublic int[] drawImageToBuffer(java.lang.Object gOffscreen,
java.lang.Object imageOffscreen,
java.lang.Object canvas,
int width,
int height,
int bgcolor)
drawImageToBuffer in interface ApiPlatformpublic int[] getTextPixels(java.lang.String text,
JmolFont font3d,
java.lang.Object context,
java.lang.Object image,
int width,
int height,
int ascent)
getTextPixels in interface ApiPlatformpublic void flushImage(java.lang.Object imagePixelBuffer)
flushImage in interface ApiPlatformpublic java.lang.Object getGraphics(java.lang.Object image)
getGraphics in interface ApiPlatformpublic int getImageHeight(java.lang.Object canvas)
getImageHeight in interface ApiPlatformpublic int getImageWidth(java.lang.Object canvas)
getImageWidth in interface ApiPlatformpublic java.lang.Object getJpgImage(Viewer viewer, int quality, java.lang.String comment)
ApiPlatformgetJpgImage in interface ApiPlatformpublic java.lang.Object getStaticGraphics(java.lang.Object image,
boolean backgroundTransparent)
getStaticGraphics in interface ApiPlatformpublic java.lang.Object newBufferedImage(java.lang.Object image,
int w,
int h)
newBufferedImage in interface ApiPlatformpublic java.lang.Object newOffScreenImage(int w,
int h)
newOffScreenImage in interface ApiPlatformpublic boolean waitForDisplay(java.lang.Object echoNameAndPath,
java.lang.Object zipBytes)
throws java.lang.InterruptedException
ApiPlatformwaitForDisplay in interface ApiPlatformjava.lang.InterruptedExceptionpublic int fontStringWidth(JmolFont font, java.lang.Object context, java.lang.String text)
fontStringWidth in interface ApiPlatformpublic int getFontAscent(java.lang.Object context)
getFontAscent in interface ApiPlatformpublic int getFontDescent(java.lang.Object context)
getFontDescent in interface ApiPlatformpublic java.lang.Object getFontMetrics(JmolFont font, java.lang.Object context)
getFontMetrics in interface ApiPlatformpublic java.lang.Object newFont(java.lang.String fontFace,
boolean isBold,
boolean isItalic,
float fontSize)
newFont in interface ApiPlatformpublic java.lang.String getDateFormat()
getDateFormat in interface ApiPlatform