static {
Font f = null;
try { f = Font.getFont((Res)Main.builtin.get("fonts/vera/Vera.ttf"), 10); }
- catch(JSExn e) { Log.log(Box.class, "should never happen: "+e); }
+ catch(JSExn e) { Log.info(Box.class, "should never happen: "+e); }
DEFAULT_FONT = f;
}
case "Close": if (parent == null && getSurface() != null) getSurface().dispose(true);
case "toback": if (parent == null && getSurface() != null && toBoolean(value)) { getSurface().toBack(); }
case "tofront": if (parent == null && getSurface() != null && toBoolean(value)) { getSurface().toFront(); }
- case "redirect": if (redirect == this) redirect = (Box)value; else Log.log(this, "redirect can only be set once");
+ case "redirect": if (redirect == this) redirect = (Box)value; else Log.info(this, "redirect can only be set once");
case "font": font = value == null ? null : Font.getFont((Res)value, font == null ? 10 : font.pointsize); MARK_RESIZE; dirty();
case "fontsize": font = Font.getFont(font == null ? null : font.res, toInt(value)); MARK_RESIZE; dirty();
case "x": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(x); } else { if (test(PACKED) && parent != null) return; CHECKSET_INT(x); dirty(); MARK_RESIZE; dirty(); }
(Integer.parseInt(s.substring(3, 5), 16) << 8) |
Integer.parseInt(s.substring(5, 7), 16);
} catch (NumberFormatException e) {
- Log.log(Box.class, "invalid color " + s);
+ Log.info(Box.class, "invalid color " + s);
return 0;
}
else return 0; // FEATURE: error?
for(Box cur = this; cur != null; cur = cur.parent)
if (cur == b) {
if (Log.on) Log.logJS(this, "attempt to make a node a parent of its own ancestor");
- if (Log.on) Log.log(this, "box == " + this + " ancestor == " + b);
+ if (Log.on) Log.info(this, "box == " + this + " ancestor == " + b);
return;
}
Glyph g = (Glyph)glyphsToBeRendered.remove(false);
if (g == null) { glyphRenderingTaskIsScheduled = false; return; }
if (g.isLoaded) { perform(); /* tailcall to the next glyph */ return; }
- Log.log(Glyph.class, "rendering glyph " + g.c);
- try { freetype.renderGlyph(g); } catch (IOException e) { Log.log(Freetype.class, e); }
+ Log.info(Glyph.class, "rendering glyph " + g.c);
+ try { freetype.renderGlyph(g); } catch (IOException e) { Log.info(Freetype.class, e); }
g.isLoaded = true;
Scheduler.add(this); // keep ourselves in the queue until there are no glyphs to render
glyphRenderingTaskIsScheduled = true;
else doWebAuth(h, content == null ? "GET" : "POST");
if (h.get("HTTP").equals("1.0") && h.get("content-length") == null) {
- if (Log.on) Log.log(this, "proxy returned an HTTP/1.0 reply with no content-length...");
+ if (Log.on) Log.info(this, "proxy returned an HTTP/1.0 reply with no content-length...");
reset();
} else {
int cl = h.get("content-length") == null ? -1 : Integer.parseInt(h.get("content-length").toString());
/** Attempts a direct connection */
private Socket attemptDirect() {
try {
- if (Log.verbose) Log.log(this, "attempting to create unproxied socket to " +
+ if (Log.verbose) Log.info(this, "attempting to create unproxied socket to " +
host + ":" + port + (ssl ? " [ssl]" : ""));
return getSocket(host, port, ssl, true);
} catch (IOException e) {
- if (Log.on) Log.log(this, "exception in attemptDirect(): " + e);
+ if (Log.on) Log.info(this, "exception in attemptDirect(): " + e);
return null;
}
}
/** Attempts to use an HTTP proxy, employing the CONNECT method if HTTPS is requested */
private Socket attemptHttpProxy(String proxyHost, int proxyPort) {
try {
- if (Log.verbose) Log.log(this, "attempting to create HTTP proxied socket using proxy " + proxyHost + ":" + proxyPort);
+ if (Log.verbose) Log.info(this, "attempting to create HTTP proxied socket using proxy " + proxyHost + ":" + proxyPort);
Socket sock = getSocket(proxyHost, proxyPort, ssl, false);
if (!ssl) {
return sock;
} catch (IOException e) {
- if (Log.on) Log.log(this, "exception in attemptHttpProxy(): " + e);
+ if (Log.on) Log.info(this, "exception in attemptHttpProxy(): " + e);
return null;
}
}
InetAddress addr = null;
try { addr = InetAddress.getByName(host); } catch (Exception e) { }
- if (Log.verbose) Log.log(this, "attempting to create SOCKSv4" + (addr == null ? "" : "a") +
+ if (Log.verbose) Log.info(this, "attempting to create SOCKSv4" + (addr == null ? "" : "a") +
" proxied socket using proxy " + proxyHost + ":" + proxyPort);
try {
if (ssl) ((SSL)sock).negotiate();
return sock;
}
- if (Log.on) Log.log(this, "SOCKS server denied access, code " + (success & 0xff));
+ if (Log.on) Log.info(this, "SOCKS server denied access, code " + (success & 0xff));
return null;
} catch (IOException e) {
- if (Log.on) Log.log(this, "exception in attemptSocksProxy(): " + e);
+ if (Log.on) Log.info(this, "exception in attemptSocksProxy(): " + e);
return null;
}
}
/** executes the PAC script and dispatches a call to one of the other attempt methods based on the result */
private Socket attemptPAC(org.xwt.js.JS pacFunc) {
- if (Log.verbose) Log.log(this, "evaluating PAC script");
+ if (Log.verbose) Log.info(this, "evaluating PAC script");
String pac = null;
try {
org.xwt.js.JSArray args = new org.xwt.js.JSArray();
Object obj = pacFunc.call(url.toString(), url.getHost(), null, null, 2);
- if (Log.verbose) Log.log(this, " PAC script returned \"" + obj + "\"");
+ if (Log.verbose) Log.info(this, " PAC script returned \"" + obj + "\"");
pac = obj.toString();
} catch (Throwable e) {
- if (Log.on) Log.log(this, "PAC script threw exception " + e);
+ if (Log.on) Log.info(this, "PAC script threw exception " + e);
return null;
}
StringTokenizer st = new StringTokenizer(pac, ";", false);
while (st.hasMoreTokens()) {
String token = st.nextToken().trim();
- if (Log.verbose) Log.log(this, " trying \"" + token + "\"...");
+ if (Log.verbose) Log.info(this, " trying \"" + token + "\"...");
try {
Socket ret = null;
if (token.startsWith("DIRECT"))
Integer.parseInt(token.substring(token.indexOf(':') + 1)));
if (ret != null) return ret;
} catch (Throwable e) {
- if (Log.on) Log.log(this, "attempt at \"" + token + "\" failed due to " + e + "; trying next token");
+ if (Log.on) Log.info(this, "attempt at \"" + token + "\" failed due to " + e + "; trying next token");
}
}
- if (Log.on) Log.log(this, "all PAC results exhausted");
+ if (Log.on) Log.info(this, "all PAC results exhausted");
return null;
}
path = this.url.getFile();
if (port == -1) port = ssl ? 443 : 80;
host = this.url.getHost();
- if (Log.verbose) Log.log(this, "creating HTTP object for connection to " + host + ":" + port);
+ if (Log.verbose) Log.info(this, "creating HTTP object for connection to " + host + ":" + port);
Proxy pi = Platform.detectProxy();
OUTER: do {
}
private void doProxyAuth(Hashtable h0, String method) throws IOException {
- if (Log.on) Log.log(this, "Proxy AuthChallenge: " + h0.get("proxy-authenticate"));
+ if (Log.on) Log.info(this, "Proxy AuthChallenge: " + h0.get("proxy-authenticate"));
Hashtable h = parseAuthenticationChallenge(h0.get("proxy-authenticate").toString());
String style = h.get("AUTHTYPE").toString();
String realm = (String)h.get("realm");
if (style.equals("NTLM") && Proxy.Authorization.authorization2 == null) {
- Log.log(this, "Proxy identified itself as NTLM, sending Type 1 packet");
+ Log.info(this, "Proxy identified itself as NTLM, sending Type 1 packet");
Proxy.Authorization.authorization2 = "NTLM " + Base64.encode(Proxy.NTLM.type1);
return;
}
"algorithm=MD5";
} else if (style.equals("NTLM")) {
- Log.log(this, "Proxy identified itself as NTLM, got Type 2 packet");
+ Log.info(this, "Proxy identified itself as NTLM, got Type 2 packet");
byte[] type2 = Base64.decode(((String)h0.get("proxy-authenticate")).substring(5).trim());
for(int i=0; i<type2.length; i += 4) {
String log = "";
if (i+1<type2.length) log += Integer.toString(type2[i+1] & 0xff, 16) + " ";
if (i+2<type2.length) log += Integer.toString(type2[i+2] & 0xff, 16) + " ";
if (i+3<type2.length) log += Integer.toString(type2[i+3] & 0xff, 16) + " ";
- Log.log(this, log);
+ Log.info(this, log);
}
// FEATURE: need to keep the connection open between type1 and type3
// FEATURE: finish this
String s = null;
String script = "";
while((s = br.readLine()) != null) script += s + "\n";
- if (Log.on) Log.log(Proxy.class, "successfully retrieved WPAD PAC:");
- if (Log.on) Log.log(Proxy.class, script);
+ if (Log.on) Log.info(Proxy.class, "successfully retrieved WPAD PAC:");
+ if (Log.on) Log.info(Proxy.class, script);
// MS CARP hack
Vector carpHosts = new Vector();
for(int i=0; i<script.length(); i++)
if (script.regionMatches(i, "new Node(", 0, 9)) {
String host = script.substring(i + 10, script.indexOf('\"', i + 11));
- if (Log.on) Log.log(Proxy.class, "Detected MS Proxy Server CARP Script, Host=" + host);
+ if (Log.on) Log.info(Proxy.class, "Detected MS Proxy Server CARP Script, Host=" + host);
carpHosts.addElement(host);
}
if (carpHosts.size() > 0) {
for(int i=0; i<carpHosts.size(); i++)
script += "PROXY " + carpHosts.elementAt(i) + "; ";
script += "\";\n}";
- if (Log.on) Log.log(Proxy.class, "DeCARPed PAC script:");
- if (Log.on) Log.log(Proxy.class, script);
+ if (Log.on) Log.info(Proxy.class, "DeCARPed PAC script:");
+ if (Log.on) Log.info(Proxy.class, script);
}
JSFunction scr = JSFunction.fromReader("PAC script at " + url, 0, new StringReader(script));
return (JSFunction)proxyAutoConfigRootJSScope.get("FindProxyForURL");
} catch (Exception e) {
if (Log.on) {
- Log.log(Platform.class, "WPAD detection failed due to:");
+ Log.info(Platform.class, "WPAD detection failed due to:");
if (e instanceof JSExn) {
try {
org.xwt.js.JSArray arr = new org.xwt.js.JSArray();
arr.addElement(((JSExn)e).getObject());
} catch (Exception e2) {
- Log.log(Platform.class, e);
+ Log.info(Platform.class, e);
}
}
- else Log.log(Platform.class, e);
+ else Log.info(Platform.class, e);
}
return null;
}
// a password, so we should reattempt authorization.
if (authorization != oldAuth) return;
- if (Log.on) Log.log(Authorization.class, "displaying proxy authorization dialog");
+ if (Log.on) Log.info(Authorization.class, "displaying proxy authorization dialog");
Scheduler.add(new Scheduler.Task() {
public void perform() throws Exception {
Box b = new Box();
});
waitingForUser.block();
- if (Log.on) Log.log(Authorization.class, "got proxy authorization info; re-attempting connection");
+ if (Log.on) Log.info(Authorization.class, "got proxy authorization info; re-attempting connection");
}
}
try {
return InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
- if (Log.on) Log.log(this, "strange... host does not know its own address");
+ if (Log.on) Log.info(this, "strange... host does not know its own address");
return null;
}
case "dnsDomainLevels":
xwtDir = new File(xwtDirName);
if (!xwtDir.mkdirs()) xwtDir = null;
} catch (Exception e) {
- Log.log(LocalStorage.class, "unable to create xwt directory " + xwtDirName);
+ Log.info(LocalStorage.class, "unable to create xwt directory " + xwtDirName);
}
try {
cacheDir = new File(xwtDirName + java.io.File.separatorChar + "cache");
if (!cacheDir.mkdirs()) cacheDir = null;
} catch (Exception e) {
- Log.log(LocalStorage.class, "unable to create cache directory " + xwtDirName + java.io.File.separatorChar + "cache");
+ Log.info(LocalStorage.class, "unable to create cache directory " + xwtDirName + java.io.File.separatorChar + "cache");
}
}
}
Platform.forceLoad();
- if (Log.on) for(int i=0; i<args.length; i++) Log.log(Main.class, "argument " + i + ": " + args[i]);
+ if (Log.on) for(int i=0; i<args.length; i++) Log.info(Main.class, "argument " + i + ": " + args[i]);
String initialTemplateName = args.length > startargs + 1 ? args[startargs + 1] : "main";
initialTemplateName = initialTemplateName.replace('.', '/');
initialTemplate = initialTemplateName;
}
- if (Log.on) Log.log(Main.class, "loading xwar");
+ if (Log.on) Log.info(Main.class, "loading xwar");
final XWT xwt = new XWT(rr);
final Res final_rr = rr;
}
// could not find image
- if (in == null) { Log.log(Picture.class, "couldn't load image for resource " + r); return; }
+ if (in == null) { Log.info(Picture.class, "couldn't load image for resource " + r); return; }
try {
PushbackInputStream pbis = new PushbackInputStream(in);
p.isLoaded = true;
Scheduler.add(callback);
} catch (Exception e) {
- Log.log(this, "exception while loading image");
- Log.log(this, e);
+ Log.info(this, "exception while loading image");
+ Log.info(this, e);
}
} }.start();
build = (String)Class.forName("org.xwt.Build").getField("build").get(null);
} catch (ClassNotFoundException cnfe) {
} catch (Exception e) {
- if (Log.on) Log.log(Platform.class, "exception while detecting build:");
- if (Log.on) Log.log(Platform.class, e);
+ if (Log.on) Log.info(Platform.class, "exception while detecting build:");
+ if (Log.on) Log.info(Platform.class, e);
}
- if (Log.on) Log.log(Platform.class, "XWT build: " + build);
+ if (Log.on) Log.info(Platform.class, "XWT build: " + build);
- if (Log.on) Log.log(Platform.class, "XWT VM detection: vendor = " + vendor);
- if (Log.on) Log.log(Platform.class, " version = " + version);
- if (Log.on) Log.log(Platform.class, " os = " + os_name + " [version " + os_version + "]");
+ if (Log.on) Log.info(Platform.class, "XWT VM detection: vendor = " + vendor);
+ if (Log.on) Log.info(Platform.class, " version = " + version);
+ if (Log.on) Log.info(Platform.class, " os = " + os_name + " [version " + os_version + "]");
if (platform_class == null) {
- if (Log.on) Log.log(Platform.class, "Unable to detect JVM");
+ if (Log.on) Log.info(Platform.class, "Unable to detect JVM");
criticalAbort("Unable to detect JVM");
}
- if (Log.on) Log.log(Platform.class, " platform = " + platform.getDescriptiveName());
- if (Log.on) Log.log(Platform.class, " class = " + platform.getClass().getName());
+ if (Log.on) Log.info(Platform.class, " platform = " + platform.getDescriptiveName());
+ if (Log.on) Log.info(Platform.class, " class = " + platform.getClass().getName());
platform.postInit();
} catch (Exception e) {
- if (Log.on) Log.log(Platform.class, "Exception while trying to detect JVM");
- if (Log.on) Log.log(Platform.class, e);
+ if (Log.on) Log.info(Platform.class, "Exception while trying to detect JVM");
+ if (Log.on) Log.info(Platform.class, e);
criticalAbort("Unable to detect JVM");
}
if (s.startsWith(key + "="))
return s.substring(key.length() + 1);
} catch (Exception e) {
- if (Log.on) Log.log(this, "Exception while reading from environment:");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "Exception while reading from environment:");
+ if (Log.on) Log.info(this, e);
}
return null;
}
Method m = c.getMethod("openURL", new Class[] { String.class });
m.invoke(null, new String[] { url });
} catch (Exception e) {
- Log.log(this, e);
+ Log.info(this, e);
}
}
/** opens a new browser window */
public static void newBrowserWindow(String url) {
if (!(url.startsWith("https://") || url.startsWith("http://") || url.startsWith("ftp://") || url.startsWith("mailto:"))) {
- if (Log.on) Log.log(Platform.class, "xwt.newBrowserWindow() only supports http and https urls");
+ if (Log.on) Log.info(Platform.class, "xwt.newBrowserWindow() only supports http and https urls");
return;
}
if (u.startsWith("https")) u = "http" + u.substring(5);
new URL(u);
} catch (MalformedURLException e) {
- if (Log.on) Log.log(Platform.class, "URL " + url + " is not well-formed");
- if (Log.on) Log.log(Platform.class, e);
+ if (Log.on) Log.info(Platform.class, "URL " + url + " is not well-formed");
+ if (Log.on) Log.info(Platform.class, e);
}
- if (Log.on) Log.log(Platform.class, "newBrowserWindow, url = " + url);
+ if (Log.on) Log.info(Platform.class, "newBrowserWindow, url = " + url);
platform._newBrowserWindow(url);
}
/** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
public static void criticalAbort(String message) {
- if (Log.on) Log.log(Platform.class, "Critical Abort:");
- if (Log.on) Log.log(Platform.class, message);
+ if (Log.on) Log.info(Platform.class, "Critical Abort:");
+ if (Log.on) Log.info(Platform.class, message);
platform._criticalAbort(message);
}
if (alreadyDetectedProxy) return null;
alreadyDetectedProxy = true;
- if (Log.on) Log.log(Platform.class, "attempting environment-variable DNS proxy detection");
+ if (Log.on) Log.info(Platform.class, "attempting environment-variable DNS proxy detection");
cachedProxyInfo = org.xwt.HTTP.Proxy.detectProxyViaManual();
if (cachedProxyInfo != null) return cachedProxyInfo;
- if (Log.on) Log.log(Platform.class, "attempting " + platform.getClass().getName() + " proxy detection");
+ if (Log.on) Log.info(Platform.class, "attempting " + platform.getClass().getName() + " proxy detection");
cachedProxyInfo = platform._detectProxy();
if (cachedProxyInfo != null) return cachedProxyInfo;
Template t = Template.getTemplate(addExtension(".xwt"));
return t == null ? null : t.getStatic();
} catch (Exception e) {
- Log.log(this, e);
+ Log.info(this, e);
return null;
}
}
sb.append(((Boolean)o).booleanValue() ? "1" : "0");
sb.append("</" + name + ">\r\n");
} catch (IOException e) {
- if (Log.on) Log.log(this, "caught IOException while attempting to send a ByteStream via SOAP");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "caught IOException while attempting to send a ByteStream via SOAP");
+ if (Log.on) Log.info(this, e);
throw new JSExn("caught IOException while attempting to send a ByteStream via SOAP");
}
}
renderAll();
} catch (JSExn e) {
- Log.log(Scheduler.class, "a JavaScript thread spawned with xwt.thread() threw an exception:");
- Log.log(Scheduler.class, e);
+ Log.info(Scheduler.class, "a JavaScript thread spawned with xwt.thread() threw an exception:");
+ Log.info(Scheduler.class, e);
} catch (Exception e) {
- Log.log(Scheduler.class, "a Task threw an exception which was caught by the scheduler:");
- Log.log(Scheduler.class, e);
+ Log.info(Scheduler.class, "a Task threw an exception which was caught by the scheduler:");
+ Log.info(Scheduler.class, e);
}
// if an Error is thrown it will cause the engine to quit
}
try {
root.putAndTriggerTraps("_Move", T);
} catch (JSExn e) {
- Log.log(Surface.class, "Exception thrown from Move message handler");
+ Log.info(Surface.class, "Exception thrown from Move message handler");
Log.logJS(e);
}
if (!cursor.equals(oldcursor)) syncCursor();
/** Indicates that the Surface is no longer needed */
public final void dispose(boolean quitIfAllSurfacesGone) {
- if (Log.on) Log.log(this, "disposing " + this);
+ if (Log.on) Log.info(this, "disposing " + this);
allSurfaces.removeElement(this);
_dispose();
if (allSurfaces.size() == 0) {
- if (Log.on) Log.log(this, "exiting because last surface was destroyed");
+ if (Log.on) Log.info(this, "exiting because last surface was destroyed");
System.exit(0);
}
}
try {
boxContainingMouse.putAndTriggerTraps(name, value);
} catch (JSExn e) {
- Log.log(Surface.class, "Exception thrown from "+name+" handler");
+ Log.info(Surface.class, "Exception thrown from "+name+" handler");
Log.logJS(e);
} finally {
Platform.clipboardReadEnabled = false;
} catch (JSExn e) {
b.clear(b.VISIBLE);
b.mark_for_repack();
- Log.log(Template.class, "WARNING: exception (below) thrown during application of template;");
- Log.log(Template.class, " setting visibility of target box to \"false\"");
+ Log.info(Template.class, "WARNING: exception (below) thrown during application of template;");
+ Log.info(Template.class, " setting visibility of target box to \"false\"");
Log.logJS(e);
}
}
objects.setElementAt(nd, objects.size() - 1);
} catch (Exception e) {
- if (Log.on) Log.log(this, "error parsing date : " + s);
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "error parsing date : " + s);
+ if (Log.on) Log.info(this, e);
}
case "member":
Object memberValue = objects.elementAt(objects.size() - 1);
public void characters(char[] ch, int start, int length) {
try { content.write(ch, start, length); }
catch (Exception e) {
- if (Log.on) Log.log(this, "Exception in XMLRPC.content() -- this should never happen");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "Exception in XMLRPC.content() -- this should never happen");
+ if (Log.on) Log.info(this, e);
}
}
}
sb.append("\n </base64></value>\n");
} catch (IOException e) {
- if (Log.on) Log.log(this, "caught IOException while attempting to send a ByteStream via XML-RPC");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "caught IOException while attempting to send a ByteStream via XML-RPC");
+ if (Log.on) Log.info(this, e);
throw new JSExn("caught IOException while attempting to send a ByteStream via XML-RPC");
}
final void call(final JS.UnpauseCallback callback, final JSArray args) {
try {
- if (Log.verbose) Log.log(this, "call to " + url + " : " + method);
+ if (Log.verbose) Log.info(this, "call to " + url + " : " + method);
String request = buildRequest(args);
- if (Log.verbose) Log.log(this, "send:\n" + request);
+ if (Log.verbose) Log.info(this, "send:\n" + request);
InputStream is = http.POST("text/xml", request);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
if (tracker == null) tracker = new Hash();
}
} catch (RuntimeException e) {
// FIXME: maybe JSExn should take a second argument, Exception
- Log.log(this, "xwt."+name+"() threw: "+e);
+ Log.info(this, "xwt."+name+"() threw: "+e);
throw new JSExn("invalid argument for xwt object method "+name+"()");
}
} catch (XML.Exn e) {
throw new JSExn("error parsing XML: " + e.toString());
} catch (IOException e) {
- if (Log.on) Log.log(this, "IO Exception while reading from file");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "IO Exception while reading from file");
+ if (Log.on) Log.info(this, e);
throw new JSExn("error reading from Resource");
}
return obStack.size() >= 1 ? (JS)obStack.elementAt(0) : null;
protected Surface _createSurface(Box b, boolean framed) { return new AWTSurface(b, framed); }
protected void postInit() {
- if (Log.on) Log.log(Platform.class, " color depth = " +
+ if (Log.on) Log.info(Platform.class, " color depth = " +
Toolkit.getDefaultToolkit().getColorModel().getPixelSize() + "bpp");
}
protected void _criticalAbort(String message) {
- if (Log.on) Log.log(this, message);
+ if (Log.on) Log.info(this, message);
final Dialog d = new Dialog(new Frame(), "XWT Cannot Continue");
d.setLayout(new BorderLayout());
TextArea ta = new TextArea("XWT cannot continue because:\n\n" + message, 10, 80);
public void setIcon(Picture i) { if (frame != null) frame.setIconImage(((AWTPicture)i).i); }
public void _setSize(int width, int height) { window.setSize(width + (insets.left + insets.right), height + (insets.top + insets.bottom)); }
public void setInvisible(boolean b) { window.setVisible(!b); }
- protected void _setMinimized(boolean b) { if (Log.on) Log.log(this, "JDK 1.1 platforms cannot minimize or unminimize windows"); }
+ protected void _setMinimized(boolean b) { if (Log.on) Log.info(this, "JDK 1.1 platforms cannot minimize or unminimize windows"); }
protected void _setMaximized(boolean b) {
if (!b) {
- if (Log.on) Log.log(this, "JDK 1.1 platforms cannot unmaximize windows");
+ if (Log.on) Log.info(this, "JDK 1.1 platforms cannot unmaximize windows");
return;
}
window.setLocation(new Point(0, 0));
// this is here to catch HeadlessException on jdk1.4
} catch (java.lang.UnsupportedOperationException e) {
- if (Log.on) Log.log(this, "Exception thrown in AWTSurface$InnerFrame() -- this should never happen");
- if (Log.on) Log.log(this, e);
+ if (Log.on) Log.info(this, "Exception thrown in AWTSurface$InnerFrame() -- this should never happen");
+ if (Log.on) Log.info(this, e);
}
insets = window.getInsets();
PixelGrabber pg = new PixelGrabber(i, 0, 0, width, height, data, 0, width);
pg.grabPixels();
if ((pg.getStatus() & ImageObserver.ABORT) != 0)
- Log.log(this, "PixelGrabber reported an error while decoding JPEG image");
+ Log.info(this, "PixelGrabber reported an error while decoding JPEG image");
p.width = width;
p.height = height;
p.data = data;
} catch (Exception e) {
- Log.log(this, "Exception caught while decoding JPEG image");
- Log.log(this, e);
+ Log.info(this, "Exception caught while decoding JPEG image");
+ Log.info(this, e);
}
}
}