rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
c.setOpaque(true); c.setBackground(javax.swing.UIManager.getColor("control"));
|
public void installUI(JComponent c) { super.installUI(c); }
|
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = defaults.getIcon("CheckBoxMenuItem.checkIcon");
|
checkIcon = UIManager.getIcon("CheckBoxMenuItem.checkIcon");
|
protected void installDefaults() { super.installDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = defaults.getIcon("CheckBoxMenuItem.checkIcon"); }
|
m_parameter_buffer.setBigEndian(Big_endian);
|
public streamRequest getParameterStream() { m_parameter_buffer = new streamRequest(); m_parameter_buffer.request = this; m_parameter_buffer.setVersion(ior.Internet.version); m_parameter_buffer.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); m_parameter_buffer.setOrb(orb); return m_parameter_buffer; }
|
|
request_part.setBigEndian(header.isBigEndian());
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
|
|
static public int[] getScanline (Reader in, int len) throws IOException
|
public static int[] getScanline (Reader in, int len) throws IOException
|
static public int[] getScanline (Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read (); if (ch == '0') { in.read (); // 'x' byteStr[0] = (char) in.read (); byteStr[1] = (char) in.read (); int byteVal = Integer.parseInt (new String (byteStr), 16); for (int i = 0; i < 8; i++, x++) { if (x == len) // condition occurs if bitmap is padded return scanline; scanline[x] = ((byteVal & masktable[i]) != 0) ? black : transparent; } } } return scanline; }
|
{
|
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new MessageNode(terminate); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
|
|
}
|
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new MessageNode(terminate); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
|
|
System.err.println(message);
|
logger.info(message);
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); DocumentFragment fragment = doc.createDocumentFragment(); children.apply(stylesheet, mode, context, pos, len, fragment, null); String message = Expr.stringValue(fragment); System.err.println(message); if (terminate) { stylesheet.terminated = true; } } if (next != null && !terminate) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
{
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); DocumentFragment fragment = doc.createDocumentFragment(); children.apply(stylesheet, mode, context, pos, len, fragment, null); String message = Expr.stringValue(fragment); System.err.println(message); if (terminate) { stylesheet.terminated = true; } } if (next != null && !terminate) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
|
}
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); DocumentFragment fragment = doc.createDocumentFragment(); children.apply(stylesheet, mode, context, pos, len, fragment, null); String message = Expr.stringValue(fragment); System.err.println(message); if (terminate) { stylesheet.terminated = true; } } if (next != null && !terminate) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
|
sum = hi - lo;
|
sum = hi - lo + 1;
|
private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; break; case ListSelectionModel.SINGLE_INTERVAL_SELECTION: sum = hi - lo; break; case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION: for (int i = lo; i < hi; ++i) if (lsm.isSelectedIndex(i)) ++sum; break; } } return sum; }
|
for (int i = lo; i < hi; ++i)
|
for (int i = lo; i <= hi; ++i)
|
private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; break; case ListSelectionModel.SINGLE_INTERVAL_SELECTION: sum = hi - lo; break; case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION: for (int i = lo; i < hi; ++i) if (lsm.isSelectedIndex(i)) ++sum; break; } } return sum; }
|
for (int i = lo; i < hi; ++i)
|
for (int i = lo; i <= hi; ++i)
|
private static int[] getSelections(ListSelectionModel lsm) { int sz = countSelections(lsm); int [] ret = new int[sz]; int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int j = 0; java.util.ArrayList ls = new java.util.ArrayList(); if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: ret[0] = lo; break; case ListSelectionModel.SINGLE_INTERVAL_SELECTION: for (int i = lo; i < hi; ++i) ret[j++] = i; break; case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION: for (int i = lo; i < hi; ++i) if (lsm.isSelectedIndex(i)) ret[j++] = i; break; } } return ret; }
|
columnModel.getSelectionModel().setSelectionMode(s);
|
public void setSelectionMode(int s) { selectionModel.setSelectionMode(s); repaint(); }
|
|
String FEATURES = "http: String PROPERTIES = "http:
|
final String FEATURES = "http: final String PROPERTIES = "http: final String GNU_FEATURES = "http: final String GNU_PROPERTIES = "http: if ((GNU_FEATURES + "base-uri").equals(name)) return baseURI;
|
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "is-standalone").equals(name)) return xmlStandalone ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "namespaces").equals(name)) return namespaceAware ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "string-interning").equals(name)) return stringInterning ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "use-attributes2").equals(name)) return Boolean.TRUE; if ((FEATURES + "use-locator2").equals(name)) return Boolean.TRUE; if ((FEATURES + "use-entity-resolver2").equals(name)) return Boolean.FALSE; if ((FEATURES + "validation").equals(name)) return validating ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "external-general-entities").equals(name)) return externalEntities ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "external-parameter-entities").equals(name)) return externalEntities ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "xml-1.1").equals(name)) return Boolean.TRUE; if ((PROPERTIES + "declaration-handler").equals(name)) return declHandler; if ((PROPERTIES + "document-xml-version").equals(name)) return xmlVersion; if ((PROPERTIES + "lexical-handler").equals(name)) return lexicalHandler; throw new SAXNotSupportedException(name); }
|
if ((GNU_FEATURES + "xml-base").equals(name)) return baseAware ? Boolean.TRUE : Boolean.FALSE; if ((GNU_PROPERTIES + "document-xml-encoding").equals(name)) return xmlEncoding;
|
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "is-standalone").equals(name)) return xmlStandalone ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "namespaces").equals(name)) return namespaceAware ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "string-interning").equals(name)) return stringInterning ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "use-attributes2").equals(name)) return Boolean.TRUE; if ((FEATURES + "use-locator2").equals(name)) return Boolean.TRUE; if ((FEATURES + "use-entity-resolver2").equals(name)) return Boolean.FALSE; if ((FEATURES + "validation").equals(name)) return validating ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "external-general-entities").equals(name)) return externalEntities ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "external-parameter-entities").equals(name)) return externalEntities ? Boolean.TRUE : Boolean.FALSE; if ((FEATURES + "xml-1.1").equals(name)) return Boolean.TRUE; if ((PROPERTIES + "declaration-handler").equals(name)) return declHandler; if ((PROPERTIES + "document-xml-version").equals(name)) return xmlVersion; if ((PROPERTIES + "lexical-handler").equals(name)) return lexicalHandler; throw new SAXNotSupportedException(name); }
|
|
switch (parser.next())
|
int event = parser.next(); if (baseAware) baseURI = parser.getXMLBase(); switch (event)
|
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); else { Reader r = input.getCharacterStream(); if (r != null) parser = new XMLParser(r, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } if (parser == null) { if (systemId == null) throw new SAXException("No stream or system ID specified"); systemId = XMLParser.absolutize(null, systemId); in = new URL(systemId).openStream(); opened = true; parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } reader = parser; if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; try { while (parser.hasNext()) { switch (parser.next()) { case XMLStreamConstants.CHARACTERS: if (contentHandler != null) { char[] b = reader.getTextCharacters(); contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.SPACE: if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace is ignorable contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.CDATA: if (lexicalHandler != null) lexicalHandler.startCDATA(); if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace and ignorable contentHandler.characters(b, 0, b.length); } if (lexicalHandler != null) lexicalHandler.endCDATA(); break; case XMLStreamConstants.START_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } else { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsuri = reader.getNamespaceURI(i); String nsprefix = reader.getNamespacePrefix(i); contentHandler.startPrefixMapping(nsprefix, nsuri); } } contentHandler.startElement(uri, localName, qName, this); } break; case XMLStreamConstants.END_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } contentHandler.endElement(uri, localName, qName); if (namespaceAware) { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsprefix = reader.getNamespacePrefix(i); contentHandler.endPrefixMapping(nsprefix); } } } break; case XMLStreamConstants.COMMENT: if (lexicalHandler != null) { char[] b = reader.getTextCharacters(); lexicalHandler.comment(b, 0, b.length); } break; case XMLStreamConstants.PROCESSING_INSTRUCTION: if (contentHandler != null) { String target = reader.getPITarget(); String data = reader.getPIData(); if (data == null) data = ""; contentHandler.processingInstruction(target, data); } break; case XMLStreamConstants.START_DOCUMENT: encoding = reader.getEncoding(); xmlVersion = reader.getVersion(); xmlStandalone = reader.isStandalone(); if (contentHandler != null) contentHandler.startDocument(); startDocumentDone = true; break; case XMLStreamConstants.END_DOCUMENT: if (contentHandler != null) contentHandler.endDocument(); break; case XMLStreamConstants.DTD: XMLParser.Doctype doctype = parser.doctype; if (lexicalHandler != null) { String rootName = doctype.rootName; String publicId = doctype.publicId; String systemId2 = doctype.systemId; lexicalHandler.startDTD(rootName, publicId, systemId2); } for (Iterator i = doctype.entryIterator(); i.hasNext(); ) { String entry = (String) i.next(); char c = entry.charAt(0); String name = entry.substring(1); if ('E' == c) { // Element decl if (declHandler != null) { String model = doctype.getElementModel(name); declHandler.elementDecl(name, model); } } else if ('A' == c) { // Attlist decl if (declHandler != null) { for (Iterator j = doctype.attlistIterator(name); j.hasNext(); ) { Map.Entry att = (Map.Entry) j.next(); String aname = (String) att.getKey(); XMLParser.AttributeDecl decl = (XMLParser.AttributeDecl) att.getValue(); String type = decl.type; String value = decl.value; String mode = null; switch (decl.valueType) { case XMLParser.ATTRIBUTE_DEFAULT_FIXED: mode = "#FIXED"; break; case XMLParser.ATTRIBUTE_DEFAULT_REQUIRED: mode = "#REQUIRED"; break; case XMLParser.ATTRIBUTE_DEFAULT_IMPLIED: mode = "#IMPLIED"; break; } declHandler.attributeDecl(name, aname, type, mode, value); } } } else if ('e' == c) { // Entity decl Object entity = doctype.getEntity(name); if (entity instanceof String) { if (declHandler != null) declHandler.internalEntityDecl(name, (String) entity); } else { XMLParser.ExternalIds ids = (XMLParser.ExternalIds) entity; if (ids.notationName != null) { if (dtdHandler != null) { String pub = ids.publicId; String url = ids.systemId; String not = ids.notationName; dtdHandler.unparsedEntityDecl(name, pub, url, not); } } else { if (declHandler != null) { String pub = ids.publicId; String url = ids.systemId; declHandler.externalEntityDecl(name, pub, url); } } } } else if ('n' == c) { // Notation decl if (dtdHandler != null) { XMLParser.ExternalIds ids = doctype.getNotation(name); String pub = ids.publicId; String url = ids.systemId; dtdHandler.notationDecl(name, pub, url); } } } if (lexicalHandler != null) lexicalHandler.endDTD(); } } } catch (XMLStreamException e) { if (!startDocumentDone && contentHandler != null) contentHandler.startDocument(); SAXParseException e2 = new SAXParseException(e.getMessage(), this); e2.initCause(e); if (errorHandler != null) errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); throw e2; } finally { if (opened) in.close(); reset(); } }
|
if (isIgnorableWhitespace(parser, b, false)) contentHandler.ignorableWhitespace(b, 0, b.length); else
|
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); else { Reader r = input.getCharacterStream(); if (r != null) parser = new XMLParser(r, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } if (parser == null) { if (systemId == null) throw new SAXException("No stream or system ID specified"); systemId = XMLParser.absolutize(null, systemId); in = new URL(systemId).openStream(); opened = true; parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } reader = parser; if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; try { while (parser.hasNext()) { switch (parser.next()) { case XMLStreamConstants.CHARACTERS: if (contentHandler != null) { char[] b = reader.getTextCharacters(); contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.SPACE: if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace is ignorable contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.CDATA: if (lexicalHandler != null) lexicalHandler.startCDATA(); if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace and ignorable contentHandler.characters(b, 0, b.length); } if (lexicalHandler != null) lexicalHandler.endCDATA(); break; case XMLStreamConstants.START_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } else { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsuri = reader.getNamespaceURI(i); String nsprefix = reader.getNamespacePrefix(i); contentHandler.startPrefixMapping(nsprefix, nsuri); } } contentHandler.startElement(uri, localName, qName, this); } break; case XMLStreamConstants.END_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } contentHandler.endElement(uri, localName, qName); if (namespaceAware) { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsprefix = reader.getNamespacePrefix(i); contentHandler.endPrefixMapping(nsprefix); } } } break; case XMLStreamConstants.COMMENT: if (lexicalHandler != null) { char[] b = reader.getTextCharacters(); lexicalHandler.comment(b, 0, b.length); } break; case XMLStreamConstants.PROCESSING_INSTRUCTION: if (contentHandler != null) { String target = reader.getPITarget(); String data = reader.getPIData(); if (data == null) data = ""; contentHandler.processingInstruction(target, data); } break; case XMLStreamConstants.START_DOCUMENT: encoding = reader.getEncoding(); xmlVersion = reader.getVersion(); xmlStandalone = reader.isStandalone(); if (contentHandler != null) contentHandler.startDocument(); startDocumentDone = true; break; case XMLStreamConstants.END_DOCUMENT: if (contentHandler != null) contentHandler.endDocument(); break; case XMLStreamConstants.DTD: XMLParser.Doctype doctype = parser.doctype; if (lexicalHandler != null) { String rootName = doctype.rootName; String publicId = doctype.publicId; String systemId2 = doctype.systemId; lexicalHandler.startDTD(rootName, publicId, systemId2); } for (Iterator i = doctype.entryIterator(); i.hasNext(); ) { String entry = (String) i.next(); char c = entry.charAt(0); String name = entry.substring(1); if ('E' == c) { // Element decl if (declHandler != null) { String model = doctype.getElementModel(name); declHandler.elementDecl(name, model); } } else if ('A' == c) { // Attlist decl if (declHandler != null) { for (Iterator j = doctype.attlistIterator(name); j.hasNext(); ) { Map.Entry att = (Map.Entry) j.next(); String aname = (String) att.getKey(); XMLParser.AttributeDecl decl = (XMLParser.AttributeDecl) att.getValue(); String type = decl.type; String value = decl.value; String mode = null; switch (decl.valueType) { case XMLParser.ATTRIBUTE_DEFAULT_FIXED: mode = "#FIXED"; break; case XMLParser.ATTRIBUTE_DEFAULT_REQUIRED: mode = "#REQUIRED"; break; case XMLParser.ATTRIBUTE_DEFAULT_IMPLIED: mode = "#IMPLIED"; break; } declHandler.attributeDecl(name, aname, type, mode, value); } } } else if ('e' == c) { // Entity decl Object entity = doctype.getEntity(name); if (entity instanceof String) { if (declHandler != null) declHandler.internalEntityDecl(name, (String) entity); } else { XMLParser.ExternalIds ids = (XMLParser.ExternalIds) entity; if (ids.notationName != null) { if (dtdHandler != null) { String pub = ids.publicId; String url = ids.systemId; String not = ids.notationName; dtdHandler.unparsedEntityDecl(name, pub, url, not); } } else { if (declHandler != null) { String pub = ids.publicId; String url = ids.systemId; declHandler.externalEntityDecl(name, pub, url); } } } } else if ('n' == c) { // Notation decl if (dtdHandler != null) { XMLParser.ExternalIds ids = doctype.getNotation(name); String pub = ids.publicId; String url = ids.systemId; dtdHandler.notationDecl(name, pub, url); } } } if (lexicalHandler != null) lexicalHandler.endDTD(); } } } catch (XMLStreamException e) { if (!startDocumentDone && contentHandler != null) contentHandler.startDocument(); SAXParseException e2 = new SAXParseException(e.getMessage(), this); e2.initCause(e); if (errorHandler != null) errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); throw e2; } finally { if (opened) in.close(); reset(); } }
|
|
if (isIgnorableWhitespace(parser, b, true)) contentHandler.ignorableWhitespace(b, 0, b.length); else
|
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); else { Reader r = input.getCharacterStream(); if (r != null) parser = new XMLParser(r, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } if (parser == null) { if (systemId == null) throw new SAXException("No stream or system ID specified"); systemId = XMLParser.absolutize(null, systemId); in = new URL(systemId).openStream(); opened = true; parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } reader = parser; if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; try { while (parser.hasNext()) { switch (parser.next()) { case XMLStreamConstants.CHARACTERS: if (contentHandler != null) { char[] b = reader.getTextCharacters(); contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.SPACE: if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace is ignorable contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.CDATA: if (lexicalHandler != null) lexicalHandler.startCDATA(); if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace and ignorable contentHandler.characters(b, 0, b.length); } if (lexicalHandler != null) lexicalHandler.endCDATA(); break; case XMLStreamConstants.START_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } else { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsuri = reader.getNamespaceURI(i); String nsprefix = reader.getNamespacePrefix(i); contentHandler.startPrefixMapping(nsprefix, nsuri); } } contentHandler.startElement(uri, localName, qName, this); } break; case XMLStreamConstants.END_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } contentHandler.endElement(uri, localName, qName); if (namespaceAware) { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsprefix = reader.getNamespacePrefix(i); contentHandler.endPrefixMapping(nsprefix); } } } break; case XMLStreamConstants.COMMENT: if (lexicalHandler != null) { char[] b = reader.getTextCharacters(); lexicalHandler.comment(b, 0, b.length); } break; case XMLStreamConstants.PROCESSING_INSTRUCTION: if (contentHandler != null) { String target = reader.getPITarget(); String data = reader.getPIData(); if (data == null) data = ""; contentHandler.processingInstruction(target, data); } break; case XMLStreamConstants.START_DOCUMENT: encoding = reader.getEncoding(); xmlVersion = reader.getVersion(); xmlStandalone = reader.isStandalone(); if (contentHandler != null) contentHandler.startDocument(); startDocumentDone = true; break; case XMLStreamConstants.END_DOCUMENT: if (contentHandler != null) contentHandler.endDocument(); break; case XMLStreamConstants.DTD: XMLParser.Doctype doctype = parser.doctype; if (lexicalHandler != null) { String rootName = doctype.rootName; String publicId = doctype.publicId; String systemId2 = doctype.systemId; lexicalHandler.startDTD(rootName, publicId, systemId2); } for (Iterator i = doctype.entryIterator(); i.hasNext(); ) { String entry = (String) i.next(); char c = entry.charAt(0); String name = entry.substring(1); if ('E' == c) { // Element decl if (declHandler != null) { String model = doctype.getElementModel(name); declHandler.elementDecl(name, model); } } else if ('A' == c) { // Attlist decl if (declHandler != null) { for (Iterator j = doctype.attlistIterator(name); j.hasNext(); ) { Map.Entry att = (Map.Entry) j.next(); String aname = (String) att.getKey(); XMLParser.AttributeDecl decl = (XMLParser.AttributeDecl) att.getValue(); String type = decl.type; String value = decl.value; String mode = null; switch (decl.valueType) { case XMLParser.ATTRIBUTE_DEFAULT_FIXED: mode = "#FIXED"; break; case XMLParser.ATTRIBUTE_DEFAULT_REQUIRED: mode = "#REQUIRED"; break; case XMLParser.ATTRIBUTE_DEFAULT_IMPLIED: mode = "#IMPLIED"; break; } declHandler.attributeDecl(name, aname, type, mode, value); } } } else if ('e' == c) { // Entity decl Object entity = doctype.getEntity(name); if (entity instanceof String) { if (declHandler != null) declHandler.internalEntityDecl(name, (String) entity); } else { XMLParser.ExternalIds ids = (XMLParser.ExternalIds) entity; if (ids.notationName != null) { if (dtdHandler != null) { String pub = ids.publicId; String url = ids.systemId; String not = ids.notationName; dtdHandler.unparsedEntityDecl(name, pub, url, not); } } else { if (declHandler != null) { String pub = ids.publicId; String url = ids.systemId; declHandler.externalEntityDecl(name, pub, url); } } } } else if ('n' == c) { // Notation decl if (dtdHandler != null) { XMLParser.ExternalIds ids = doctype.getNotation(name); String pub = ids.publicId; String url = ids.systemId; dtdHandler.notationDecl(name, pub, url); } } } if (lexicalHandler != null) lexicalHandler.endDTD(); } } } catch (XMLStreamException e) { if (!startDocumentDone && contentHandler != null) contentHandler.startDocument(); SAXParseException e2 = new SAXParseException(e.getMessage(), this); e2.initCause(e); if (errorHandler != null) errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); throw e2; } finally { if (opened) in.close(); reset(); } }
|
|
String model = doctype.getElementModel(name); declHandler.elementDecl(name, model);
|
XMLParser.ContentModel model = doctype.getElementModel(name); declHandler.elementDecl(name, model.text);
|
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); else { Reader r = input.getCharacterStream(); if (r != null) parser = new XMLParser(r, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } if (parser == null) { if (systemId == null) throw new SAXException("No stream or system ID specified"); systemId = XMLParser.absolutize(null, systemId); in = new URL(systemId).openStream(); opened = true; parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } reader = parser; if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; try { while (parser.hasNext()) { switch (parser.next()) { case XMLStreamConstants.CHARACTERS: if (contentHandler != null) { char[] b = reader.getTextCharacters(); contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.SPACE: if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace is ignorable contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.CDATA: if (lexicalHandler != null) lexicalHandler.startCDATA(); if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace and ignorable contentHandler.characters(b, 0, b.length); } if (lexicalHandler != null) lexicalHandler.endCDATA(); break; case XMLStreamConstants.START_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } else { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsuri = reader.getNamespaceURI(i); String nsprefix = reader.getNamespacePrefix(i); contentHandler.startPrefixMapping(nsprefix, nsuri); } } contentHandler.startElement(uri, localName, qName, this); } break; case XMLStreamConstants.END_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } contentHandler.endElement(uri, localName, qName); if (namespaceAware) { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsprefix = reader.getNamespacePrefix(i); contentHandler.endPrefixMapping(nsprefix); } } } break; case XMLStreamConstants.COMMENT: if (lexicalHandler != null) { char[] b = reader.getTextCharacters(); lexicalHandler.comment(b, 0, b.length); } break; case XMLStreamConstants.PROCESSING_INSTRUCTION: if (contentHandler != null) { String target = reader.getPITarget(); String data = reader.getPIData(); if (data == null) data = ""; contentHandler.processingInstruction(target, data); } break; case XMLStreamConstants.START_DOCUMENT: encoding = reader.getEncoding(); xmlVersion = reader.getVersion(); xmlStandalone = reader.isStandalone(); if (contentHandler != null) contentHandler.startDocument(); startDocumentDone = true; break; case XMLStreamConstants.END_DOCUMENT: if (contentHandler != null) contentHandler.endDocument(); break; case XMLStreamConstants.DTD: XMLParser.Doctype doctype = parser.doctype; if (lexicalHandler != null) { String rootName = doctype.rootName; String publicId = doctype.publicId; String systemId2 = doctype.systemId; lexicalHandler.startDTD(rootName, publicId, systemId2); } for (Iterator i = doctype.entryIterator(); i.hasNext(); ) { String entry = (String) i.next(); char c = entry.charAt(0); String name = entry.substring(1); if ('E' == c) { // Element decl if (declHandler != null) { String model = doctype.getElementModel(name); declHandler.elementDecl(name, model); } } else if ('A' == c) { // Attlist decl if (declHandler != null) { for (Iterator j = doctype.attlistIterator(name); j.hasNext(); ) { Map.Entry att = (Map.Entry) j.next(); String aname = (String) att.getKey(); XMLParser.AttributeDecl decl = (XMLParser.AttributeDecl) att.getValue(); String type = decl.type; String value = decl.value; String mode = null; switch (decl.valueType) { case XMLParser.ATTRIBUTE_DEFAULT_FIXED: mode = "#FIXED"; break; case XMLParser.ATTRIBUTE_DEFAULT_REQUIRED: mode = "#REQUIRED"; break; case XMLParser.ATTRIBUTE_DEFAULT_IMPLIED: mode = "#IMPLIED"; break; } declHandler.attributeDecl(name, aname, type, mode, value); } } } else if ('e' == c) { // Entity decl Object entity = doctype.getEntity(name); if (entity instanceof String) { if (declHandler != null) declHandler.internalEntityDecl(name, (String) entity); } else { XMLParser.ExternalIds ids = (XMLParser.ExternalIds) entity; if (ids.notationName != null) { if (dtdHandler != null) { String pub = ids.publicId; String url = ids.systemId; String not = ids.notationName; dtdHandler.unparsedEntityDecl(name, pub, url, not); } } else { if (declHandler != null) { String pub = ids.publicId; String url = ids.systemId; declHandler.externalEntityDecl(name, pub, url); } } } } else if ('n' == c) { // Notation decl if (dtdHandler != null) { XMLParser.ExternalIds ids = doctype.getNotation(name); String pub = ids.publicId; String url = ids.systemId; dtdHandler.notationDecl(name, pub, url); } } } if (lexicalHandler != null) lexicalHandler.endDTD(); } } } catch (XMLStreamException e) { if (!startDocumentDone && contentHandler != null) contentHandler.startDocument(); SAXParseException e2 = new SAXParseException(e.getMessage(), this); e2.initCause(e); if (errorHandler != null) errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); throw e2; } finally { if (opened) in.close(); reset(); } }
|
else if ('c' == c) { if (lexicalHandler != null) { String comment = doctype.getComment(name); char[] b = comment.toCharArray(); lexicalHandler.comment(b, 0, b.length); } } else if ('p' == c) { if (contentHandler != null) { String[] pi = doctype.getPI(name); String target = pi[0]; String data = pi[1]; if (data == null) data = ""; contentHandler.processingInstruction(target, data); } }
|
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); else { Reader r = input.getCharacterStream(); if (r != null) parser = new XMLParser(r, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } if (parser == null) { if (systemId == null) throw new SAXException("No stream or system ID specified"); systemId = XMLParser.absolutize(null, systemId); in = new URL(systemId).openStream(); opened = true; parser = new XMLParser(in, systemId, validating, namespaceAware, coalescing, replaceERefs, externalEntities, supportDTD, baseAware, stringInterning, this, this); } reader = parser; if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; try { while (parser.hasNext()) { switch (parser.next()) { case XMLStreamConstants.CHARACTERS: if (contentHandler != null) { char[] b = reader.getTextCharacters(); contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.SPACE: if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace is ignorable contentHandler.characters(b, 0, b.length); } break; case XMLStreamConstants.CDATA: if (lexicalHandler != null) lexicalHandler.startCDATA(); if (contentHandler != null) { char[] b = reader.getTextCharacters(); // TODO determine whether whitespace and ignorable contentHandler.characters(b, 0, b.length); } if (lexicalHandler != null) lexicalHandler.endCDATA(); break; case XMLStreamConstants.START_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } else { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsuri = reader.getNamespaceURI(i); String nsprefix = reader.getNamespacePrefix(i); contentHandler.startPrefixMapping(nsprefix, nsuri); } } contentHandler.startElement(uri, localName, qName, this); } break; case XMLStreamConstants.END_ELEMENT: if (contentHandler != null) { QName name = reader.getName(); String uri = name.getNamespaceURI(); String localName = name.getLocalPart(); String prefix = name.getPrefix(); String qName = localName; if (!"".equals(prefix)) qName = prefix + ":" + localName; if (!namespaceAware) { uri = ""; localName = ""; } contentHandler.endElement(uri, localName, qName); if (namespaceAware) { int nc = reader.getNamespaceCount(); for (int i = 0; i < nc; i++) { String nsprefix = reader.getNamespacePrefix(i); contentHandler.endPrefixMapping(nsprefix); } } } break; case XMLStreamConstants.COMMENT: if (lexicalHandler != null) { char[] b = reader.getTextCharacters(); lexicalHandler.comment(b, 0, b.length); } break; case XMLStreamConstants.PROCESSING_INSTRUCTION: if (contentHandler != null) { String target = reader.getPITarget(); String data = reader.getPIData(); if (data == null) data = ""; contentHandler.processingInstruction(target, data); } break; case XMLStreamConstants.START_DOCUMENT: encoding = reader.getEncoding(); xmlVersion = reader.getVersion(); xmlStandalone = reader.isStandalone(); if (contentHandler != null) contentHandler.startDocument(); startDocumentDone = true; break; case XMLStreamConstants.END_DOCUMENT: if (contentHandler != null) contentHandler.endDocument(); break; case XMLStreamConstants.DTD: XMLParser.Doctype doctype = parser.doctype; if (lexicalHandler != null) { String rootName = doctype.rootName; String publicId = doctype.publicId; String systemId2 = doctype.systemId; lexicalHandler.startDTD(rootName, publicId, systemId2); } for (Iterator i = doctype.entryIterator(); i.hasNext(); ) { String entry = (String) i.next(); char c = entry.charAt(0); String name = entry.substring(1); if ('E' == c) { // Element decl if (declHandler != null) { String model = doctype.getElementModel(name); declHandler.elementDecl(name, model); } } else if ('A' == c) { // Attlist decl if (declHandler != null) { for (Iterator j = doctype.attlistIterator(name); j.hasNext(); ) { Map.Entry att = (Map.Entry) j.next(); String aname = (String) att.getKey(); XMLParser.AttributeDecl decl = (XMLParser.AttributeDecl) att.getValue(); String type = decl.type; String value = decl.value; String mode = null; switch (decl.valueType) { case XMLParser.ATTRIBUTE_DEFAULT_FIXED: mode = "#FIXED"; break; case XMLParser.ATTRIBUTE_DEFAULT_REQUIRED: mode = "#REQUIRED"; break; case XMLParser.ATTRIBUTE_DEFAULT_IMPLIED: mode = "#IMPLIED"; break; } declHandler.attributeDecl(name, aname, type, mode, value); } } } else if ('e' == c) { // Entity decl Object entity = doctype.getEntity(name); if (entity instanceof String) { if (declHandler != null) declHandler.internalEntityDecl(name, (String) entity); } else { XMLParser.ExternalIds ids = (XMLParser.ExternalIds) entity; if (ids.notationName != null) { if (dtdHandler != null) { String pub = ids.publicId; String url = ids.systemId; String not = ids.notationName; dtdHandler.unparsedEntityDecl(name, pub, url, not); } } else { if (declHandler != null) { String pub = ids.publicId; String url = ids.systemId; declHandler.externalEntityDecl(name, pub, url); } } } } else if ('n' == c) { // Notation decl if (dtdHandler != null) { XMLParser.ExternalIds ids = doctype.getNotation(name); String pub = ids.publicId; String url = ids.systemId; dtdHandler.notationDecl(name, pub, url); } } } if (lexicalHandler != null) lexicalHandler.endDTD(); } } } catch (XMLStreamException e) { if (!startDocumentDone && contentHandler != null) contentHandler.startDocument(); SAXParseException e2 = new SAXParseException(e.getMessage(), this); e2.initCause(e); if (errorHandler != null) errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); throw e2; } finally { if (opened) in.close(); reset(); } }
|
|
String FEATURES = "http: String PROPERTIES = "http:
|
final String FEATURES = "http: final String PROPERTIES = "http: final String GNU_FEATURES = "http:
|
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (parser != null) throw new IllegalStateException("parsing in progress"); String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "namespaces").equals(name)) namespaceAware = Boolean.TRUE.equals(value); else if ((FEATURES + "string-interning").equals(name)) stringInterning = Boolean.TRUE.equals(value); else if ((FEATURES + "validation").equals(name)) validating = Boolean.TRUE.equals(value); else if ((FEATURES + "external-general-entities").equals(name)) externalEntities = Boolean.TRUE.equals(value); else if ((FEATURES + "external-parameter-entities").equals(name)) externalEntities = Boolean.TRUE.equals(value); else if ((PROPERTIES + "declaration-handler").equals(name)) declHandler = (DeclHandler) value; else if ((PROPERTIES + "lexical-handler").equals(name)) lexicalHandler = (LexicalHandler) value; else throw new SAXNotSupportedException(name); }
|
else if ((GNU_FEATURES + "xml-base").equals(name)) baseAware = Boolean.TRUE.equals(value);
|
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (parser != null) throw new IllegalStateException("parsing in progress"); String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "namespaces").equals(name)) namespaceAware = Boolean.TRUE.equals(value); else if ((FEATURES + "string-interning").equals(name)) stringInterning = Boolean.TRUE.equals(value); else if ((FEATURES + "validation").equals(name)) validating = Boolean.TRUE.equals(value); else if ((FEATURES + "external-general-entities").equals(name)) externalEntities = Boolean.TRUE.equals(value); else if ((FEATURES + "external-parameter-entities").equals(name)) externalEntities = Boolean.TRUE.equals(value); else if ((PROPERTIES + "declaration-handler").equals(name)) declHandler = (DeclHandler) value; else if ((PROPERTIES + "lexical-handler").equals(name)) lexicalHandler = (LexicalHandler) value; else throw new SAXNotSupportedException(name); }
|
|
this.policyFile = new PolicyFile(ClassLoader .getSystemResource("/org/jnode/security/jnode.policy"));
|
this.policyFile = new PolicyFile();
|
public JNodePolicy(ExtensionPoint permissionsEp) { this.policyFile = new PolicyFile(ClassLoader .getSystemResource("/org/jnode/security/jnode.policy")); this.codeSource2Permissions = new HashMap<CodeSource, PermissionCollection>(); this.permissionsEp = permissionsEp; loadExtensions(); }
|
JDialog(Frame owner)
|
public JDialog()
|
JDialog(Frame owner) { this(owner, "dialog"); }
|
this(owner, "dialog");
|
this(SwingUtilities.getOwnerFrame(), "", false, null);
|
JDialog(Frame owner) { this(owner, "dialog"); }
|
{ super.addImpl(comp, constraints, index); }
|
{ if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components disallowed."); super.addImpl(comp, constraints, index); }
|
protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); }
|
JRootPane createRootPane() { return new JRootPane(); }
|
protected JRootPane createRootPane() { return new JRootPane(); }
|
JRootPane createRootPane() { return new JRootPane(); }
|
Container getContentPane() { return getRootPane().getContentPane(); }
|
public Container getContentPane() { return getRootPane().getContentPane(); }
|
Container getContentPane() { return getRootPane().getContentPane(); }
|
Component getGlassPane() { return getRootPane().getGlassPane(); }
|
public Component getGlassPane() { return getRootPane().getGlassPane(); }
|
Component getGlassPane() { return getRootPane().getGlassPane(); }
|
JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
|
public JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
|
JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); }
|
JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); }
|
public JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); }
|
JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); }
|
{ return checking; }
|
{ return rootPaneCheckingEnabled; }
|
protected boolean isRootPaneCheckingEnabled() { return checking; }
|
switch(close_action)
|
switch (getDefaultCloseOperation())
|
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
|
System.out.println("user requested dispose on close");
|
protected void processWindowEvent(WindowEvent e) { // System.out.println("PROCESS_WIN_EV-1: " + e); super.processWindowEvent(e); // System.out.println("PROCESS_WIN_EV-2: " + e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch(close_action) { case DISPOSE_ON_CLOSE: { System.out.println("user requested dispose on close"); dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
|
|
{ getContentPane().remove(comp); }
|
{ if (comp == rootPane) super.remove(rootPane); else getContentPane().remove(comp); }
|
public void remove(Component comp) { getContentPane().remove(comp); }
|
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
|
public void setContentPane(Container contentPane) { if (contentPane == null) throw new IllegalComponentStateException("contentPane cannot be null."); getRootPane().setContentPane(contentPane); }
|
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
|
void setDefaultCloseOperation(int operation) { close_action = operation; }
|
public void setDefaultCloseOperation(int operation) { if (operation == DO_NOTHING_ON_CLOSE || operation == HIDE_ON_CLOSE || operation == DISPOSE_ON_CLOSE) close_action = operation; else throw new IllegalArgumentException("Default close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); }
|
void setDefaultCloseOperation(int operation) { close_action = operation; }
|
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
|
public void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
|
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
|
void setJMenuBar(JMenuBar menubar) { getRootPane().setJMenuBar(menubar); }
|
public void setJMenuBar(JMenuBar menubar) { getRootPane().setJMenuBar(menubar); }
|
void setJMenuBar(JMenuBar menubar) { getRootPane().setJMenuBar(menubar); }
|
void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); }
|
public void setLayeredPane(JLayeredPane layeredPane) { if (layeredPane == null) throw new IllegalComponentStateException("layeredPane cannot be null."); getRootPane().setLayeredPane(layeredPane); }
|
void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); }
|
{ super.setLayout(manager); }
|
{ if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - cannot set layout."); super.setLayout(manager); }
|
public void setLayout(LayoutManager manager) { super.setLayout(manager); }
|
void setRootPane(JRootPane root)
|
protected void setRootPane(JRootPane root)
|
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
|
add(rootPane, BorderLayout.CENTER);
|
rootPane.show(); add(rootPane);
|
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
|
{ checking = enabled; }
|
{ rootPaneCheckingEnabled = enabled; }
|
protected void setRootPaneCheckingEnabled(boolean enabled) { checking = enabled; }
|
public WrongPolicy(String why)
|
public WrongPolicy()
|
public WrongPolicy(String why) { super(why); }
|
super(why);
|
public WrongPolicy(String why) { super(why); }
|
|
public ServantNotActive(String why)
|
public ServantNotActive()
|
public ServantNotActive(String why) { super(why); }
|
super(why);
|
public ServantNotActive(String why) { super(why); }
|
|
public IllegalPathStateException(String msg)
|
public IllegalPathStateException()
|
public IllegalPathStateException(String msg) { super(msg); }
|
super(msg);
|
public IllegalPathStateException(String msg) { super(msg); }
|
|
if (ti < bt.length) { byte[] tmp = new byte[ti]; System.arraycopy(bt, 0, tmp, 0, ti); bt = tmp; }
|
public static byte[] encode(byte[] bs) { int si = 0, ti = 0; // source/target array indices byte[] bt = new byte[((bs.length + 2) * 4) / 3]; // target byte array for (; si < bs.length; si += 3) { int buflen = bs.length - si; if (buflen == 1) { byte b = bs[si]; int i = 0; bt[ti++] = src[b >>> 2 & 0x3f]; bt[ti++] = src[(b << 4 & 0x30) + (i >>> 4 & 0xf)]; } else if (buflen == 2) { byte b1 = bs[si], b2 = bs[si + 1]; int i = 0; bt[ti++] = src[b1 >>> 2 & 0x3f]; bt[ti++] = src[(b1 << 4 & 0x30) + (b2 >>> 4 & 0xf)]; bt[ti++] = src[(b2 << 2 & 0x3c) + (i >>> 6 & 0x3)]; } else { byte b1 = bs[si], b2 = bs[si + 1], b3 = bs[si + 2]; bt[ti++] = src[b1 >>> 2 & 0x3f]; bt[ti++] = src[(b1 << 4 & 0x30) + (b2 >>> 4 & 0xf)]; bt[ti++] = src[(b2 << 2 & 0x3c) + (b3 >>> 6 & 0x3)]; bt[ti++] = src[b3 & 0x3f]; } } /*while (ti < bt.length) { bt[ti++] = 0x3d; }*/ return bt; }
|
|
public void update(byte[] input)
|
public void update(byte input)
|
public void update(byte[] input) { engineUpdate(input, 0, input.length); }
|
engineUpdate(input, 0, input.length);
|
engineUpdate(input);
|
public void update(byte[] input) { engineUpdate(input, 0, input.length); }
|
int codeClass, String message, Headers headers)
|
String message, Headers headers, InputStream body)
|
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
|
this.codeClass = codeClass;
|
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
|
|
this.body = body;
|
protected Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) { this.majorVersion = majorVersion; this.minorVersion = minorVersion; this.code = code; this.codeClass = codeClass; this.message = message; this.headers = headers; }
|
|
ULongLongSeqHolder h = new ULongLongSeqHolder(); h._read(input); return h.value;
|
long[] value = new long[ input.read_long() ]; input.read_ulonglong_array(value, 0, value.length); return value;
|
public static long[] read(InputStream input) { ULongLongSeqHolder h = new ULongLongSeqHolder(); h._read(input); return h.value; }
|
return new primitiveArrayTypeCode(TCKind.tk_long);
|
return new primitiveArrayTypeCode(TCKind.tk_ulong);
|
public static TypeCode type() { return new primitiveArrayTypeCode(TCKind.tk_long); }
|
ULongLongSeqHolder h = new ULongLongSeqHolder(value); h._write(output);
|
output.write_long(value.length); output.write_ulonglong_array(value, 0, value.length);
|
public static void write(OutputStream output, long[] value) { ULongLongSeqHolder h = new ULongLongSeqHolder(value); h._write(output); }
|
public CommandRunner(Class cx, Method method, Object[] args) {
|
public CommandRunner(Class cx, Method method, Object target, Object[] args) {
|
public CommandRunner(Class cx, Method method, Object[] args) { this.cx = cx; this.method = method; this.args = args; }
|
this.target = target;
|
public CommandRunner(Class cx, Method method, Object[] args) { this.cx = cx; this.method = method; this.args = args; }
|
|
Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args));
|
AccessController.doPrivileged( new InvokeAction(method, target, args));
|
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
|
err.println("Exception in command"); ex.printStackTrace(err); unblock();
|
err.println("Exception in command"); ex.printStackTrace(err); unblock(); } catch (Error ex) { err.println("Error in command"); ex.printStackTrace(err); unblock();
|
public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in // this // new // thread? try { Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); } catch (PrivilegedActionException ex) { throw ex.getException(); } if (!isBlocking()) { // somebody already hit ctrl-c. } else { finished = true; // System.err.println("Finished invocation, notifying // blockers."); // done with invoke, stop waiting for a ctrl-c unblock(); } } catch (InvocationTargetException ex) { Throwable tex = ex.getTargetException(); if (tex instanceof SyntaxErrorException) { try { Help.getInfo(cx).usage(); } catch (HelpException ex1) { // Don't care ex1.printStackTrace(); } err.println(tex.getMessage()); unblock(); } else if (tex instanceof VmExit) { err.println(tex.getMessage()); unblock(); } else { err.println("Exception in command"); tex.printStackTrace(err); unblock(); } } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); unblock(); } finished = true; }
|
InputStream inputStream = System.in; InputStream nextInputStream = null; PrintStream errStream = System.err; PrintStream outputStream = null;
|
StreamHolder streams = new StreamHolder(System.in, null, System.err);
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
Method method;
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
|
ByteArrayOutputStream byteArrayOutputStream = null;
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
|
try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() });
|
cr = buildExecuteRunner(cmdName, cmdLine, cmdInfo, streams, i != commands.length - 1); if (cr == null) { cr = buildMainRunner(cmdName, cmdLine, cmdInfo); } if (cr == null) { err.println("Class " + cmdInfo.getCommandClass().getName() + " has no suitable 'execute' or 'main' method"); break;
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
if (outputStream != null && outputStream != System.out) { outputStream.close();
|
if (streams.outputStream != null && streams.outputStream != System.out) { streams.outputStream.close();
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
} catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName);
|
} catch (NoGo ex) { err.println("Exception occurred while prepareing to run command"); ex.getCause().printStackTrace(err);
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
nextInputStream = null;
|
public void invoke(String cmdLineStr) { commandShell.addCommandToHistory(cmdLineStr); InputStream inputStream = System.in; // will also be dynamic later InputStream nextInputStream = null; PrintStream errStream = System.err; // will also be dynamic later PrintStream outputStream = null; CommandLine cmdLine; Method method; CommandRunner cr; CommandInfo cmdInfo; String[] commands = cmdLineStr.split("\\|"); String command; ByteArrayOutputStream byteArrayOutputStream = null; for (int i = 0; i < commands.length; i++) { command = commands[i].trim(); cmdLine = new CommandLine(command); if (!cmdLine.hasNext()) continue; cmdName = cmdLine.next(); try { cmdInfo = commandShell.getCommandClass(cmdName); try { method = cmdInfo.getCommandClass().getMethod( EXECUTE_METHOD, EXECUTE_ARG_TYPES); if (cmdLine.sendToOutFile()) { File file = new File(cmdLine.getOutFileName()); try { FileOutputStream fileOutputStream = new FileOutputStream( file); outputStream = new PrintStream(fileOutputStream); } catch (SecurityException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } else if (i + 1 < commands.length) { byteArrayOutputStream = new ByteArrayOutputStream(); outputStream = new PrintStream(byteArrayOutputStream); } else { outputStream = System.out; } if (byteArrayOutputStream != null) { nextInputStream = new ByteArrayInputStream( byteArrayOutputStream.toByteArray()); } if (nextInputStream != null) inputStream = nextInputStream; CommandLine commandLine = null; if (inputStream.available() > 0) { commandLine = new CommandLine(inputStream); } else { commandLine = cmdLine.getRemainder(); } commandLine.setOutFileName(cmdLine.getOutFileName()); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { commandLine, inputStream, outputStream, errStream }); } catch (NoSuchMethodException e) { method = cmdInfo.getCommandClass().getMethod(MAIN_METHOD, MAIN_ARG_TYPES); cr = new CommandRunner(cmdInfo.getCommandClass(), method, new Object[] { cmdLine.getRemainder() .toStringArray() }); } try { if (cmdInfo.isInternal()) { cr.run(); } else { threadProcess = new Thread(cr, cmdName); threadProcess.start(); this.blocking = true; this.blockingThread = Thread.currentThread(); while (blocking) { try { Thread.sleep(6000); } catch (InterruptedException interrupted) { if (!blocking) { // interruption was okay, break normally. } else { // abnormal interruption interrupted.printStackTrace(); } } } } if (outputStream != null && outputStream != System.out) { outputStream.close(); } // System.err.println("Finished invoke."); } catch (Exception ex) { err.println("Exception in command"); ex.printStackTrace(err); } catch (Error ex) { err.println("Fatal error in command"); ex.printStackTrace(err); } } catch (NoSuchMethodException ex) { err.println("Alias class has no main method " + cmdName); } catch (ClassNotFoundException ex) { err.println("Unknown alias class " + ex.getMessage()); } catch (ClassCastException ex) { err.println("Invalid command " + cmdName); } catch (Exception ex) { err.println("Unknown error: " + ex.getMessage()); ex.printStackTrace(err); } } nextInputStream = null; }
|
|
return Class.forName(cmd);
|
final ClassLoader cl = Thread.currentThread().getContextClassLoader(); return cl.loadClass(cmd);
|
protected Class getCommandClass(String cmd) throws ClassNotFoundException { try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { return Class.forName(cmd); } }
|
if (is_trying) return null; try { is_trying = true;
|
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
|
|
jf = new JarFile (f, true, ZipFile.OPEN_READ);
|
jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE);
|
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
|
} finally { is_trying = false; }
|
public static synchronized JarFile get (URL url) throws IOException { JarFile jf = (JarFile) cache.get (url); if (jf != null) return jf; if (is_trying) return null; try { is_trying = true; if ("file".equals (url.getProtocol())) { File f = new File (url.getFile()); jf = new JarFile (f, true, ZipFile.OPEN_READ); } else { URLConnection urlconn = url.openConnection(); InputStream is = urlconn.getInputStream(); byte[] buf = new byte [READBUFSIZE]; File f = File.createTempFile ("cache", "jar"); FileOutputStream fos = new FileOutputStream (f); int len = 0; while ((len = is.read (buf)) != -1) { fos.write (buf, 0, len); } fos.close(); // Always verify the Manifest, open read only and delete when done. // XXX ZipFile.OPEN_DELETE not yet implemented. // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); jf = new JarFile (f, true, ZipFile.OPEN_READ); } cache.put (url, jf); } finally { is_trying = false; } return jf; }
|
|
public static ComponentUI createUI(final JComponent c) { return new BasicTabbedPaneUI(); }
|
public static ComponentUI createUI(JComponent c) { return new BasicTabbedPaneUI(); }
|
public static ComponentUI createUI(final JComponent c) { return new BasicTabbedPaneUI(); }
|
public Dimension getPreferredSize(JComponent c) { JTabbedPane p = (JTabbedPane) c; Dimension d = new Dimension(50,50); for (int i=0;i<p.getTabCount();i++) { Component comp = p.getComponentAt(i); Dimension pr = comp.getPreferredSize(); d.width = Math.max(d.width, comp.getWidth()); d.height = Math.max(d.height, comp.getHeight()); } Insets i = p.getInsets(); d.width += i.left + i.right; d.height += i.top + i.bottom; int height_of_tabs = 25; d.height += height_of_tabs; return d; }
|
public Dimension getPreferredSize(JComponent c) { return layoutManager.preferredLayoutSize(tabPane); }
|
public Dimension getPreferredSize(JComponent c) { JTabbedPane p = (JTabbedPane) c; Dimension d = new Dimension(50,50); for (int i=0;i<p.getTabCount();i++) { Component comp = p.getComponentAt(i); Dimension pr = comp.getPreferredSize(); d.width = Math.max(d.width, comp.getWidth()); d.height = Math.max(d.height, comp.getHeight()); } Insets i = p.getInsets(); d.width += i.left + i.right; d.height += i.top + i.bottom; int height_of_tabs = 25; d.height += height_of_tabs; // FIXME: should be max of panes in p return d; }
|
public Rectangle getTabBounds(JTabbedPane pane, int index) { return null; }
|
public Rectangle getTabBounds(JTabbedPane pane, int i) { return rects[i]; }
|
public Rectangle getTabBounds(JTabbedPane pane, int index) { return null; }
|
{ return 0; }
|
{ return runCount; }
|
public int getTabRunCount(JTabbedPane pane) { return 0; }
|
public void installUI(final JComponent c) { super.installUI(c); }
|
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JTabbedPane) { tabPane = (JTabbedPane) c; installComponents(); installDefaults(); installListeners(); installKeyboardActions(); layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); tabPane.layout(); } }
|
public void installUI(final JComponent c) { super.installUI(c); }
|
{ return 0; }
|
{ Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first = 0; int last = lastTabInRun(tabCount, currRun); for (int j = first; j <= last; j++) { if (getTabBounds(pane, j).contains(p)) return j; } currRun = getNextTabRun(currRun); } return -1; }
|
public int tabForCoordinate(JTabbedPane pane, int x, int y) { return 0; }
|
getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER);
|
if (menuBar != null) jlPane.add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER);
|
public void setJMenuBar(JMenuBar m) { menuBar = m; getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); }
|
{ }
|
{ layers = new TreeMap (); componentToLayer = new Hashtable (); }
|
JLayeredPane() { }
|
public boolean isPressed() { return pressed; }
|
public boolean isPressed() { return (stateMask & PRESSED) == PRESSED; }
|
public boolean isPressed() { return pressed; }
|
public void fireActionPerformed(ActionEvent event) { for (int i = 0; i < actions.size(); i++) { ActionListener a = (ActionListener) actions.get(i); a.actionPerformed(event); } }
|
public void fireActionPerformed(ActionEvent e) { EventListener[] ll = listenerList.getListeners(ActionListener.class); for (int i = 0; i < ll.length; i++) ((ActionListener)ll[i]).actionPerformed(e); }
|
public void fireActionPerformed(ActionEvent event) { for (int i = 0; i < actions.size(); i++) { ActionListener a = (ActionListener) actions.get(i); a.actionPerformed(event); } }
|
s.setOpaque(true);
|
protected void installDefaults(JSeparator s) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); shadow = defaults.getColor("Separator.shadow"); highlight = defaults.getColor("Separator.highlight"); }
|
|
public Iterator<FSEntry> iterator()
|
public Iterator<? extends FSEntry> iterator()
|
public Iterator<FSEntry> iterator() throws IOException;
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); header.setBackground(defaults.getColor("TableHeader.background")); header.setForeground(defaults.getColor("TableHeader.foreground")); header.setFont(defaults.getFont("TableHeader.font")); cellBorder = defaults.getBorder("TableHeader.cellBorder");
|
LookAndFeel.installColorsAndFont(header, "TableHeader.background", "TableHeader.foreground", "TableHeader.font"); cellBorder = UIManager.getBorder("TableHeader.cellBorder");
|
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); header.setBackground(defaults.getColor("TableHeader.background")); header.setForeground(defaults.getColor("TableHeader.foreground")); header.setFont(defaults.getFont("TableHeader.font")); cellBorder = defaults.getBorder("TableHeader.cellBorder"); }
|
gfx.setClip(oldClip);
|
public void paint(Graphics gfx, JComponent c) { TableColumnModel cmod = header.getColumnModel(); int ncols = cmod.getColumnCount(); if (ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableCellRenderer defaultRend = header.getDefaultRenderer(); for (int i = 0; i < ncols; ++i) { Rectangle bounds = header.getHeaderRect(i); if (bounds.intersects(clip)) { TableColumn col = cmod.getColumn(i); TableCellRenderer rend = col.getHeaderRenderer(); if (rend == null) rend = defaultRend; Object val = col.getHeaderValue(); Component comp = rend.getTableCellRendererComponent(header.getTable(), val, false, // isSelected false, // isFocused -1, i); comp.setFont(header.getFont()); comp.setBackground(header.getBackground()); comp.setForeground(header.getForeground()); if (comp instanceof JComponent) ((JComponent)comp).setBorder(cellBorder); gfx.translate(bounds.x, bounds.y); comp.setSize(bounds.width, bounds.height); comp.setLocation(0,0); comp.paint(gfx); gfx.translate(-bounds.x, -bounds.y); } } }
|
|
"TextPane.selectionForeground", new ColorUIResource(Color.white)/*,
|
"TextPane.selectionForeground", new ColorUIResource(Color.white),
|
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white)/*, "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/ }; defaults.putDefaults(uiDefaults); }
|
"Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/
|
"Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)
|
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(light), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(shadow), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(darkShadow), "Button.highlight", new ColorUIResource(highLight), "Button.light", new ColorUIResource(highLight), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(shadow), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(light), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(0, 92, 92), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(shadow), "InternalFrame.borderHighlight", new ColorUIResource(highLight), "InternalFrame.borderLight", new ColorUIResource(light), "InternalFrame.borderShadow", new ColorUIResource(shadow), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white)/*, "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray),// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7),// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.white), "Tree.textBackground", new ColorUIResource(Color.white), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)*/ }; defaults.putDefaults(uiDefaults); }
|
bundles = new LinkedList (); listeners = new HashSet (); defaultLocale = Locale.getDefault ();
|
public UIDefaults() { }
|
|
return new DummyIcon();
|
return getCheckBoxIcon();
|
public static Icon getCheckBoxMenuItemIcon() { return new DummyIcon(); }
|
return new DummyIcon();
|
return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.BLACK); g.fillPolygon(new Polygon(new int[] { 3, 9, 3 }, new int[] { 2, 6, 10 }, 3)); g.setColor(saved); g.translate(-x, -y); } };
|
public static Icon getMenuArrowIcon() { return new DummyIcon(); }
|
return new DummyIcon();
|
return getRadioButtonIcon();
|
public static Icon getRadioButtonMenuItemIcon() { return new DummyIcon(); }
|
modifiers = EventModifier.extend(modifiers);
|
modifiersEx = EventModifier.extend(modifiers) & EventModifier.NEW_MASK;
|
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); modifiers = EventModifier.extend(modifiers); }
|
{ get_listeners().addElement(listener); }
|
{ listenerList.add (ListSelectionListener.class, listener); }
|
public void addListSelectionListener(ListSelectionListener listener) { get_listeners().addElement(listener); }
|
{ get_listeners().removeElement(listener); }
|
{ listenerList.remove (ListSelectionListener.class, listener); }
|
public void removeListSelectionListener(ListSelectionListener listener) { get_listeners().removeElement(listener); }
|
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
|
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
|
public Entity declareEntity(String name, String publicId, String systemId, String notation) { DomEntity entity; if (name.charAt(0) == '%' || "[dtd]".equals(name)) { return null; } if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } getEntities(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); if (entities.getNamedItem(name) != null) { return null; } entity = new DomEntity(owner, name, publicId, systemId, notation); entities.setNamedItem(entity); return entity; }
|
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
|
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
|
public Notation declareNotation(String name, String publicId, String systemId) { DomNotation notation; if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } getNotations(); DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); notation = new DomNotation(owner, name, publicId, systemId); notations.setNamedItem(notation); return notation; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.