import java.util.*;
import java.util.zip.*;
import java.lang.*;
-import java.applet.*;
import org.xwt.js.*;
import org.xwt.util.*;
/** Load a directory as if it were an archive */
public static synchronized void loadDirectory(File dir) throws IOException { loadDirectory(dir, ""); }
private static synchronized void loadDirectory(File dir, String prefix) throws IOException {
- String n = prefix.replace(File.separatorChar, '.');
- if (n.endsWith(".")) n = n.substring(0, n.length() - 1);
+ String n = prefix.replace(File.separatorChar, '.');
+ if (n.endsWith(".")) n = n.substring(0, n.length() - 1);
new Static(n);
String[] subfiles = dir.list();
for(int i=0; i<subfiles.length; i++) {
if (clear && callback != null) {
clear = false;
ThreadMessage.newthread(new JS.Callable() {
- public Object call(Array args_) throws JS.Exn {
+ public Object call(JS.Array args_) throws JS.Exn {
try {
- Array args = new Array();
- args.addElement(new Double(bytesDownloaded));
- args.addElement(new Double(length));
+ JS.Array args = new JS.Array();
+ args.addElement(new Double(bytesDownloaded));
+ args.addElement(new Double(length));
callback.call(args);
} finally {
clear = true;
// placeholder so resolveResource() works properly
bytes.put(name.replace('/', '.'), new byte[] { });
name = name.substring(0, name.length() - 4);
- Static.createStatic(name.replace('/', '.'), false);
- Template.buildTemplate(zis, name.replace('/', '.'), t);
+ Static.createStatic(name.replace('/', '.'), false);
+ Template.buildTemplate(zis, name.replace('/', '.'), t);
} else {
bytes.put(name.replace('/', '.'), isToByteArray(zis));
/** holds the current theme mappings */
static Vector mapTo = new Vector();
+ static {
+ mapFrom.addElement("xwt.standard");
+ mapTo.addElement("org.xwt.themes.monopoly");
+ }
/**
* Resolves the partial resource name <tt>name</tt> to a fully