Package jspecview.java
Class AwtPlatform
java.lang.Object
jspecview.java.AwtPlatform
- All Implemented Interfaces:
FontManager
,GenericPlatform
-
Field Summary
Fields inherited from interface org.jmol.api.GenericPlatform
CURSOR_CROSSHAIR, CURSOR_DEFAULT, CURSOR_HAND, CURSOR_MOVE, CURSOR_WAIT, CURSOR_ZOOM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocateRgbImage
(int windowWidth, int windowHeight, int[] pBuffer, int windowSize, boolean backgroundTransparent, boolean isImageWrite) int
void
convertPointFromScreen
(Object display, P3 ptTemp) createImage
(Object data) could be byte[] (from ZIP file) or String (local file name) or URLvoid
disposeGraphics
(Object gOffscreen) void
int[]
drawImageToBuffer
(Object gOffscreen, Object imageOffscreen, Object imageobj, int width, int height, int bgcolor) void
flushImage
(Object imagePixelBuffer) int
fontStringWidth
(Font font, String text) boolean
forceAsyncLoad
(String filename) getDateFormat
(String isoType) int
getFontAscent
(Object fontMetrics) int
getFontDescent
(Object fontMetrics) getFontMetrics
(Font font, Object graphics) void
getFullScreenDimensions
(Object display, int[] widthHeight) getGraphics
(Object image) getImageDialog
(String title, Map<String, GenericImageDialog> imageMap) int
getImageHeight
(Object image) int
getImageWidth
(Object image) getInChI()
getJsObjectInfo
(Object[] jsObject, String method, Object[] args) getLocalUrl
(String fileName) getMenuPopup
(String menuStructure, char type) getMouseManager
(double ignored, Object jsvp) getStaticGraphics
(Object image, boolean backgroundTransparent) int[]
getTextPixels
(String text, Font font3d, Object gObj, Object image, int width, int height, int ascent) getURLContents
(URL url, byte[] outputBytes, String post, boolean asString) static Window
int[]
grabPixels
(Object imageobj, int width, int height, int[] pixels) boolean
boolean
boolean
newBufferedImage
(Object image, int w, int h) newOffScreenImage
(int w, int h) void
void
renderScreenImage
(Object g, Object size) legacy apps will use thisvoid
void
requestFocusInWindow
(Object display) void
void
setTransparentCursor
(Object display) void
setViewer
(PlatformViewer viewer, Object display) boolean
waitForDisplay
(Object ignored, Object image) can be ignored (return false) if platform cannot save images
-
Constructor Details
-
AwtPlatform
public AwtPlatform()
-
-
Method Details
-
setViewer
- Specified by:
setViewer
in interfaceGenericPlatform
-
convertPointFromScreen
- Specified by:
convertPointFromScreen
in interfaceGenericPlatform
-
getFullScreenDimensions
- Specified by:
getFullScreenDimensions
in interfaceGenericPlatform
-
getMenuPopup
- Specified by:
getMenuPopup
in interfaceGenericPlatform
-
hasFocus
- Specified by:
hasFocus
in interfaceGenericPlatform
-
prompt
- Specified by:
prompt
in interfaceGenericPlatform
-
renderScreenImage
legacy apps will use this- Specified by:
renderScreenImage
in interfaceGenericPlatform
- Parameters:
g
-size
-
-
requestFocusInWindow
- Specified by:
requestFocusInWindow
in interfaceGenericPlatform
-
repaint
- Specified by:
repaint
in interfaceGenericPlatform
-
setTransparentCursor
- Specified by:
setTransparentCursor
in interfaceGenericPlatform
-
setCursor
- Specified by:
setCursor
in interfaceGenericPlatform
-
getMouseManager
- Specified by:
getMouseManager
in interfaceGenericPlatform
-
allocateRgbImage
public Object allocateRgbImage(int windowWidth, int windowHeight, int[] pBuffer, int windowSize, boolean backgroundTransparent, boolean isImageWrite) - Specified by:
allocateRgbImage
in interfaceGenericPlatform
-
createImage
could be byte[] (from ZIP file) or String (local file name) or URL- Specified by:
createImage
in interfaceGenericPlatform
- Parameters:
data
-- Returns:
- image object
-
disposeGraphics
- Specified by:
disposeGraphics
in interfaceGenericPlatform
-
drawImage
- Specified by:
drawImage
in interfaceGenericPlatform
-
grabPixels
- Specified by:
grabPixels
in interfaceGenericPlatform
- Returns:
- pixels
-
drawImageToBuffer
public int[] drawImageToBuffer(Object gOffscreen, Object imageOffscreen, Object imageobj, int width, int height, int bgcolor) - Specified by:
drawImageToBuffer
in interfaceGenericPlatform
-
getTextPixels
public int[] getTextPixels(String text, Font font3d, Object gObj, Object image, int width, int height, int ascent) - Specified by:
getTextPixels
in interfaceGenericPlatform
-
flushImage
- Specified by:
flushImage
in interfaceGenericPlatform
-
getGraphics
- Specified by:
getGraphics
in interfaceGenericPlatform
-
getImageHeight
- Specified by:
getImageHeight
in interfaceGenericPlatform
-
getImageWidth
- Specified by:
getImageWidth
in interfaceGenericPlatform
-
getStaticGraphics
- Specified by:
getStaticGraphics
in interfaceGenericPlatform
-
newBufferedImage
- Specified by:
newBufferedImage
in interfaceGenericPlatform
-
newOffScreenImage
- Specified by:
newOffScreenImage
in interfaceGenericPlatform
-
waitForDisplay
Description copied from interface:GenericPlatform
can be ignored (return false) if platform cannot save images- Specified by:
waitForDisplay
in interfaceGenericPlatform
- Returns:
- false only if this platform cannot save images
- Throws:
InterruptedException
-
fontStringWidth
- Specified by:
fontStringWidth
in interfaceFontManager
-
getFontAscent
- Specified by:
getFontAscent
in interfaceFontManager
-
getFontDescent
- Specified by:
getFontDescent
in interfaceFontManager
-
getFontMetrics
- Specified by:
getFontMetrics
in interfaceFontManager
-
newFont
- Specified by:
newFont
in interfaceFontManager
-
getJsObjectInfo
- Specified by:
getJsObjectInfo
in interfaceGenericPlatform
-
isHeadless
public boolean isHeadless()- Specified by:
isHeadless
in interfaceGenericPlatform
-
isSingleThreaded
public boolean isSingleThreaded()- Specified by:
isSingleThreaded
in interfaceGenericPlatform
-
notifyEndOfRendering
public void notifyEndOfRendering()- Specified by:
notifyEndOfRendering
in interfaceGenericPlatform
-
getWindow
- Parameters:
p
-- Returns:
- The hosting frame or JDialog.
-
getDateFormat
- Specified by:
getDateFormat
in interfaceGenericPlatform
-
newFile
- Specified by:
newFile
in interfaceGenericPlatform
-
getBufferedFileInputStream
- Specified by:
getBufferedFileInputStream
in interfaceGenericPlatform
-
getURLContents
- Specified by:
getURLContents
in interfaceGenericPlatform
- Returns:
- may be javajs.util.SB or byte[] or java.io.InputStream
-
getLocalUrl
- Specified by:
getLocalUrl
in interfaceGenericPlatform
-
getImageDialog
- Specified by:
getImageDialog
in interfaceGenericPlatform
-
forceAsyncLoad
- Specified by:
forceAsyncLoad
in interfaceGenericPlatform
-
getInChI
- Specified by:
getInChI
in interfaceGenericPlatform
-
confirm
- Specified by:
confirm
in interfaceGenericPlatform
-