- // Static methods -- thunk to the instance /////////////////////////////////////////////////////////////////////////
-
- /** if true, org.xwt.Surface should generate Click messages automatically when a Release happens after a Press and the mouse has not moved much */
- public static boolean needsAutoClick() { return platform._needsAutoClick(); }
-
- /** if true, org.xwt.Surface should generate DoubleClick messages automatically when needed */
- public static boolean needsAutoDoubleClick() { return platform._needsAutoDoubleClick(); }
-
- /** should return true if it is safe to supress full-surface dirties immediately after a window resize */
- public static String getDefaultFont() { return platform._getDefaultFont(); }
-
- /** should return true if it is safe to supress full-surface dirties immediately after a window resize */
- public static boolean supressDirtyOnResize() { return platform._supressDirtyOnResize(); }
-
- /** returns the width of a string in a platform-specific font */
- public static int stringWidth(String font, String text) { return platform._stringWidth(font, text); }
-
- /** returns the maximum ascent of all glyphs in a given platform-specific font */
- public static int getMaxAscent(String font) { return platform._getMaxAscent(font); }
-
- /** returns the maximum descent of all glyphs in a given platform-specific font. Three pixel minimum ensures space for underline. */
- public static int getMaxDescent(String font) { return Math.max(3, platform._getMaxDescent(font)); }
-
- /** returns the maximum number of threads that the XWT engine can create without adversely affecting the host OS */
- public static int maxThreads() { return platform._maxThreads(); }
-
- /** returns a list of all platform-specific fonts available */
- public static String[] listFonts() { return platform._listFonts(); }
-
- /** creates a weak reference */
- public static org.xwt.Weak getWeak(Object o) { return platform._getWeak(o); }
-
- /** opens a connection to the resource identified by URL u, and returns an InputStream */
- public static InputStream urlToInputStream(URL u) throws IOException { return platform._urlToInputStream(u); }
-
- /** returns the contents of the clipboard */
- public static Object getClipBoard() { return clipboardReadEnabled ? platform._getClipBoard() : null; }
-
- /** sets the contents of the clipboard */
- public static void setClipBoard(String s) { platform._setClipBoard(s); }
-
- /** creates a socket object, with or without ssl encryption */
- public static Socket getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
- return platform._getSocket(host, port, ssl, negotiate);
- }
-
- /** returns the width of the screen, in pixels */
- public static int getScreenWidth() { return platform._getScreenWidth(); }
-
- /** returns the height of the screen, in pixels */
- public static int getScreenHeight() { return platform._getScreenHeight(); }
-
- /** creates and returns a doublebuffer 'belonging' to <tt>owner</tt> */
- public static DoubleBuffer createDoubleBuffer(int w, int h, Surface s) { return platform._createDoubleBuffer(w, h, s); }
-
- /** creates and returns a picture */
- public static Picture createPicture(int[] data, int w, int h) { return platform._createPicture(data, w, h); }
-
- /** creates and returns a picture */
- public static Picture createPicture(ImageDecoder i) { return platform._createPicture(i.getData(), i.getWidth(), i.getHeight()); }
-
- /** returns true iff the platform has a case-sensitive filesystem */
- public static boolean isCaseSensitive() { return platform._isCaseSensitive(); }
-
- /** returns the value of the environment variable key, or null if no such key exists */
- public static String getEnv(String key) { return platform._getEnv(key); }