bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
JDialog(Frame owner) { this(owner, "dialog"); }
public JDialog() { this(owner, "dialog"); }
11,124
JDialog(Frame owner) { this(owner, "dialog"); }
JDialog(Frame owner) { this(SwingUtilities.getOwnerFrame(), "", false, null); }
11,125
protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); }
protected void addImpl(Component comp, Object constraints, int index) { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components disallowed."); super.addImpl(comp, constraints, index); }
11,126
JRootPane createRootPane() { return new JRootPane(); }
JRootPane createRootPane() { return new JRootPane(); }
11,127
Container getContentPane() { return getRootPane().getContentPane(); }
Container getContentPane() { return getRootPane().getContentPane(); }
11,128
Component getGlassPane() { return getRootPane().getGlassPane(); }
Component getGlassPane() { return getRootPane().getGlassPane(); }
11,129
JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
11,130
JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); }
JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); }
11,131
protected boolean isRootPaneCheckingEnabled() { return checking; }
protected boolean isRootPaneCheckingEnabled() { return rootPaneCheckingEnabled; }
11,132
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch (getDefaultCloseOperation()) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
11,133
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
11,134
public void remove(Component comp) { getContentPane().remove(comp); }
public void remove(Component comp) { if (comp == rootPane) super.remove(rootPane); else getContentPane().remove(comp); }
11,135
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
11,136
void setDefaultCloseOperation(int operation) { close_action = operation; }
void setDefaultCloseOperation(int operation) { close_action = operation; }
11,137
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
11,138
void setJMenuBar(JMenuBar menubar) { getRootPane().setJMenuBar(menubar); }
void setJMenuBar(JMenuBar menubar) { getRootPane().setJMenuBar(menubar); }
11,139
void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); }
void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); }
11,140
public void setLayout(LayoutManager manager) { super.setLayout(manager); }
public void setLayout(LayoutManager manager) { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - cannot set layout."); super.setLayout(manager); }
11,141
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
protected void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
11,142
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; rootPane.show(); add(rootPane); }
11,143
protected void setRootPaneCheckingEnabled(boolean enabled) { checking = enabled; }
protected void setRootPaneCheckingEnabled(boolean enabled) { rootPaneCheckingEnabled = enabled; }
11,144
public WrongPolicy(String why) { super(why); }
public WrongPolicy() { super(why); }
11,145
public WrongPolicy(String why) { super(why); }
public WrongPolicy(String why) { }
11,146
public ServantNotActive(String why) { super(why); }
public ServantNotActive() { super(why); }
11,147
public ServantNotActive(String why) { super(why); }
public ServantNotActive(String why) { }
11,148
public IllegalPathStateException(String msg) { super(msg); }
public IllegalPathStateException() { super(msg); }
11,149
public IllegalPathStateException(String msg) { super(msg); }
public IllegalPathStateException(String msg) { }
11,150
public void update(byte[] input) { engineUpdate(input, 0, input.length); }
public void update(byte input) { engineUpdate(input, 0, input.length); }
11,152
public void update(byte[] input) { engineUpdate(input, 0, input.length); }
public void update(byte[] input) { engineUpdate(input); }
11,153
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
11,154
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.message = message; this.headers = headers; }
11,155
public static long[] read(InputStream input) { ULongLongSeqHolder h = new ULongLongSeqHolder(); h._read(input); return h.value; }
public static long[] read(InputStream input) { ULongLongSeqHolder h = new ULongLongSeqHolder(); h._read(input); return h.value; }
11,157
public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_long); }
public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_ulong); }
11,158
public static void write(OutputStream output, long[] value) { ULongLongSeqHolder h = new ULongLongSeqHolder(value); h._write(output); }
public static void write(OutputStream output, long[] value) { ULongLongSeqHolder h = new ULongLongSeqHolder(value); h._write(output); }
11,159
public CommandRunner(Class cx, Method method, Object[] args) { this.cx = cx; this.method = method; this.args = args; }
public CommandRunner(Class cx, Method method, Object target, Object[] args) { this.cx = cx; this.method = method; this.args = args; }
11,160
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
11,162
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
11,163
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,164
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,165
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,166
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,167
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,168
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
11,169
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } }
11,170
protected Class getCommandClass(String cmd) throws ClassNotFoundException { try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { return Class.forName(cmd); } }
protected Class getCommandClass(String cmd) throws ClassNotFoundException { try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); return cl.loadClass(cmd); } }
11,171
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
11,172
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
11,173
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
11,174
public static ComponentUI createUI(final JComponent c) { return new BasicTabbedPaneUI(); }
public static ComponentUI createUI(final JComponent c) { return new BasicTabbedPaneUI(); }
11,175
public Dimension getPreferredSize(JComponent c) { JTabbedPane p = (JTabbedPane) c; Dimension d = new Dimension(50,50); for (int i=0;i<p.getTabCount();i++) { Component comp = p.getComponentAt(i); Dimension pr = comp.getPreferredSize(); d.width = Math.max(d.width, comp.getWidth()); d.height = Math.max(d.height, comp.getHeight()); } Insets i = p.getInsets(); d.width += i.left + i.right; d.height += i.top + i.bottom; int height_of_tabs = 25; d.height += height_of_tabs; // FIXME: should be max of panes in p return d; }
public Dimension getPreferredSize(JComponent c) { JTabbedPane p = (JTabbedPane) c; Dimension d = new Dimension(50,50); for (int i=0;i<p.getTabCount();i++) { Component comp = p.getComponentAt(i); Dimension pr = comp.getPreferredSize(); d.width = Math.max(d.width, comp.getWidth()); d.height = Math.max(d.height, comp.getHeight()); } Insets i = p.getInsets(); d.width += i.left + i.right; d.height += i.top + i.bottom; int height_of_tabs = 25; d.height += height_of_tabs; // FIXME: should be max of panes in p return d; }
11,176
public Rectangle getTabBounds(JTabbedPane pane, int index) { return null; }
public Rectangle getTabBounds(JTabbedPane pane, int index) { return null; }
11,177
public int getTabRunCount(JTabbedPane pane) { return 0; }
public int getTabRunCount(JTabbedPane pane) { return 0; }
11,178
public void installUI(final JComponent c) { super.installUI(c); }
public void installUI(final JComponent c) { super.installUI(c); }
11,179
public int tabForCoordinate(JTabbedPane pane, int x, int y) { return 0; }
public int tabForCoordinate(JTabbedPane pane, int x, int y) { return 0; }
11,180
public void setJMenuBar(JMenuBar m) { menuBar = m; getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); }
public void setJMenuBar(JMenuBar m) { menuBar = m; if (menuBar != null) jlPane.add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); }
11,181
JLayeredPane() { }
JLayeredPane() { }
11,182
public boolean isPressed() { return pressed; }
public boolean isPressed() { return pressed; }
11,183
public void fireActionPerformed(ActionEvent event) { for (int i = 0; i < actions.size(); i++) { ActionListener a = (ActionListener) actions.get(i); a.actionPerformed(event); } }
public void fireActionPerformed(ActionEvent event) { for (int i = 0; i < actions.size(); i++) { ActionListener a = (ActionListener) actions.get(i); a.actionPerformed(event); } }
11,184
public Iterator<FSEntry> iterator() throws IOException;
public Iterator<? extends FSEntry> iterator() throws IOException;
11,186
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); header.setBackground(defaults.getColor("TableHeader.background")); header.setForeground(defaults.getColor("TableHeader.foreground")); header.setFont(defaults.getFont("TableHeader.font")); cellBorder = defaults.getBorder("TableHeader.cellBorder"); }
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); header.setBackground(defaults.getColor("TableHeader.background")); header.setForeground(defaults.getColor("TableHeader.foreground")); header.setFont(defaults.getFont("TableHeader.font")); cellBorder = defaults.getBorder("TableHeader.cellBorder"); }
11,187
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white)/*, "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/ }; defaults.putDefaults(uiDefaults); }
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white), "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/ }; defaults.putDefaults(uiDefaults); }
11,189
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white)/*, "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/ }; defaults.putDefaults(uiDefaults); }
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white)/*, "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12) }; defaults.putDefaults(uiDefaults); }
11,190
public static Icon getCheckBoxMenuItemIcon() { return new DummyIcon(); }
public static Icon getCheckBoxMenuItemIcon() { return getCheckBoxIcon(); }
11,192
public static Icon getMenuArrowIcon() { return new DummyIcon(); }
public static Icon getMenuArrowIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.BLACK); g.fillPolygon(new Polygon(new int[] { 3, 9, 3 }, new int[] { 2, 6, 10 }, 3)); g.setColor(saved); g.translate(-x, -y); } }; }
11,193
public static Icon getRadioButtonMenuItemIcon() { return new DummyIcon(); }
public static Icon getRadioButtonMenuItemIcon() { return getRadioButtonIcon(); }
11,194
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); modifiers = EventModifier.extend(modifiers); }
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); modifiersEx = EventModifier.extend(modifiers) & EventModifier.NEW_MASK; }
11,195
public void addListSelectionListener(ListSelectionListener listener) { get_listeners().addElement(listener); }
public void addListSelectionListener(ListSelectionListener listener) { get_listeners().addElement(listener); }
11,196
public void removeListSelectionListener(ListSelectionListener listener) { get_listeners().removeElement(listener); }
public void removeListSelectionListener(ListSelectionListener listener) { get_listeners().removeElement(listener); }
11,197
public Entity declareEntity(String name, String publicId, String systemId, String notation) { DomEntity entity; if (name.charAt(0) == '%' || "[dtd]".equals(name)) { return null; } if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } getEntities(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); if (entities.getNamedItem(name) != null) { return null; } entity = new DomEntity(owner, name, publicId, systemId, notation); entities.setNamedItem(entity); return entity; }
public Entity declareEntity(String name, String publicId, String systemId, String notation) { DomEntity entity; if (name.charAt(0) == '%' || "[dtd]".equals(name)) { return null; } if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } getEntities(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); if (entities.getNamedItem(name) != null) { return null; } entity = new DomEntity(owner, name, publicId, systemId, notation); entities.setNamedItem(entity); return entity; }
11,198
public Notation declareNotation(String name, String publicId, String systemId) { DomNotation notation; if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } getNotations(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); notation = new DomNotation(owner, name, publicId, systemId); notations.setNamedItem(notation); return notation; }
public Notation declareNotation(String name, String publicId, String systemId) { DomNotation notation; if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } getNotations(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); notation = new DomNotation(owner, name, publicId, systemId); notations.setNamedItem(notation); return notation; }
11,199
public void close() throws IOException { try { closeConnection(); } finally { fireConnectionEvent(ConnectionEvent.CONNECTION_CLOSED); } }
public void close() throws IOException { try { closeConnection(); } finally { fireConnectionEvent(ConnectionEvent.CONNECTION_CLOSED); } }
11,200
public void close() throws IOException { try { closeConnection(); } finally { fireConnectionEvent(ConnectionEvent.CONNECTION_CLOSED); } }
public void close() throws IOException { try { closeConnection(); } finally { fireConnectionEvent(ConnectionEvent.CONNECTION_CLOSED); } }
11,201
protected String getURI() { StringBuffer buf = new StringBuffer(); buf.append(secure ? "https://" : "http://"); buf.append(hostname); if (secure) { if (port != HTTPConnection.HTTPS_PORT) { buf.append(':'); buf.append(port); } } else { if (port != HTTPConnection.HTTP_PORT) { buf.append(':'); buf.append(port); } } return buf.toString(); }
protected String getURI() { StringBuilder buf = new StringBuilder(); buf.append(secure ? "https://" : "http://"); buf.append(hostname); if (secure) { if (port != HTTPConnection.HTTPS_PORT) { buf.append(':'); buf.append(port); } } else { if (port != HTTPConnection.HTTP_PORT) { buf.append(':'); buf.append(port); } } return buf.toString(); }
11,202
public Request newRequest(String method, String path) { if (method == null || method.length() == 0) { throw new IllegalArgumentException("method must have non-zero length"); } if (path == null || path.length() == 0) { path = "/"; } Request ret = new Request(this, method, path); if ((secure && port != HTTPS_PORT) || (!secure && port != HTTP_PORT)) { ret.setHeader("Host", hostname + ":" + port); } else { ret.setHeader("Host", hostname); } ret.setHeader("User-Agent", userAgent); ret.setHeader("Connection", "keep-alive"); ret.setHeader("Accept-Encoding", "chunked;q=1.0, gzip;q=0.9, deflate;q=0.8, " + "identity;q=0.6, *;q=0"); if (cookieManager != null) { Cookie[] cookies = cookieManager.getCookies(hostname, secure, path); if (cookies != null && cookies.length > 0) { StringBuffer buf = new StringBuffer(); buf.append("$Version=1"); for (int i = 0; i < cookies.length; i++) { buf.append(','); buf.append(' '); buf.append(cookies[i].toString()); } ret.setHeader("Cookie", buf.toString()); } } fireRequestEvent(RequestEvent.REQUEST_CREATED, ret); return ret; }
public Request newRequest(String method, String path) { if (method == null || method.length() == 0) { throw new IllegalArgumentException("method must have non-zero length"); } if (path == null || path.length() == 0) { path = "/"; } Request ret = new Request(this, method, path); if ((secure && port != HTTPS_PORT) || (!secure && port != HTTP_PORT)) { ret.setHeader("Host", hostname + ":" + port); } else { ret.setHeader("Host", hostname); } ret.setHeader("User-Agent", userAgent); ret.setHeader("Connection", "keep-alive"); ret.setHeader("Accept-Encoding", "chunked;q=1.0, gzip;q=0.9, deflate;q=0.8, " + "identity;q=0.6, *;q=0"); if (cookieManager != null) { Cookie[] cookies = cookieManager.getCookies(hostname, secure, path); if (cookies != null && cookies.length > 0) { StringBuilder buf = new StringBuilder(); buf.append("$Version=1"); for (int i = 0; i < cookies.length; i++) { buf.append(','); buf.append(' '); buf.append(cookies[i].toString()); } ret.setHeader("Cookie", buf.toString()); } } fireRequestEvent(RequestEvent.REQUEST_CREATED, ret); return ret; }
11,203
public Request newRequest(String method, String path) { if (method == null || method.length() == 0) { throw new IllegalArgumentException("method must have non-zero length"); } if (path == null || path.length() == 0) { path = "/"; } Request ret = new Request(this, method, path); if ((secure && port != HTTPS_PORT) || (!secure && port != HTTP_PORT)) { ret.setHeader("Host", hostname + ":" + port); } else { ret.setHeader("Host", hostname); } ret.setHeader("User-Agent", userAgent); ret.setHeader("Connection", "keep-alive"); ret.setHeader("Accept-Encoding", "chunked;q=1.0, gzip;q=0.9, deflate;q=0.8, " + "identity;q=0.6, *;q=0"); if (cookieManager != null) { Cookie[] cookies = cookieManager.getCookies(hostname, secure, path); if (cookies != null && cookies.length > 0) { StringBuffer buf = new StringBuffer(); buf.append("$Version=1"); for (int i = 0; i < cookies.length; i++) { buf.append(','); buf.append(' '); buf.append(cookies[i].toString()); } ret.setHeader("Cookie", buf.toString()); } } fireRequestEvent(RequestEvent.REQUEST_CREATED, ret); return ret; }
public Request newRequest(String method, String path) { if (method == null || method.length() == 0) { throw new IllegalArgumentException("method must have non-zero length"); } if (path == null || path.length() == 0) { path = "/"; } Request ret = new Request(this, method, path); if ((secure && port != HTTPS_PORT) || (!secure && port != HTTP_PORT)) { ret.setHeader("Host", hostname + ":" + port); } else { ret.setHeader("Host", hostname); } ret.setHeader("User-Agent", userAgent); ret.setHeader("Connection", "keep-alive"); ret.setHeader("Accept-Encoding", "chunked;q=1.0, gzip;q=0.9, deflate;q=0.8, " + "identity;q=0.6, *;q=0"); if (cookieManager != null) { Cookie[] cookies = cookieManager.getCookies(hostname, secure, path); if (cookies != null && cookies.length > 0) { StringBuffer buf = new StringBuffer(); buf.append("$Version=1"); for (int i = 0; i < cookies.length; i++) { buf.append(','); buf.append(' '); buf.append(cookies[i].toString()); } ret.setHeader("Cookie", buf.toString()); } } return ret; }
11,204
public void paint(Graphics g) { //super.paint(g); Dimension s = getSize(); MetalUtils.fillMetalPattern(g, 2, 2, s.width - 4, s.height - 4, light, dark); }
public void paint(Graphics g) { //super.paint(g); Dimension s = getSize(); MetalUtils.fillMetalPattern(splitPane, g, 2, 2, s.width - 4, s.height - 4, light, dark); }
11,205
public void writeSTOSD() { write8(OSIZE_PREFIX); write8(0xAB); }
public void writeSTOSD() { write8(0xAB); }
11,206
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM); // TODO: perhaps try to identify type? }
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM); // TODO: perhaps try to identify type? }
11,208
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM); // TODO: perhaps try to identify type? }
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM); // TODO: perhaps try to identify type? }
11,209
public static void fill(float[] a, float val) { fill(a, 0, a.length, val); }
public static void fill(boolean[] a, boolean val) { fill(a, 0, a.length, val); }
11,210
public GNUGlyphVector(FontDelegate fontDelegate, Font font, FontRenderContext renderContext, int[] glyphs) { this.fontDelegate = fontDelegate; this.font = font; this.renderContext = renderContext; this.glyphs = glyphs; fontSize = font.getSize2D(); transform = font.getTransform(); // returns a modifiable copy transform.concatenate(renderContext.getTransform()); }
public GNUGlyphVector(FontDelegate fontDelegate, Font font, FontRenderContext renderContext, int[] glyphs) { this.fontDelegate = fontDelegate; this.font = font; this.renderContext = renderContext; this.glyphs = glyphs; fontSize = font.getSize2D(); transform = font.getTransform(); // returns a modifiable copy }
11,211
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getChar() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getShort() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
11,212
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getChar() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getChar() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
11,213
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getChar() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
public static String getName(ByteBuffer nameTable, int name, Locale locale) { int numRecords; int macLanguage, msLanguage; int offset; int namePlatform, nameEncoding, nameLanguage, nameID, nameLen; int nameStart; String result; boolean match; if (nameTable == null) return null; nameTable.position(0); /* We understand only format 0 of the name table. */ if (nameTable.getChar() != 0) return null; macLanguage = getMacLanguageCode(locale); msLanguage = getMicrosoftLanguageCode(locale); numRecords = nameTable.getChar(); offset = nameTable.getChar(); for (int i = 0; i < numRecords; i++) { namePlatform = nameTable.getChar(); nameEncoding = nameTable.getChar(); nameLanguage = nameTable.getChar(); nameID = nameTable.getChar(); nameLen = nameTable.getChar(); nameStart = offset + nameTable.getChar(); if (nameID != name) continue; match = false; switch (namePlatform) { case PLATFORM_MACINTOSH: if ((nameLanguage == macLanguage) || (locale == null)) match = true; else { switch (macLanguage) { case 49: /* Azerbaijani/Cyrillic */ match = (nameLanguage == /* Azerbaijani/Arabic */ 50) || (nameLanguage == /* Azerbaijani/Roman */ 150); break; case 57: /* Mongolian/Mongolian */ match = (nameLanguage == /* Mongolian/Cyrillic */ 58); break; case 83: /* Malay/Roman */ match = (nameLanguage == /* Malay/Arabic */ 84); break; } } break; case PLATFORM_MICROSOFT: if (((nameLanguage & 0xff) == msLanguage) || (locale == null)) match = true; break; } if (match) { result = decodeName(namePlatform, nameEncoding, nameLanguage, nameTable, nameStart, nameLen); if (result != null) return result; } } return null; }
11,214
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { bounds = getPathBounds(tree, path); int row = getRowForPath(tree, path); boolean cntlClick = isLocationInExpandControl(path, click.x, click.y); if (isLeaf(row)) { bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; } else if (tree.isExpanded(path) && expandedIcon != null) bounds.width += expandedIcon.getIconWidth() + 4; else if (collapsedIcon != null) bounds.width += collapsedIcon.getIconWidth() + 4; boolean inBounds = bounds.contains(click.x, click.y); if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if (inBounds && e.getClickCount() == 2 && !isLeaf(row)) toggleExpandState(path); if (cntlClick) { handleExpandControlClick(path, click.x, click.y); if (cellEditor != null) cellEditor.cancelCellEditing(); } else if (tree.isEditable()) startEditing(path, e); } } }
public void mousePressed(MouseEvent e) { Point click = e.getPoint(); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { bounds = getPathBounds(tree, path); int row = getRowForPath(tree, path); boolean cntlClick = isLocationInExpandControl(path, click.x, click.y); if (isLeaf(row)) { bounds.x -= rightChildIndent - 4; bounds.width += rightChildIndent + 4; } else if (tree.isExpanded(path) && expandedIcon != null) bounds.width += expandedIcon.getIconWidth() + 4; else if (collapsedIcon != null) bounds.width += collapsedIcon.getIconWidth() + 4; boolean inBounds = bounds.contains(click.x, click.y); if ((inBounds || cntlClick) && tree.isVisible(path)) { selectPath(tree, path); if (inBounds && e.getClickCount() == 2 && !isLeaf(row)) toggleExpandState(path); if (cntlClick) { handleExpandControlClick(path, click.x, click.y); if (cellEditor != null) cellEditor.cancelCellEditing(); } else if (tree.isEditable()) startEditing(path, e); } } }
11,218
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getRowCount()]; Object curr = getNextVisibleNode(treeModel.getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last)) toggleExpandState(path); } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
public void actionPerformed(ActionEvent e) { TreePath lead = tree.getLeadSelectionPath(); if (e.getActionCommand().equals("selectPreviousChangeLead") || e.getActionCommand().equals("selectPreviousExtendSelection") || e.getActionCommand().equals("selectPrevious") || e.getActionCommand().equals("selectNext") || e.getActionCommand().equals("selectNextExtendSelection") || e.getActionCommand().equals("selectNextChangeLead")) (new TreeIncrementAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectParent") || e.getActionCommand().equals("selectChild")) (new TreeTraverseAction(0, "")).actionPerformed(e); else if (e.getActionCommand().equals("selectAll")) { TreePath[] paths = new TreePath[tree.getVisibleRowCount()]; Object curr = getNextVisibleNode(treeModel.getRoot()); int i = 0; while (curr != null && i < paths.length) { paths[i] = new TreePath(getPathToRoot(curr, 0)); i++; } tree.addSelectionPaths(paths); } else if (e.getActionCommand().equals("startEditing")) tree.startEditingAtPath(lead); else if (e.getActionCommand().equals("toggle")) { if (tree.isEditing()) tree.stopEditing(); else { Object last = lead.getLastPathComponent(); TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last)) toggleExpandState(path); } } else if (e.getActionCommand().equals("clearSelection")) tree.clearSelection(); if (tree.isEditing() && !e.getActionCommand().equals("startEditing")) tree.cancelEditing(); tree.scrollPathToVisible(lead); }
11,219
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectPreviousChangeLead")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPreviousExtendSelection")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectPrevious")) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNext")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); } } else if (e.getActionCommand().equals("selectNextExtendSelection")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); tree.addSelectionPath(newPath); tree.setLeadSelectionPath(newPath); } } else if (e.getActionCommand().equals("selectNextChangeLead")) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); tree.setLeadSelectionPath(newPath); } } }
11,222
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(treeModel.getRoot(), last); if (!treeModel.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(treeModel.getRoot(), last); if (!treeModel.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
11,227
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(treeModel.getRoot(), last); if (!treeModel.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
public void actionPerformed(ActionEvent e) { Object last = tree.getLeadSelectionPath().getLastPathComponent(); if (e.getActionCommand().equals("selectParent")) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(treeModel.getRoot(), last); if (!treeModel.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getActionCommand().equals("selectChild")) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } }
11,228
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4, fm.getHeight()); } return new Rectangle(x, y, 0, 0); }
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4, fm.getHeight()); } return new Rectangle(x, y, 0, 0); }
11,230
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
11,231
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
11,232
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
11,233
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
11,234
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return null; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return null; }
11,235
public TreePath getPathForRow(JTree tree, int row) { if (treeModel != null) { Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
public TreePath getPathForRow(JTree tree, int row) { if (treeModel != null && currentVisiblePath != null) { Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
11,236
public TreePath getPathForRow(JTree tree, int row) { if (treeModel != null) { Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
public TreePath getPathForRow(JTree tree, int row) { if (treeModel != null) { Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
11,237
public Dimension getPreferredMinSize() { // FIXME: not implemented return null; }
public Dimension getPreferredMinSize() { // FIXME: not implemented return preferredMinSize; }
11,238
Object getPreviousVisibleNode(Object node) { Object prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; while (prev != null && !tree.isVisible(current)) { prev = getPreviousNode(prev); if (prev != null) current = new TreePath(getPathToRoot(prev, 0)); } } return prev; }
Object getPreviousVisibleNode(Object node) { Object prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; while (prev != null && !tree.isVisible(current)) { prev = getPreviousNode(prev); if (prev != null) current = new TreePath(getPathToRoot(prev, 0)); } } return prev; }
11,239
Object getPreviousVisibleNode(Object node) { Object prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; while (prev != null && !tree.isVisible(current)) { prev = getPreviousNode(prev); if (prev != null) current = new TreePath(getPathToRoot(prev, 0)); } } return prev; }
Object getPreviousVisibleNode(Object node) { Object prev = null; TreePath current = null; if (node != null) prev = getPreviousNode(node); if (prev != null) { current = new TreePath(getPathToRoot(prev, 0)); if (tree.isVisible(current)) return prev; while (prev != null && !tree.isVisible(current)) { prev = getPreviousNode(prev); if (prev != null) current = new TreePath(getPathToRoot(prev, 0)); } } return prev; }
11,240