+ /** if true, org.xwt.Surface will generate a DoubleClick automatically after recieving two clicks in a short period of time */
+ protected boolean _needsAutoDoubleClick() { return false; }
+
+ protected void _newBrowserWindow(String url) {
+ if (Log.on) Log.log(this, "Platform " + platform.getClass().getName() + " cannot open browser windows");
+ return;
+ }
+
+ /** Returns null if XWT should always use direct connection; otherwise returns a ProxyInfo object with proxy settings */
+ protected synchronized HTTP.ProxyInfo _detectProxy() { return null; }
+
+ /** displays a platform-specific "open file" dialog and returns the chosen filename, or null if the user hit cancel */
+ protected String _fileDialog(String suggestedFileName, boolean write) { return null; }
+
+ /** returns true iff the platform has a case-sensitive filesystem */
+ protected boolean _isCaseSensitive() { return true; }
+
+ /** returns the value of the environment variable key, or null if no such key exists */
+ protected String _getEnv(String key) {
+ try {
+ String os = System.getProperty("os.name").toLowerCase();
+ Process p;
+ if (os.indexOf("windows 9") > -1) {
+ p = Runtime.getRuntime().exec("command.com /c set");
+ } else if ( (os.indexOf("nt") > -1) || (os.indexOf("windows 2000") > -1) ) {
+ p = Runtime.getRuntime().exec("cmd.exe /c set");
+ } else {
+ p = Runtime.getRuntime().exec("env");
+ }
+ BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ String s;
+ while ((s = br.readLine()) != null)
+ if (s.startsWith(key + "="))
+ return s.substring(0, key.length() + 1);
+ } catch (Exception e) {
+ if (Log.on) Log.log(this, "Exception while reading from environment:");
+ if (Log.on) Log.log(this, e);
+ }
+ return null;
+ }
+