public class Platform extends Object implements javajs.api.GenericPlatform
| Modifier and Type | Field and Description |
|---|---|
(package private) Object |
canvas |
(package private) Object |
context |
(package private) javajs.api.PlatformViewer |
vwr |
| Constructor and Description |
|---|
Platform() |
| Modifier and Type | Method and Description |
|---|---|
Object |
allocateRgbImage(int windowWidth,
int windowHeight,
int[] pBuffer,
int windowSize,
boolean backgroundTransparent,
boolean isImageWrite)
Create an "image" that is either a canvas with width/height/buf32
(from g3d.Platform32) or just an associative array with those (image writing
|
void |
convertPointFromScreen(Object canvas,
javajs.util.P3 ptTemp) |
Object |
createImage(Object name_path_bytes)
can be ignored (return null) if platform cannot save images
|
void |
disposeGraphics(Object gOffscreen) |
void |
drawImage(Object context,
Object canvas,
int x,
int y,
int width,
int height,
boolean isDTI) |
int[] |
drawImageToBuffer(Object gOffscreen,
Object imageOffscreen,
Object canvas,
int width,
int height,
int bgcolor) |
void |
flushImage(Object imagePixelBuffer) |
int |
fontStringWidth(javajs.awt.Font font,
String text) |
boolean |
forceAsyncLoad(String filename) |
Object |
getBufferedFileInputStream(String name) |
String |
getDateFormat(String isoType) |
int |
getFontAscent(Object context) |
int |
getFontDescent(Object context) |
Object |
getFontMetrics(javajs.awt.Font font,
Object context) |
void |
getFullScreenDimensions(Object canvas,
int[] widthHeight) |
Object |
getGraphics(Object canvas) |
javajs.api.GenericImageDialog |
getImageDialog(String title,
Map<String,javajs.api.GenericImageDialog> imageMap) |
int |
getImageHeight(Object canvas) |
int |
getImageWidth(Object canvas) |
Object |
getJsObjectInfo(Object[] jsObject,
String method,
Object[] args) |
String |
getLocalUrl(String fileName) |
javajs.api.GenericMenuInterface |
getMenuPopup(String menuStructure,
char type) |
javajs.api.GenericMouseInterface |
getMouseManager(double privateKey,
Object display) |
Object |
getStaticGraphics(Object image,
boolean backgroundTransparent) |
int[] |
getTextPixels(String text,
javajs.awt.Font font3d,
Object context,
Object image,
int width,
int height,
int ascent) |
Object |
getURLContents(URL url,
byte[] outputBytes,
String post,
boolean asString) |
static Object |
getURLContentsStatic(URL url,
byte[] outputBytes,
String post,
boolean asString)
In case this needs to be performed directly, without interface
|
int[] |
grabPixels(Object canvas,
int width,
int height,
int[] pixels,
int startRow,
int nRows) |
boolean |
hasFocus(Object canvas) |
boolean |
isHeadless() |
boolean |
isSingleThreaded() |
static JmolToJSmolInterface |
Jmol() |
Object |
newBufferedImage(Object image,
int w,
int h) |
javajs.api.GenericFileInterface |
newFile(String name) |
Object |
newFont(String fontFace,
boolean isBold,
boolean isItalic,
float fontSize) |
Object |
newOffScreenImage(int w,
int h) |
void |
notifyEndOfRendering() |
String |
prompt(String label,
String data,
String[] list,
boolean asButtons) |
void |
renderScreenImage(Object context,
Object size)
legacy apps will use this
|
void |
repaint(Object canvas) |
void |
requestFocusInWindow(Object canvas) |
void |
setCursor(int c,
Object canvas) |
void |
setTransparentCursor(Object canvas) |
void |
setViewer(javajs.api.PlatformViewer vwr,
Object canvas) |
boolean |
waitForDisplay(Object echoNameAndPath,
Object zipBytes)
can be ignored (return false) if platform cannot save images
|
public void setViewer(javajs.api.PlatformViewer vwr,
Object canvas)
setViewer in interface javajs.api.GenericPlatformpublic boolean isSingleThreaded()
isSingleThreaded in interface javajs.api.GenericPlatformpublic Object getJsObjectInfo(Object[] jsObject, String method, Object[] args)
getJsObjectInfo in interface javajs.api.GenericPlatformpublic boolean isHeadless()
isHeadless in interface javajs.api.GenericPlatformpublic javajs.api.GenericMouseInterface getMouseManager(double privateKey,
Object display)
getMouseManager in interface javajs.api.GenericPlatformpublic void convertPointFromScreen(Object canvas, javajs.util.P3 ptTemp)
convertPointFromScreen in interface javajs.api.GenericPlatformpublic void getFullScreenDimensions(Object canvas, int[] widthHeight)
getFullScreenDimensions in interface javajs.api.GenericPlatformpublic javajs.api.GenericMenuInterface getMenuPopup(String menuStructure, char type)
getMenuPopup in interface javajs.api.GenericPlatformpublic boolean hasFocus(Object canvas)
hasFocus in interface javajs.api.GenericPlatformpublic String prompt(String label, String data, String[] list, boolean asButtons)
prompt in interface javajs.api.GenericPlatformpublic void renderScreenImage(Object context, Object size)
renderScreenImage in interface javajs.api.GenericPlatformcontext - size - public void drawImage(Object context, Object canvas, int x, int y, int width, int height, boolean isDTI)
drawImage in interface javajs.api.GenericPlatformpublic void requestFocusInWindow(Object canvas)
requestFocusInWindow in interface javajs.api.GenericPlatformpublic void repaint(Object canvas)
repaint in interface javajs.api.GenericPlatformpublic void setTransparentCursor(Object canvas)
setTransparentCursor in interface javajs.api.GenericPlatformpublic void setCursor(int c,
Object canvas)
setCursor in interface javajs.api.GenericPlatformpublic Object allocateRgbImage(int windowWidth, int windowHeight, int[] pBuffer, int windowSize, boolean backgroundTransparent, boolean isImageWrite)
allocateRgbImage in interface javajs.api.GenericPlatformpublic void notifyEndOfRendering()
notifyEndOfRendering in interface javajs.api.GenericPlatformpublic void disposeGraphics(Object gOffscreen)
disposeGraphics in interface javajs.api.GenericPlatformpublic int[] grabPixels(Object canvas, int width, int height, int[] pixels, int startRow, int nRows)
grabPixels in interface javajs.api.GenericPlatformpublic int[] drawImageToBuffer(Object gOffscreen, Object imageOffscreen, Object canvas, int width, int height, int bgcolor)
drawImageToBuffer in interface javajs.api.GenericPlatformpublic int[] getTextPixels(String text, javajs.awt.Font font3d, Object context, Object image, int width, int height, int ascent)
getTextPixels in interface javajs.api.GenericPlatformpublic void flushImage(Object imagePixelBuffer)
flushImage in interface javajs.api.GenericPlatformpublic Object getGraphics(Object canvas)
getGraphics in interface javajs.api.GenericPlatformpublic int getImageHeight(Object canvas)
getImageHeight in interface javajs.api.GenericPlatformpublic int getImageWidth(Object canvas)
getImageWidth in interface javajs.api.GenericPlatformpublic Object getStaticGraphics(Object image, boolean backgroundTransparent)
getStaticGraphics in interface javajs.api.GenericPlatformpublic Object newBufferedImage(Object image, int w, int h)
newBufferedImage in interface javajs.api.GenericPlatformpublic Object newOffScreenImage(int w, int h)
newOffScreenImage in interface javajs.api.GenericPlatformpublic boolean waitForDisplay(Object echoNameAndPath, Object zipBytes) throws InterruptedException
javajs.api.GenericPlatformwaitForDisplay in interface javajs.api.GenericPlatformInterruptedExceptionpublic Object createImage(Object name_path_bytes)
javajs.api.GenericPlatformcreateImage in interface javajs.api.GenericPlatformname_path_bytes - public int fontStringWidth(javajs.awt.Font font,
String text)
fontStringWidth in interface javajs.api.FontManagerpublic int getFontAscent(Object context)
getFontAscent in interface javajs.api.FontManagerpublic int getFontDescent(Object context)
getFontDescent in interface javajs.api.FontManagerpublic Object getFontMetrics(javajs.awt.Font font, Object context)
getFontMetrics in interface javajs.api.FontManagerpublic Object newFont(String fontFace, boolean isBold, boolean isItalic, float fontSize)
newFont in interface javajs.api.FontManagerpublic String getDateFormat(String isoType)
getDateFormat in interface javajs.api.GenericPlatformpublic javajs.api.GenericFileInterface newFile(String name)
newFile in interface javajs.api.GenericPlatformpublic Object getBufferedFileInputStream(String name)
getBufferedFileInputStream in interface javajs.api.GenericPlatformpublic Object getURLContents(URL url, byte[] outputBytes, String post, boolean asString)
getURLContents in interface javajs.api.GenericPlatformpublic static Object getURLContentsStatic(URL url, byte[] outputBytes, String post, boolean asString)
url - outputBytes - post - asString - public String getLocalUrl(String fileName)
getLocalUrl in interface javajs.api.GenericPlatformpublic javajs.api.GenericImageDialog getImageDialog(String title, Map<String,javajs.api.GenericImageDialog> imageMap)
getImageDialog in interface javajs.api.GenericPlatformpublic static JmolToJSmolInterface Jmol()
public boolean forceAsyncLoad(String filename)
forceAsyncLoad in interface javajs.api.GenericPlatform