bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try { int start = getStartOffset(); int length = getEndOffset() - start; getDocument().getText(start, length, txt); } catch (BadLocationException ex) { AssertionError err = new AssertionError("BadLocationException must not " + "be thrown here."); err.initCause(ex); throw err; } int breakLocation = Utilities.getBreakLocation(txt, getContainer().getFontMetrics(getFont()), (int) pos, (int) (pos + len), getTabExpander(), p0); View brokenView = createFragment(p0, breakLocation); return brokenView; }
|
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try { int start = getStartOffset(); int length = getEndOffset() - start; getDocument().getText(start, length, txt); } catch (BadLocationException ex) { AssertionError err = new AssertionError("BadLocationException must not " + "be thrown here."); err.initCause(ex); throw err; } int breakLocation = Utilities.getBreakLocation(txt, getContainer().getFontMetrics(getFont()), (int) pos, (int) (pos + len), getTabExpander(), p0); View brokenView = createFragment(p0, breakLocation); return brokenView; }
| 4,411
|
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try { int start = getStartOffset(); int length = getEndOffset() - start; getDocument().getText(start, length, txt); } catch (BadLocationException ex) { AssertionError err = new AssertionError("BadLocationException must not " + "be thrown here."); err.initCause(ex); throw err; } int breakLocation = Utilities.getBreakLocation(txt, getContainer().getFontMetrics(getFont()), (int) pos, (int) (pos + len), getTabExpander(), p0); View brokenView = createFragment(p0, breakLocation); return brokenView; }
|
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. Segment txt = new Segment(); try { int start = getStartOffset(); int length = getEndOffset() - start; getDocument().getText(start, length, txt); } catch (BadLocationException ex) { AssertionError err = new AssertionError("BadLocationException must not " + "be thrown here."); err.initCause(ex); throw err; } int breakLocation = Utilities.getBreakLocation(txt, getContainer().getFontMetrics(getFont()), (int) pos, (int) (pos + len), getTabExpander(), p0); View brokenView = createFragment(p0, breakLocation); return brokenView; }
| 4,412
|
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else align = super.getAlignment(axis); return align; }
|
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else align = super.getAlignment(axis); return align; }
| 4,413
|
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else align = super.getAlignment(axis); return align; }
|
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); float ascent = painter.getAscent(this); if (isSuperscript()) align = 1.0F; else if (isSubscript()) align = height > 0 ? (height - (descent + (ascent / 2))) / height : 0; else align = height > 0 ? (height - descent) / height : 0; } else align = super.getAlignment(axis); return align; }
| 4,414
|
public Font getFont() { Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isItalic(atts)) style |= Font.ITALIC; Font font = new Font(family, style, size); return font; }
|
public Font getFont() { Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isItalic(atts)) style |= Font.ITALIC; Font font = new Font(family, style, size); return font; }
| 4,415
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); switch (axis) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
| 4,416
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { case X_AXIS: TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
| 4,417
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; span = painter.getSpan(this, getStartOffset(), getEndOffset(), tabEx, 0.F); } else span = painter.getHeight(this); return span; }
| 4,418
|
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
|
public void paint(Graphics g, Shape a) { checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
| 4,419
|
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
|
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); int p0 = getStartOffset(); int p1 = getEndOffset(); Container c = getContainer(); if (c instanceof JTextComponent) { JTextComponent tc = (JTextComponent) c; Highlighter h = tc.getHighlighter(); if (h instanceof LayeredHighlighter) { LayeredHighlighter lh = (LayeredHighlighter) h; lh.paintLayeredHighlights(g, p0, p1, a, tc, this); } } getGlyphPainter().paint(this, g, a, p0, p1); }
| 4,420
|
public int getIconHeight() { return 12; }
|
public int getIconHeight() { return 12; }
| 4,421
|
public int getIconWidth() { return 12; }
|
public int getIconWidth() { return 12; }
| 4,422
|
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); }
|
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); }
| 4,423
|
public void read(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in, "8859_1")); read_main_section(getMainAttributes(), br); read_individual_sections(getEntries(), br); }
|
public void read(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in, "8859_1")); read_main_section(getMainAttributes(), br); read_individual_sections(getEntries(), br); }
| 4,424
|
public void write(OutputStream out) throws IOException { PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "8859_1"))); write_main_section(getMainAttributes(), pw); pw.println(); write_individual_sections(getEntries(), pw); if (pw.checkError()) { throw new JarException("Error while writing manifest"); } }
|
public void write(OutputStream out) throws IOException { PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "8859_1"))); write_main_section(getMainAttributes(), pw); pw.println(); write_individual_sections(getEntries(), pw); if (pw.checkError()) { throw new JarException("Error while writing manifest"); } }
| 4,425
|
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.startsWith("From")) { throw new JarException("Header cannot start with the four letters 'From'" + name); } write_header(name, value, pw); }
|
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.startsWith("From")) { throw new JarException("Header cannot start with the four letters 'From'" + name); } write_header(name, value, pw); }
| 4,426
|
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.startsWith("From")) { throw new JarException("Header cannot start with the four letters 'From'" + name); } write_header(name, value, pw); }
|
private static void write_attribute_entry(Map.Entry entry, PrintWriter pw) throws JarException { String name = entry.getKey().toString(); String value = entry.getValue().toString(); if (name.equalsIgnoreCase("Name")) { throw new JarException("Attributes cannot be called 'Name'"); } if (name.startsWith("From")) { throw new JarException("Header cannot start with the four letters 'From'" + name); } write_header(name, value, out); }
| 4,427
|
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, pw); } }
|
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, pw); } }
| 4,428
|
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, pw); } }
|
private static void write_entry_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_attribute_entry(entry, out); } }
| 4,429
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
| 4,430
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
| 4,431
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { out.write(b); out.write(CRLF); target = " " + value; } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
| 4,432
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { b = target.getBytes("UTF-8"); if (b.length < 73) { out.write(b); break; } n = 72; while (true) { b = target.substring(0, n).getBytes("UTF-8"); if (b.length < 73) break; n--; if (n < 1) throw new IOException("Header is unbreakable and longer than 72 bytes"); } out.write(b); out.write(CRLF); target = " " + target.substring(n); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
| 4,433
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
|
private static void write_header(String name, String value, PrintWriter pw) { pw.print(name + ": "); int last = 68 - name.length(); if (last > value.length()) { pw.println(value); } else { pw.println(value.substring(0, last)); } while (last < value.length()) { pw.print(" "); int end = (last + 69); if (end > value.length()) { pw.println(value.substring(last)); } else { pw.println(value.substring(last, end)); } last = end; } }
| 4,434
|
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entry.getValue(), pw); pw.println(); } }
|
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entry.getValue(), pw); pw.println(); } }
| 4,435
|
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entry.getValue(), pw); pw.println(); } }
|
private static void write_individual_sections(Map entries, PrintWriter pw) throws JarException { Iterator it = entries.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); write_header("Name", entry.getKey().toString(), pw); write_entry_attributes((Attributes) entry.getValue(), pw); pw.println(); } }
| 4,436
|
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getKey())) { write_attribute_entry(entry, pw); } } }
|
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getKey())) { write_attribute_entry(entry, pw); } } }
| 4,437
|
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getKey())) { write_attribute_entry(entry, pw); } } }
|
private static void write_main_attributes(Attributes attr, PrintWriter pw) throws JarException { Iterator it = attr.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); // Don't print the manifest version again if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getKey())) { write_attribute_entry(entry, pw); } } }
| 4,438
|
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
|
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
| 4,439
|
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
|
private static void write_main_section(Attributes attr, PrintWriter pw) throws JarException { write_version_info(attr, pw); write_main_attributes(attr, pw); }
| 4,440
|
private static void write_version_info(Attributes attr, PrintWriter pw) { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, pw); }
|
private static void write_version_info(Attributes attr, OutputStream out) throws IOException { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, pw); }
| 4,441
|
private static void write_version_info(Attributes attr, PrintWriter pw) { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, pw); }
|
private static void write_version_info(Attributes attr, PrintWriter pw) { // First check if there is already a version attribute set String version = attr.getValue(Attributes.Name.MANIFEST_VERSION); if (version == null) { version = "1.0"; } write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, out); }
| 4,442
|
public final boolean contains(Class cls) { return contains(cls.getName()); }
|
public final boolean contains(Class cls) { return contains(cls.getName()); }
| 4,444
|
public PointerEvent(int buttons, int x, int y, boolean absolute) { this(buttons, x, y, 0, absolute); }
|
public PointerEvent(int buttons, int x, int y, boolean absolute) { this(buttons, x, y, 0, absolute); }
| 4,445
|
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback, boolean ignoreCharSet ) throws IOException { callBack = a_callback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush(); } catch (BadLocationException ex) { // Convert this into the supported type of exception. throw new IOException(ex.getMessage()); } }
|
public void parse(Reader reader, HTMLEditorKit.ParserCallback aCallback, boolean ignoreCharSet ) throws IOException { callBack = a_callback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush(); } catch (BadLocationException ex) { // Convert this into the supported type of exception. throw new IOException(ex.getMessage()); } }
| 4,446
|
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback, boolean ignoreCharSet ) throws IOException { callBack = a_callback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush(); } catch (BadLocationException ex) { // Convert this into the supported type of exception. throw new IOException(ex.getMessage()); } }
|
public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback, boolean ignoreCharSet ) throws IOException { callBack = aCallback; gnu.parse(reader); callBack.handleEndOfLineString(gnu.getEndOfLineSequence()); try { callBack.flush(); } catch (BadLocationException ex) { // Convert this into the supported type of exception. throw new IOException(ex.getMessage()); } }
| 4,447
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); loadStream(abyte0, 0); } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); if (abyte0.length > 0) { loadStream(abyte0, 0); } else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
| 4,449
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int oldElementIndex, elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,450
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0 && firstElement.getStartOffset() != offset) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,451
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(offset, eventLength); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,452
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,453
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,454
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', i + 1); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,455
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
|
protected void insertUpdate(DefaultDocumentEvent event, AttributeSet attributes) { int offset = event.getOffset(); int end = offset + event.getLength(); int elementIndex = rootElement.getElementIndex(offset); Element firstElement = rootElement.getElement(elementIndex); // If we're inserting immediately after a newline we have to fix the // Element structure. if (offset > 0) { try { String s = getText(offset - 1, 1); if (s.equals("\n")) { int newEl2EndOffset = end; boolean replaceNext = false; if (rootElement.getElementCount() > elementIndex + 1) { replaceNext = true; newEl2EndOffset = rootElement.getElement(elementIndex + 1).getEndOffset(); } Element newEl1 = createLeafElement(rootElement, firstElement.getAttributes(), firstElement.getStartOffset(), offset); Element newEl2 = createLeafElement (rootElement, firstElement.getAttributes(), offset, newEl2EndOffset); if (replaceNext) rootElement.replace(elementIndex, 2, new Element[] { newEl1, newEl2 }); else rootElement.replace(elementIndex, 1, new Element[] { newEl1, newEl2 }); firstElement = newEl2; elementIndex ++; } } catch (BadLocationException ble) { // This shouldn't happen. AssertionError ae = new AssertionError(); ae.initCause(ble); throw ae; } } // added and removed are Element arrays used to add an ElementEdit // to the DocumentEvent if there were entire lines added or removed. Element[] removed = new Element[1]; Element[] added; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); // Determine how many NEW lines were added by finding the newline // characters within the newly inserted text int j = firstElement.getStartOffset(); int i = str.indexOf('\n', offset); while (i != -1 && i <= end) { // For each new line, create a new element elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; if (j >= str.length()) break; i = str.indexOf('\n', j); } // If there were new lines added we have to add an ElementEdit to // the DocumentEvent and we have to call rootElement.replace to // insert the new lines if (elts.size() != 0) { // Set up the ElementEdit by filling the added and removed // arrays with the proper Elements added = new Element[elts.size()]; for (int k = 0; k < elts.size(); ++k) added[k] = (Element) elts.get(k); removed[0] = firstElement; // Now create and add the ElementEdit ElementEdit e = new ElementEdit(rootElement, elementIndex, removed, added); event.addEdit(e); // And call replace to actually make the changes ((BranchElement) rootElement).replace(elementIndex, 1, added); } } catch (BadLocationException e) { // This shouldn't happen so we throw an AssertionError AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; } super.insertUpdate(event, attributes); }
| 4,456
|
public String toString() { return null; // TODO }
|
public String toString() { StringBuilder b = new StringBuilder(); b.append("<["); b.append(minimum); b.append(','); b.append(preferred); b.append(','); b.append(maximum); b.append("]@"); b.append(alignment); b.append('>'); return b.toString(); // TODO }
| 4,457
|
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed) { return; }// displayInfo(e,"Typed processed " + keyProcessed); String s = "";// if (isLinux) {// lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr);// System.out.println("last " + lastKeyStroke);// if (lastKeyStroke != null) {// s = lastKeyStroke;// System.out.println("last " + s);// }// else// s +=kc;// }// else s += kc; if (!vt.isConnected() ) return; screen.sendKeys(s); if (recording) recordBuffer.append(s); keyProcessed = true; e.consume(); }
|
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed) { return; }// displayInfo(e,"Typed processed " + keyProcessed); String s = "";// if (isLinux) {// lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr);// System.out.println("last " + lastKeyStroke);// if (lastKeyStroke != null) {// s = lastKeyStroke;// System.out.println("last " + s);// }// else// s +=kc;// }// else s += kc; if (!vt.isConnected() ) return; screen.sendKeys(s); if (recording) recordBuffer.append(s); keyProcessed = true; e.consume(); }
| 4,458
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlDarkShadow(), "Table.selectionBackground", new ColorUIResource(204, 204, 255), "Table.selectionForeground", new ColorUIResource(0, 0, 0), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
| 4,459
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", new BorderUIResource(MetalBorders.getTextFieldBorder()), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
| 4,460
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getToggleButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
| 4,461
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", getFocusColor(), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
| 4,462
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", getInactiveControlTextColor(), "Button.focus", getFocusColor(), "Button.font", getControlTextFont(), "Button.foreground", getControlTextColor(), "Button.highlight", getControlHighlight(), "Button.light", getControlHighlight(), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", getControlShadow(), "Button.shadow", getControlShadow(), "CheckBox.background", getControl(), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.disabledText", getInactiveControlTextColor(), "CheckBox.focus", getFocusColor(), "CheckBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBox.foreground", getControlTextColor(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.BOLD, 12), "CheckBoxMenuItem.foreground", getMenuForeground(), "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(), "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(), "ColorChooser.background", getControl(), "ColorChooser.foreground", getControlTextColor(), "ColorChooser.rgbBlueMnemonic", new Integer(0), "ColorChooser.rgbGreenMnemonic", new Integer(0), "ColorChooser.rgbRedMnemonic", new Integer(0), "ColorChooser.swatchesDefaultRecentColor", getControl(), "ComboBox.background", getControl(), "ComboBox.buttonBackground", getControl(), "ComboBox.buttonDarkShadow", getControlDarkShadow(), "ComboBox.buttonHighlight", getControlHighlight(), "ComboBox.buttonShadow", getControlShadow(), "ComboBox.disabledBackground", getControl(), "ComboBox.disabledForeground", getInactiveSystemTextColor(), "ComboBox.font", new FontUIResource("Dialog", Font.BOLD, 12), "ComboBox.foreground", getControlTextColor(), "ComboBox.selectionBackground", getPrimaryControlShadow(), "ComboBox.selectionForeground", getControlTextColor(), "Desktop.background", getDesktopColor(), "DesktopIcon.background", getControl(), "DesktopIcon.foreground", getControlTextColor(), "DesktopIcon.width", new Integer(160), "EditorPane.background", getWindowBackground(), "EditorPane.caretForeground", getUserTextColor(), "EditorPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "EditorPane.foreground", getUserTextColor(), "EditorPane.inactiveForeground", getInactiveSystemTextColor(), "EditorPane.selectionBackground", getTextHighlightColor(), "EditorPane.selectionForeground", getHighlightedTextColor(), "FormattedTextField.background", getWindowBackground(), "FormattedTextField.caretForeground", getUserTextColor(), "FormattedTextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "FormattedTextField.foreground", getUserTextColor(), "FormattedTextField.inactiveBackground", getControl(), "FormattedTextField.inactiveForeground", getInactiveSystemTextColor(), "FormattedTextField.selectionBackground", getTextHighlightColor(), "FormattedTextField.selectionForeground", getHighlightedTextColor(), "InternalFrame.activeTitleBackground", getWindowTitleBackground(), "InternalFrame.activeTitleForeground", getWindowTitleForeground(), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.borderColor", getControl(), "InternalFrame.borderDarkShadow", getControlDarkShadow(), "InternalFrame.borderHighlight", getControlHighlight(), "InternalFrame.borderLight", getControlHighlight(), "InternalFrame.borderShadow", getControlShadow(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(), "InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.foreground", getSystemTextColor(), "List.background", getWindowBackground(), "List.foreground", getUserTextColor(), "List.selectionBackground", getTextHighlightColor(), "List.selectionForeground", getHighlightedTextColor(), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "Menu.acceleratorForeground", getAcceleratorForeground(), "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "Menu.background", getMenuBackground(), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.disabledForeground", getMenuDisabledForeground(), "Menu.font", getControlTextFont(), "Menu.foreground", getMenuForeground(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.disabledForeground", getMenuDisabledForeground(), "MenuItem.font", getControlTextFont(), "MenuItem.foreground", getMenuForeground(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButton.focus", MetalLookAndFeel.getFocusColor(), "RadioButton.font", MetalLookAndFeel.getControlTextFont(), "RadioButton.foreground", getControlTextColor(), "RadioButton.highlight", getControlHighlight(), "RadioButton.light", getControlHighlight(), "RadioButton.select", getControlShadow(), "RadioButton.shadow", getControlShadow(), "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10), "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(), "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "RadioButtonMenuItem.background", getMenuBackground(), "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.foreground", getMenuForeground(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", getControl(), "ScrollBar.darkShadow", getControlDarkShadow(), "ScrollBar.foreground", getControl(), "ScrollBar.highlight", getControlHighlight(), "ScrollBar.shadow", getControlShadow(), "ScrollBar.thumb", getPrimaryControlShadow(), "ScrollBar.thumbDarkShadow", getControlDarkShadow(), "ScrollBar.thumbHighlight", getPrimaryControl(), "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(), "ScrollBar.track", getControl(), "ScrollBar.trackHighlight", getControlDarkShadow(), "ScrollPane.background", getControl(), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "ScrollPane.foreground", getControlTextColor(), "Separator.background", getSeparatorBackground(), "Separator.foreground", getSeparatorForeground(), "Separator.highlight", getControlHighlight(), "Separator.shadow", getControlShadow(), "Slider.background", getControl(), "Slider.focus", getFocusColor(), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.foreground", getPrimaryControlShadow(), "Slider.highlight", getControlHighlight(), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.majorTickLength", new Integer(6), "Slider.shadow", getControlShadow(), "Slider.trackWidth", new Integer(7), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Spinner.background", getControl(), "Spinner.font", new FontUIResource("Dialog", Font.BOLD, 12), "Spinner.foreground", getControl(), "SplitPane.background", getControl(), "SplitPane.darkShadow", getControlDarkShadow(), "SplitPane.dividerFocusColor", getPrimaryControl(), "SplitPane.highlight", getControlHighlight(), "SplitPane.shadow", getControlShadow(), "SplitPaneDivider.draggingColor", Color.DARK_GRAY, "TabbedPane.background", getControlShadow(), "TabbedPane.darkShadow", getControlDarkShadow(), "TabbedPane.focus", getPrimaryControlDarkShadow(), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.foreground", getControlTextColor(), "TabbedPane.highlight", getControlHighlight(), "TabbedPane.light", getControl(), "TabbedPane.selected", getControl(), "TabbedPane.selectHighlight", getControlHighlight(), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", getControlShadow(), "TabbedPane.tabAreaBackground", getControl(), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "Table.background", getWindowBackground(), "Table.focusCellBackground", getWindowBackground(), "Table.focusCellForeground", getControlTextColor(), "Table.foreground", getControlTextColor(), "Table.focusCellHighlightBorder", getControlShadow(), "Table.focusCellBackground", getWindowBackground(), "Table.gridColor", getControlShadow(), "TableHeader.background", getControl(), "TableHeader.foreground", getControlTextColor(), "TextArea.background", getWindowBackground(), "TextArea.caretForeground", getUserTextColor(), "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextArea.foreground", getUserTextColor(), "TextArea.inactiveForeground", getInactiveSystemTextColor(), "TextArea.selectionBackground", getTextHighlightColor(), "TextArea.selectionForeground", getHighlightedTextColor(), "TextField.background", getWindowBackground(), "TextField.border", MetalBorders.getTextFieldBorder(), "TextField.caretForeground", getUserTextColor(), "TextField.darkShadow", getControlDarkShadow(), "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextField.foreground", getUserTextColor(), "TextField.highlight", getControlHighlight(), "TextField.inactiveBackground", getControl(), "TextField.inactiveForeground", getInactiveSystemTextColor(), "TextField.light", getControlHighlight(), "TextField.selectionBackground", getTextHighlightColor(), "TextField.selectionForeground", getHighlightedTextColor(), "TextField.shadow", getControlShadow(), "TextPane.background", getWindowBackground(), "TextPane.caretForeground", getUserTextColor(), "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TextPane.foreground", getUserTextColor(), "TextPane.inactiveForeground", getInactiveSystemTextColor(), "TextPane.selectionBackground", getTextHighlightColor(), "TextPane.selectionForeground", getHighlightedTextColor(), "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12), "TitledBorder.titleColor", getSystemTextColor(), "ToggleButton.background", getControl(), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", getControlDarkShadow(), "ToggleButton.disabledText", getInactiveControlTextColor(), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", getControlTextColor(), "ToggleButton.highlight", getControlHighlight(), "ToggleButton.light", getControlHighlight(), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.select", getControlShadow(), "ToggleButton.shadow", getControlShadow(), "ToolBar.background", getMenuBackground(), "ToolBar.darkShadow", getControlDarkShadow(), "ToolBar.dockingBackground", getMenuBackground(), "ToolBar.dockingForeground", getPrimaryControlDarkShadow(), "ToolBar.floatingBackground", getMenuBackground(), "ToolBar.floatingForeground", getPrimaryControl(), "ToolBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ToolBar.foreground", getMenuForeground(), "ToolBar.highlight", getControlHighlight(), "ToolBar.light", getControlHighlight(), "ToolBar.shadow", getControlShadow(), "ToolTip.background", getPrimaryControl(), "ToolTip.backgroundInactive", getControl(), "ToolTip.border", new BorderUIResource.LineBorderUIResource(getPrimaryControlDarkShadow(), 1), "ToolTip.borderInactive", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ToolTip.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolTip.foreground", getPrimaryControlInfo(), "ToolTip.foregroundInactive", getControlDarkShadow(), "Tree.background", getWindowBackground(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.foreground", getUserTextColor(), "Tree.hash", getPrimaryControl(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.leftChildIndent", new Integer(7), "Tree.line", getPrimaryControl(), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", getTextHighlightColor(), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.selectionBorderColor", getFocusColor(), "Tree.selectionForeground", getHighlightedTextColor(), "Tree.textBackground", getWindowBackground(), "Tree.textForeground", getUserTextColor(), "Viewport.background", getControl(), "Viewport.foreground", getUserTextColor() }; defaults.putDefaults(myDefaults); }
| 4,463
|
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); testForValidEmit(obj, cls.getName()); if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) { final char[] a = (char[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("'" + a[i] + "' "); } debugWriter.println(); } else if (obj instanceof byte[]) { final byte[] a = (byte[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("" + a[i] + ' '); } debugWriter.println(); } else { debugWriter.println(obj); } } if (obj instanceof VmSystemObject) { ((VmSystemObject) obj).verifyBeforeEmit(); } // Writeout the header final VmClassType vmClass = (VmClassType) loaderContext.loadClass(cls.getName(), true); vmClass.incInstanceCount(); final X86Stream.ObjectInfo oInfo = os.startObject(vmClass); os.setObjectRef(obj); // If the object is a VmClass, force the loading of the // correspondig java.lang.Class if (cls.equals(VmType.class)) { VmType vmCls = (VmType) obj; String name = vmCls.getName().replace('/', '.'); if (!name.startsWith("java.lang")) { vmCls.asClassDuringBootstrap(); } } // Writeout object contents if (cls.equals(String.class)) { emitString((String) obj); } else if (cls.equals(Integer.class)) { emitInteger((Integer) obj); } else if (cls.equals(Long.class)) { emitLong((Long) obj); } else if (cls.equals(Class.class)) { emitClass((Class) obj); } else if (cls.isArray()) { emitArray(cls, obj, (VmArrayClass)vmClass); } else { emitObject(cls, obj); } oInfo.markEnd(); if (debugWriter != null) { debugWriter.println(); } }
|
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); try { testForValidEmit(obj, cls.getName()); } catch (JNodeClassNotFoundException ex) { throw new BuildException(ex); } if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) { final char[] a = (char[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("'" + a[i] + "' "); } debugWriter.println(); } else if (obj instanceof byte[]) { final byte[] a = (byte[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("" + a[i] + ' '); } debugWriter.println(); } else { debugWriter.println(obj); } } if (obj instanceof VmSystemObject) { ((VmSystemObject) obj).verifyBeforeEmit(); } // Writeout the header final VmClassType vmClass = (VmClassType) loaderContext.loadClass(cls.getName(), true); vmClass.incInstanceCount(); final X86Stream.ObjectInfo oInfo = os.startObject(vmClass); os.setObjectRef(obj); // If the object is a VmClass, force the loading of the // correspondig java.lang.Class if (cls.equals(VmType.class)) { VmType vmCls = (VmType) obj; String name = vmCls.getName().replace('/', '.'); if (!name.startsWith("java.lang")) { vmCls.asClassDuringBootstrap(); } } // Writeout object contents if (cls.equals(String.class)) { emitString((String) obj); } else if (cls.equals(Integer.class)) { emitInteger((Integer) obj); } else if (cls.equals(Long.class)) { emitLong((Long) obj); } else if (cls.equals(Class.class)) { emitClass((Class) obj); } else if (cls.isArray()) { emitArray(cls, obj, (VmArrayClass)vmClass); } else { emitObject(cls, obj); } oInfo.markEnd(); if (debugWriter != null) { debugWriter.println(); } }
| 4,464
|
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); testForValidEmit(obj, cls.getName()); if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) { final char[] a = (char[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("'" + a[i] + "' "); } debugWriter.println(); } else if (obj instanceof byte[]) { final byte[] a = (byte[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("" + a[i] + ' '); } debugWriter.println(); } else { debugWriter.println(obj); } } if (obj instanceof VmSystemObject) { ((VmSystemObject) obj).verifyBeforeEmit(); } // Writeout the header final VmClassType vmClass = (VmClassType) loaderContext.loadClass(cls.getName(), true); vmClass.incInstanceCount(); final X86Stream.ObjectInfo oInfo = os.startObject(vmClass); os.setObjectRef(obj); // If the object is a VmClass, force the loading of the // correspondig java.lang.Class if (cls.equals(VmType.class)) { VmType vmCls = (VmType) obj; String name = vmCls.getName().replace('/', '.'); if (!name.startsWith("java.lang")) { vmCls.asClassDuringBootstrap(); } } // Writeout object contents if (cls.equals(String.class)) { emitString((String) obj); } else if (cls.equals(Integer.class)) { emitInteger((Integer) obj); } else if (cls.equals(Long.class)) { emitLong((Long) obj); } else if (cls.equals(Class.class)) { emitClass((Class) obj); } else if (cls.isArray()) { emitArray(cls, obj, (VmArrayClass)vmClass); } else { emitObject(cls, obj); } oInfo.markEnd(); if (debugWriter != null) { debugWriter.println(); } }
|
public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class cls = obj.getClass(); testForValidEmit(obj, cls.getName()); if (debugWriter != null) { debugWriter.println("$" + Integer.toHexString(os.getLength())); if (obj instanceof char[]) { final char[] a = (char[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("'" + a[i] + "' "); } debugWriter.println(); } else if (obj instanceof byte[]) { final byte[] a = (byte[]) obj; for (int i = 0; i < a.length; i++) { debugWriter.print("" + a[i] + ' '); } debugWriter.println(); } else { debugWriter.println(obj); } } if (obj instanceof VmSystemObject) { ((VmSystemObject) obj).verifyBeforeEmit(); } // Writeout the header final VmClassType vmClass = (VmClassType) loaderContext.loadClass(cls.getName(), true); vmClass.incInstanceCount(); final X86Stream.ObjectInfo oInfo = os.startObject(vmClass); os.setObjectRef(obj); // If the object is a VmClass, force the loading of the // correspondig java.lang.Class if (cls.equals(VmType.class)) { VmType vmCls = (VmType) obj; String name = vmCls.getName().replace('/', '.'); if (!name.startsWith("java.lang")) { vmCls.asClassDuringBootstrap(); } } // Writeout object contents if (cls.equals(String.class)) { emitString((String) obj); } else if (cls.equals(Integer.class)) { emitInteger((Integer) obj); } else if (cls.equals(Long.class)) { emitLong((Long) obj); } else if (cls.equals(Class.class)) { emitClass((Class) obj); } else if (cls.isArray()) { emitArray(cls, obj, (VmArrayClass)vmClass); } else { try { emitObject(cls, obj); } catch (JNodeClassNotFoundException ex) { throw new BuildException(ex); } } oInfo.markEnd(); if (debugWriter != null) { debugWriter.println(); } }
| 4,465
|
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { final VmType jnodeType = loaderContext.loadClass(cname, true); info = new FieldInfo(jdkType, jnodeType); fieldInfos.put(cname, info); } return info; }
|
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException, JNodeClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { final VmType jnodeType = loaderContext.loadClass(cname, true); info = new FieldInfo(jdkType, jnodeType); fieldInfos.put(cname, info); } return info; }
| 4,466
|
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { final VmType jnodeType = loaderContext.loadClass(cname, true); info = new FieldInfo(jdkType, jnodeType); fieldInfos.put(cname, info); } return info; }
|
public FieldInfo getFieldInfo(Class jdkType) throws ClassNotFoundException { final String cname = jdkType.getName(); FieldInfo info = (FieldInfo)fieldInfos.get(cname); if (info == null) { VmType jnodeType = null; try { jnodeType = loaderContext.loadClass(cname, true); } catch (ClassNotFoundException ex) { throw new JNodeClassNotFoundException(cname); } info = new FieldInfo(jdkType, jnodeType); fieldInfos.put(cname, info); } return info; }
| 4,467
|
public final void testForValidEmit(Object object, String location) throws BuildException { if (object == null) { return; } else if (object instanceof BootableObject) { return; } else if (object.getClass().isArray()) { return; } else if (object instanceof Class) { return; } else { final String clsName = object.getClass().getName().replace('/', '.'); /* * if (clsName.startsWith("org.jnode.")) { return; */ if (legalInstanceClasses.contains(clsName)) { return; } final FieldInfo fieldInfo; try { fieldInfo = getFieldInfo(object.getClass()); } catch (ClassNotFoundException ex) { throw new BuildException(ex); } if (!fieldInfo.isExact()) { BootLog.warn("Use of in-exact matching class (" + clsName + ") in bootimage at " + location); } legalInstanceClasses.add(clsName); return; /* * final Class javaClass = object.getClass(); try { final VmClassType vmClass = * (VmClassType)loaderContext.loadClass(javaClass.getName(), true); * testClassCompatibility(javaClass, vmClass); System.out.println("Found compatible * class " + clsName); legalInstanceClasses.add(clsName); } catch * (ClassNotFoundException ex) { throw new BuildException("VmClass not found for " + * clsName, ex); */// throw new BuildException("Cannot emit object of type " + clsName); } }
|
public final void testForValidEmit(Object object, String location) throws BuildException, JNodeClassNotFoundException { if (object == null) { return; } else if (object instanceof BootableObject) { return; } else if (object.getClass().isArray()) { return; } else if (object instanceof Class) { return; } else { final String clsName = object.getClass().getName().replace('/', '.'); /* * if (clsName.startsWith("org.jnode.")) { return; */ if (legalInstanceClasses.contains(clsName)) { return; } final FieldInfo fieldInfo; try { fieldInfo = getFieldInfo(object.getClass()); } catch (ClassNotFoundException ex) { throw new BuildException(ex); } if (!fieldInfo.isExact()) { BootLog.warn("Use of in-exact matching class (" + clsName + ") in bootimage at " + location); } legalInstanceClasses.add(clsName); return; /* * final Class javaClass = object.getClass(); try { final VmClassType vmClass = * (VmClassType)loaderContext.loadClass(javaClass.getName(), true); * testClassCompatibility(javaClass, vmClass); System.out.println("Found compatible * class " + clsName); legalInstanceClasses.add(clsName); } catch * (ClassNotFoundException ex) { throw new BuildException("VmClass not found for " + * clsName, ex); */// throw new BuildException("Cannot emit object of type " + clsName); } }
| 4,468
|
public Ext2DirectoryRecord(byte[] data, int offset) { iNodeNr = (int)Ext2Utils.get32(data, offset); recLen = Ext2Utils.get16(data, offset+4); nameLen = Ext2Utils.get8(data, offset+6); type = Ext2Utils.get8(data, offset+7); name = new StringBuffer(); if(iNodeNr!=0) { //XXX character conversion for(int i=0; i<nameLen; i++) name.append( (char)Ext2Utils.get8(data, offset+8+i) ); Ext2Debugger.debug("Ext2DirectoryRecord(): iNode="+iNodeNr+", name="+name,3); } }
|
public Ext2DirectoryRecord(byte[] data, int offset) { iNodeNr = (int)Ext2Utils.get32(data, offset); recLen = Ext2Utils.get16(data, offset+4); nameLen = Ext2Utils.get8(data, offset+6); type = Ext2Utils.get8(data, offset+7); name = new StringBuffer(); if(iNodeNr!=0) { //XXX character conversion for(int i=0; i<nameLen; i++) name.append( (char)Ext2Utils.get8(data, offset+8+i) ); Ext2Debugger.debug("Ext2DirectoryRecord(): iNode="+iNodeNr+", name="+name,3); } }
| 4,469
|
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. throw new Error("not implemented"); }
|
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); buffer.change(offset, length, ev); Element root = getDefaultRootElement(); int paragraphCount = root.getElementCount(); for (int pindex = 0; pindex < paragraphCount; pindex++) { Element paragraph = root.getElement(pindex); if ((paragraph.getStartOffset() > offset + length) || (paragraph.getEndOffset() < offset)) continue; int contentCount = paragraph.getElementCount(); for (int cindex = 0; cindex < contentCount; cindex++) { Element content = paragraph.getElement(cindex); if ((content.getStartOffset() > offset + length) || (content.getEndOffset() < offset)) continue; if (content instanceof AbstractElement) { AbstractElement el = (AbstractElement) content; if (replace) el.removeAttributes(el); el.addAttributes(attributes); } else throw new AssertionError("content elements are expected to be" + "instances of " + "javax.swing.text.AbstractDocument.AbstractElement"); } } }
| 4,471
|
public Object get(KeyStroke keystroke) { Object result = inputMap.get(keystroke); if (result == null && parent != null) result = parent.get(keystroke); return result; }
|
public Object get(KeyStroke keystroke) { Object result = null; if (inputMap != null) result = inputMap.get(keystroke); if (result == null && parent != null) result = parent.get(keystroke); return result; }
| 4,476
|
public KeyStroke[] keys() { if (size() != 0) { KeyStroke[] array = new KeyStroke[size()]; return (KeyStroke[]) inputMap.keySet().toArray(array); } return null; }
|
public KeyStroke[] keys() { if (inputMap != null) { KeyStroke[] array = new KeyStroke[size()]; return (KeyStroke[]) inputMap.keySet().toArray(array); } return null; }
| 4,477
|
public int size() { return inputMap.size(); }
|
public int size() { int result = 0; if (inputMap != null) result = inputMap.size(); return result; }
| 4,480
|
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String)aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, value)); if (value == null) { throw new PluginException("Cannot find attribute value for attribute " + name); } //System.out.println("name[" + name + "] value[" + value + "]"); } attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]); } else { attributes = null; } final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) { final XMLElement ce = (XMLElement)i.next(); list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[])list.toArray(new ConfigurationElement[list.size()]); }
|
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String)aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, value)); if (value == null) { throw new PluginException("Cannot find attribute value for attribute " + name); } //System.out.println("name[" + name + "] value[" + value + "]"); } attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]); } else { attributes = null; } final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) { final XMLElement ce = (XMLElement)i.next(); list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[])list.toArray(new ConfigurationElement[list.size()]); }
| 4,481
|
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String)aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, value)); if (value == null) { throw new PluginException("Cannot find attribute value for attribute " + name); } //System.out.println("name[" + name + "] value[" + value + "]"); } attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]); } else { attributes = null; } final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) { final XMLElement ce = (XMLElement)i.next(); list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[])list.toArray(new ConfigurationElement[list.size()]); }
|
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName(); final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String)aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, value)); if (value == null) { throw new PluginException("Cannot find attribute value for attribute " + name); } //System.out.println("name[" + name + "] value[" + value + "]"); } attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]); } else { attributes = null; } final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) { final XMLElement ce = (XMLElement)i.next(); list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[])list.toArray(new ConfigurationElement[list.size()]); }
| 4,482
|
protected void damageLineRange (int line0, int line1, Shape a, Component host) { if (a == null) return; Rectangle rec0 = lineToRect(a, line0); Rectangle rec1 = lineToRect(a, line1); if (rec0 == null || rec1 == null) // something went wrong, repaint the entire host to be safe host.repaint(); else { Rectangle repaintRec = rec0.union(rec1); host.repaint(0, repaintRec.y, host.getWidth(), repaintRec.height); } }
|
protected void damageLineRange (int line0, int line1, Shape a, Component host) { if (a == null) return; Rectangle rec0 = lineToRect(a, line0); Rectangle rec1 = lineToRect(a, line1); if (rec0 == null || rec1 == null) // something went wrong, repaint the entire host to be safe host.repaint(); else { Rectangle repaintRec = rec0.union(rec1); host.repaint(0, repaintRec.y, host.getWidth(), repaintRec.height); } }
| 4,483
|
public Enumeration entries() { try { return new ZipEntryEnumeration(getEntries().values().iterator()); } catch (IOException ioe) { return null; } }
|
public Enumeration entries() { try { return new ZipEntryEnumeration(getEntries().values().iterator()); } catch (IOException ioe) { return EmptyEnumeration.getInstance(); } }
| 4,487
|
public Manifest(InputStream in) throws IOException { this(); read(in); }
|
public Manifest(InputStream in) throws IOException { this(); read(in); }
| 4,490
|
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, off, len); else throw new SignatureException(); }
|
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, off, len); else throw new SignatureException(); }
| 4,491
|
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, off, len); else throw new SignatureException(); }
|
public final void update(byte[]data, int off, int len) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(b); else throw new SignatureException(); }
| 4,492
|
public static void loadMacros(Session session, Macronizer macros, JMenu menu) { final Session ses = session; Vector mv = new Vector(); Action action; menu.addSeparator(); String[] macrosList = macros.getMacroList(); for (int x = 0; x < macrosList.length; x++) { mv.add(macrosList[x]); } Collections.sort(mv); for (int x = 0; x < mv.size(); x++) { action = new AbstractAction((String)mv.get(x)) { public void actionPerformed(ActionEvent e) { ses.executeMeMacro(e); } }; menu.add(action); } scriptDir("scripts",menu,session); String conPath = ""; String conPath2 = ""; try { conPath = new File("scripts").getCanonicalPath(); conPath2 = new File(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts").getCanonicalPath(); } catch (IOException ioe ) { } // lets not load the menu again if they point to the same place if (!conPath.equals(conPath2)) scriptDir(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts",menu,session); }
|
public static void loadMacros(Session session, Macronizer macros, JMenu menu) { final Session ses = session; Vector mv = new Vector(); Action action; menu.addSeparator(); String[] macrosList = Macronizer.getMacroList(); for (int x = 0; x < macrosList.length; x++) { mv.add(macrosList[x]); } Collections.sort(mv); for (int x = 0; x < mv.size(); x++) { action = new AbstractAction((String)mv.get(x)) { public void actionPerformed(ActionEvent e) { ses.executeMeMacro(e); } }; menu.add(action); } scriptDir("scripts",menu,session); String conPath = ""; String conPath2 = ""; try { conPath = new File("scripts").getCanonicalPath(); conPath2 = new File(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts").getCanonicalPath(); } catch (IOException ioe ) { } // lets not load the menu again if they point to the same place if (!conPath.equals(conPath2)) scriptDir(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts",menu,session); }
| 4,493
|
protected Component createComponent() { return null; }
|
protected Component createComponent() { return null; }
| 4,494
|
public void layoutContainer(Container parent) { // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); int[] hSpans = new int[children.length]; int[] hOffsets = new int[children.length]; int[] vSpans = new int[children.length]; int[] vOffsets = new int[children.length]; Insets insets = container.getInsets(); int width = container.getWidth() - insets.left - insets.right - 1; int height = container.getHeight() - insets.top - insets.bottom - 1; if (isHorizontalIn(container)) { SizeRequirements.calculateTiledPositions(width, null, hSizeReqs, hOffsets, hSpans); SizeRequirements.calculateAlignedPositions(height, null, vSizeReqs, vOffsets, vSpans); } else { SizeRequirements.calculateTiledPositions(height, null, vSizeReqs, vOffsets, vSpans); SizeRequirements.calculateAlignedPositions(width, null, hSizeReqs, hOffsets, hSpans); } // Set positions and widths of child components. for (int i = 0; i < children.length; i++) { Component child = children[i]; child.setBounds(hOffsets[i] + insets.left, vOffsets[i] + insets.top, hSpans[i], vSpans[i]); } }
|
public void layoutContainer(Container parent) { // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); int[] hSpans = new int[children.length]; int[] hOffsets = new int[children.length]; int[] vSpans = new int[children.length]; int[] vOffsets = new int[children.length]; Insets insets = container.getInsets(); int width = container.getWidth() - insets.left - insets.right - 1; int height = container.getHeight() - insets.top - insets.bottom - 1; if (isHorizontalIn(container)) { SizeRequirements.calculateTiledPositions(width, null, hSizeReqs, hOffsets, hSpans); SizeRequirements.calculateAlignedPositions(height, null, vSizeReqs, vOffsets, vSpans); } else { SizeRequirements.calculateTiledPositions(height, null, vSizeReqs, vOffsets, vSpans); SizeRequirements.calculateAlignedPositions(width, null, hSizeReqs, hOffsets, hSpans); } // Set positions and widths of child components. for (int i = 0; i < children.length; i++) { Component child = children[i]; child.setBounds(hOffsets[i] + insets.left, vOffsets[i] + insets.top, hSpans[i], vSpans[i]); } }
| 4,495
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); SizeRequirements hReq; SizeRequirements vReq; if (isHorizontalIn(container)) { hReq = SizeRequirements.getTiledSizeRequirements(hSizeReqs); vReq = SizeRequirements.getAlignedSizeRequirements(vSizeReqs); } else { hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs); } return new Dimension(hReq.preferred, vReq.preferred); }
|
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); // Setup the SizeRequirements for both the X and Y axis. Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); SizeRequirements hReq; SizeRequirements vReq; if (isHorizontalIn(container)) { hReq = SizeRequirements.getTiledSizeRequirements(hSizeReqs); vReq = SizeRequirements.getAlignedSizeRequirements(vSizeReqs); } else { hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs); } Insets insets = container.getInsets(); return new Dimension(hReq.preferred + insets.left + insets.right, vReq.preferred + insets.top + insets.bottom); }
| 4,496
|
public ListDataEvent(Object source, int type, int index0, int index1) { super(source); this.type = type; this.index0 = index0; this.index1 = index1; }
|
public ListDataEvent(Object source, int type, int index0, int index1) { super(source); this.type = type; this.index0 = index0; this.index1 = index1; }
| 4,497
|
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.getParentView((Session)this)); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
|
private void doAttributes() { SessionAttributes sa = null; if (me == null) sa = new SessionAttributes(propFileName, defaultProps, new JFrame()); else sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.getParentView((Session)this)); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
| 4,498
|
private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.getParentView((Session)this),null,vt.getCodePage()); }
|
private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(parent,macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.getParentView((Session)this),null,vt.getCodePage()); }
| 4,499
|
private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.getParentView((Session)this),null,vt.getCodePage()); }
|
private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage()); } else kc = new KeyConfigure(parent,null,vt.getCodePage()); }
| 4,500
|
private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = vt.ebcdic2uni(x); char ac = vt.getASCIIChar(x); if (!Character.isISOControl(ac)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); listModel.addElement(keyc.getSourceString()); } //Create the list and put it in a scroll pane JList hm = new JList(listModel); hm.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); hm.setSelectedIndex(0); JScrollPane listScrollPane = new JScrollPane(hm); listScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); listScrollPane.setSize(40,100); srp.add(listScrollPane,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {LangTool.getString("hm.optInsert"), LangTool.getString("hm.optCancel")}; int result = 0; result = JOptionPane.showOptionDialog( me.getParentView((Session)this), // the parent that the dialog blocks message, // the dialog message array LangTool.getString("hm.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.INFORMATION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Insert character String k = ""; k += ((String)hm.getSelectedValue()).charAt(7); screen.sendKeys(k); break; case 1: // Cancel// System.out.println("Cancel"); break; default: break; } }
|
private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = vt.ebcdic2uni(x); char ac = vt.getASCIIChar(x); if (!Character.isISOControl(ac)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); listModel.addElement(keyc.getSourceString()); } //Create the list and put it in a scroll pane JList hm = new JList(listModel); hm.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); hm.setSelectedIndex(0); JScrollPane listScrollPane = new JScrollPane(hm); listScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); listScrollPane.setSize(40,100); srp.add(listScrollPane,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {LangTool.getString("hm.optInsert"), LangTool.getString("hm.optCancel")}; int result = 0; result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("hm.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.INFORMATION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Insert character String k = ""; k += ((String)hm.getSelectedValue()).charAt(7); screen.sendKeys(k); break; case 1: // Cancel// System.out.println("Cancel"); break; default: break; } }
| 4,501
|
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (leaf) setIcon(getLeafIcon()); else if (expanded) setIcon(getOpenIcon()); else setIcon(getClosedIcon()); setText(val.toString()); this.selected = selected; this.hasFocus = hasFocus; setHorizontalAlignment(LEFT); setOpaque(false); setVerticalAlignment(TOP); setEnabled(true); super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font")); if (selected) { super.setBackground(getBackgroundSelectionColor()); setForeground(getTextSelectionColor()); if (tree.getLeadSelectionPath() == null || (tree.getLeadSelectionPath().getLastPathComponent()).equals(val)) setBorderSelectionColor(UIManager.getLookAndFeelDefaults(). getColor("Tree.selectionBorderColor")); else setBorderSelectionColor(null); } else { super.setBackground(getBackgroundNonSelectionColor()); setForeground(getTextNonSelectionColor()); setBorderSelectionColor(null); } return this; }
|
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (leaf) setIcon(getLeafIcon()); else if (expanded) setIcon(getOpenIcon()); else setIcon(getClosedIcon()); setText(val.toString()); this.selected = selected; this.hasFocus = hasFocus; setHorizontalAlignment(LEFT); setOpaque(false); setVerticalAlignment(TOP); setEnabled(true); super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font")); if (selected) { super.setBackground(getBackgroundSelectionColor()); setForeground(getTextSelectionColor()); if (tree.getLeadSelectionPath() == null || (tree.getLeadSelectionPath().getLastPathComponent()).equals(val)) setBorderSelectionColor(UIManager.getLookAndFeelDefaults(). getColor("Tree.selectionBorderColor")); else setBorderSelectionColor(null); } else { super.setBackground(getBackgroundNonSelectionColor()); setForeground(getTextNonSelectionColor()); setBorderSelectionColor(null); } return this; }
| 4,502
|
MenuBar(){ if (GraphicsEnvironment.isHeadless()) throw new HeadlessException ();}
|
MenuBar(){ if (GraphicsEnvironment.isHeadless()) throw new HeadlessException ();}
| 4,503
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
| 4,504
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
|
add(Menu menu) if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) menu.addNotify(); } return(menu);}
| 4,505
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); return(menu);
| 4,506
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
|
add(Menu menu){ if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; menus.addElement(menu); if (peer != null) { menu.addNotify(); } return(menu);}
| 4,507
|
countMenus(){ return menus.size () + (getHelpMenu () == null ? 0 : 1);}
|
countMenus(){ return menus.size () + (getHelpMenu () == null ? 0 : 1);}
| 4,508
|
deleteShortcut(MenuShortcut shortcut){ MenuItem it; // This is a slow implementation, but it probably doesn't matter. while ((it = getShortcutMenuItem (shortcut)) != null) it.deleteShortcut ();}
|
deleteShortcut(MenuShortcut shortcut){ MenuItem it; // This is a slow implementation, but it probably doesn't matter. while ((it = getShortcutMenuItem (shortcut)) != null) it.deleteShortcut ();}
| 4,509
|
getHelpMenu(){ return(helpMenu);}
|
getHelpMenu(){ return(helpMenu);}
| 4,510
|
getMenu(int index){ return((Menu)menus.elementAt(index));}
|
getMenu(int index){ return((Menu)menus.elementAt(index));}
| 4,511
|
getMenuCount(){ return countMenus ();}
|
getMenuCount(){ return countMenus ();}
| 4,512
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
| 4,513
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
| 4,514
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
|
getShortcutMenuItem(MenuShortcut shortcut){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); MenuShortcut s = menu.getShortcut(); if ((s != null) && (s.equals(shortcut))) return(menu); } return(null);}
| 4,515
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
| 4,516
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
| 4,517
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); myPeer.addHelpMenu(menu); } }}
| 4,518
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; } helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu); }}
|
setHelpMenu(Menu menu){ if (helpMenu != null) { helpMenu.removeNotify (); helpMenu.parent = null; helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); menu.parent = this; MenuBarPeer peer = (MenuBarPeer) getPeer (); if (peer != null) { menu.addNotify(); peer.addHelpMenu (menu);
| 4,519
|
shortcuts(){ Vector shortcuts = new Vector(); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); if (menu.getShortcut() != null) shortcuts.addElement(menu.getShortcut()); } return(shortcuts.elements());}
|
shortcuts(){ Vector shortcuts = new Vector(); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); if (menu.getShortcut() != null) shortcuts.addElement(menu.getShortcut()); } return(shortcuts.elements());}
| 4,520
|
shortcuts(){ Vector shortcuts = new Vector(); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); if (menu.getShortcut() != null) shortcuts.addElement(menu.getShortcut()); } return(shortcuts.elements());}
|
shortcuts(){ Vector shortcuts = new Vector(); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu menu = (Menu)e.nextElement(); if (menu.getShortcut() != null) shortcuts.addElement(menu.getShortcut()); } return(shortcuts.elements());}
| 4,521
|
private static List getInstanceFields(VmType jnodeType) { final int all = jnodeType.getNoDeclaredFields(); final ArrayList list = new ArrayList(all); for (int i = 0; i < all; i++) { final VmField f = jnodeType.getDeclaredField(i); if (!f.isStatic()) { list.add(f); } } return list; }
|
private static List getInstanceFields(VmType jnodeType) { final int all = jnodeType.getNoDeclaredFields(); final ArrayList list = new ArrayList(all); for (int i = 0; i < all; i++) { final VmField f = jnodeType.getDeclaredField(i); if (!f.isStatic()) { list.add(f); } } return list; }
| 4,522
|
private static List getStaticFields(VmType jnodeType) { final int all = jnodeType.getNoDeclaredFields(); final ArrayList list = new ArrayList(all); for (int i = 0; i < all; i++) { final VmField f = jnodeType.getDeclaredField(i); if (f.isStatic()) { list.add(f); } } return list; }
|
private static List getStaticFields(VmType jnodeType) { final int all = jnodeType.getNoDeclaredFields(); final ArrayList list = new ArrayList(all); for (int i = 0; i < all; i++) { final VmField f = jnodeType.getDeclaredField(i); if (f.isStatic()) { list.add(f); } } return list; }
| 4,523
|
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
|
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
| 4,524
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.