ThreadMessage.newthread(new JSObject.JSFunction() {
public Object call(Context cx, Scriptable thisObj, Scriptable ctorObj, Object[] arg) throws JavaScriptException {
new Box(initialTemplate_f, null);
- doneInitializing = true;
- if (Surface.allSurfaces.size() == 0) {
- Log.log(this, "exiting because all surfaces are gone");
- Platform.exit();
- }
+ doneInitializing = true;
+ if (Surface.allSurfaces.size() == 0) {
+ Log.log(this, "exiting because all surfaces are gone");
+ Platform.exit();
+ }
return null;
}
});
inputStream.skip(chunkLength);
return;
}
- int len = palette.length;
+ int len = palette.length;
if (colorType == 3) {
transparency = true;
else if (version.startsWith("1.4")) platform_class = "Java14";
else if (!version.startsWith("1.0") && !version.startsWith("1.1")) platform_class = "Java12";
- // Disable 2d hardware acceleration on Jaguar
- if (os_name.equals("Mac OS X") && os_version.equals("10.2"))
- System.setProperty("com.apple.hwaccel", "false");
+ // Disable 2d hardware acceleration on Jaguar
+ if (os_name.equals("Mac OS X") && os_version.equals("10.2"))
+ System.setProperty("com.apple.hwaccel", "false");
if (platform_class != null) {
platform = (Platform)Class.forName("org.xwt.plat." + platform_class).newInstance();
if (e instanceof EcmaError) Log.log(HTTP.class, ((EcmaError)e).getMessage() + " at " +
((EcmaError)e).getSourceName() + ":" + ((EcmaError)e).getLineNumber());
else if (e instanceof JavaScriptException) {
- try {
- XWT.recursivePrintObject.call(Context.enter(), null, null, new Object[] {
- ((JavaScriptException)e).getValue() });
- } catch (Exception e2) {
- Log.log(Platform.class, e);
- }
- }
+ try {
+ XWT.recursivePrintObject.call(Context.enter(), null, null, new Object[] {
+ ((JavaScriptException)e).getValue() });
+ } catch (Exception e2) {
+ Log.log(Platform.class, e);
+ }
+ }
else Log.log(Platform.class, e);
}
return null;
for(int i=0; i<text.length(); i++) {
int c = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(text.charAt(i));
if (c == -1 || metrics[c] == null) {
- left += metrics[64] != null ? metrics[64][4] : 10;
- continue;
- }
+ left += metrics[64] != null ? metrics[64][4] : 10;
+ continue;
+ }
buf.drawPicture(pg,
left,
y - (metrics[c][5] - metrics[c][2]),
public void windowDeiconified(WindowEvent e) { dirty(0, 0, width, height); Minimized(false); }
public void windowActivated(WindowEvent e) { Focused(true); }
public void windowDeactivated(WindowEvent e) { Focused(false); }
- public void componentMoved(ComponentEvent e) { PosChange(window.getLocation().x + insets.left, window.getLocation().y + insets.top); }
+ public void componentMoved(ComponentEvent e) { PosChange(window.getLocation().x + insets.left, window.getLocation().y + insets.top); }
public void componentResized(ComponentEvent e) {
// we have to periodically do this; I don't know why