bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public boolean getFeature (String featureId) throws SAXNotRecognizedException, SAXNotSupportedException { if ((FEATURE + "validation").equals (featureId)) return false; // external entities (both types) are optionally included if ((FEATURE + "external-general-entities").equals (featureId)) return extGE; if ((FEATURE + "external-parameter-entities") .equals (featureId)) return extPE; // element/attribute names are as written in document; no mangling if ((FEATURE + "namespace-prefixes").equals (featureId)) return xmlNames; // report element/attribute namespaces? if ((FEATURE + "namespaces").equals (featureId)) return namespaces; // all PEs and GEs are reported if ((FEATURE + "lexical-handler/parameter-entities").equals (featureId)) return true; // default is true if ((FEATURE + "string-interning").equals (featureId)) return stringInterning; // EXTENSIONS 1.1 // always returns isSpecified info if ((FEATURE + "use-attributes2").equals (featureId)) return true; // meaningful between startDocument/endDocument if ((FEATURE + "is-standalone").equals (featureId)) { if (parser == null) throw new SAXNotSupportedException (featureId); return parser.isStandalone (); } // optionally don't absolutize URIs in declarations if ((FEATURE + "resolve-dtd-uris").equals (featureId)) return resolveAll; // optionally use resolver2 interface methods, if possible if ((FEATURE + "use-entity-resolver2").equals (featureId)) return useResolver2; throw new SAXNotRecognizedException (featureId); }
|
public boolean getFeature (String featureId) throws SAXNotRecognizedException, SAXNotSupportedException { if ((FEATURE + "validation").equals (featureId)) return false; // external entities (both types) are optionally included if ((FEATURE + "external-general-entities").equals (featureId)) return extGE; if ((FEATURE + "external-parameter-entities") .equals (featureId)) return extPE; // element/attribute names are as written in document; no mangling if ((FEATURE + "namespace-prefixes").equals (featureId)) return xmlNames; // report element/attribute namespaces? if ((FEATURE + "namespaces").equals (featureId)) return namespaces; // all PEs and GEs are reported if ((FEATURE + "lexical-handler/parameter-entities").equals (featureId)) return true; // default is true if ((FEATURE + "string-interning").equals (featureId)) return stringInterning; // EXTENSIONS 1.1 // always returns isSpecified info if ((FEATURE + "use-attributes2").equals (featureId)) return true; // meaningful between startDocument/endDocument if ((FEATURE + "is-standalone").equals (featureId)) { if (parser == null) throw new SAXNotSupportedException (featureId); return parser.isStandalone (); } // optionally don't absolutize URIs in declarations if ((FEATURE + "resolve-dtd-uris").equals (featureId)) return resolveAll; // optionally use resolver2 interface methods, if possible if ((FEATURE + "use-entity-resolver2").equals(featureId)) { return useResolver2; throw new SAXNotRecognizedException (featureId); }
| 10,589
|
public int getIndex (String uri, String local) { int length = getLength (); for (int i = 0; i < length; i++) { if (!getURI (i).equals (uri)) continue; if (getLocalName (i).equals (local)) return i; } return -1; }
|
public int getIndex (String uri, String local) { int length = getLength (); for (int i = 0; i < length; i++) { if (!getURI (i).equals (uri)) continue; if (getLocalName (i).equals (local)) return i; } return -1; }
| 10,590
|
public int getIndex (String uri, String local) { int length = getLength (); for (int i = 0; i < length; i++) { if (!getURI (i).equals (uri)) continue; if (getLocalName (i).equals (local)) return i; } return -1; }
|
public int getIndex (String uri, String local) { int length = getLength (); for (int i = 0; i < length; i++) { if (!getURI (i).equals (uri)) continue; } if (getLocalName(i).equals(local)) { return i; } return -1; }
| 10,591
|
public String getLocalName (int index) { Attribute attr = (Attribute) attributesList.get (index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return attr.localName; }
|
public String getLocalName(int index) { if (index < 0 || index >= attributesList.size()) { Attribute attr = (Attribute) attributesList.get (index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return attr.localName; }
| 10,593
|
public String getLocalName (int index) { Attribute attr = (Attribute) attributesList.get (index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return attr.localName; }
|
public String getLocalName (int index) { return null; } Attribute attr = (Attribute) attributesList.get(index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return attr.localName; }
| 10,594
|
public String getLocalName (int index) { Attribute attr = (Attribute) attributesList.get (index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return attr.localName; }
|
public String getLocalName (int index) { Attribute attr = (Attribute) attributesList.get (index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return (attr.localName == null) ? "" : attr.localName; }
| 10,595
|
public String getName (int i) { return ((Attribute) attributesList.get (i)).name; }
|
public String getName(int index) { return ((Attribute) attributesList.get (i)).name; }
| 10,596
|
public String getName (int i) { return ((Attribute) attributesList.get (i)).name; }
|
public String getName (int i) { return getQName(index); }
| 10,597
|
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; // unknown properties throw new SAXNotRecognizedException (propertyId); }
|
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; // unknown properties throw new SAXNotRecognizedException (propertyId); }
| 10,598
|
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; // unknown properties throw new SAXNotRecognizedException (propertyId); }
|
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; // unknown properties throw new SAXNotRecognizedException (propertyId); }
| 10,599
|
public String getQName (int i) { return ((Attribute) attributesList.get (i)).name; }
|
public String getQName(int index) { if (index < 0 || index >= attributesList.size()) { return ((Attribute) attributesList.get (i)).name; }
| 10,600
|
public String getQName (int i) { return ((Attribute) attributesList.get (i)).name; }
|
public String getQName (int i) { return null; } Attribute attr = (Attribute) attributesList.get(index); return (attr.name == null) ? "" : attr.name; }
| 10,601
|
public String getSystemId () { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); }
|
public String getSystemId() { if (entityStack.empty()) { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); }
| 10,602
|
public String getSystemId () { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); }
|
public String getSystemId () { return null; else return (String) entityStack.peek (); }
| 10,603
|
public String getSystemId () { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); }
|
public String getSystemId () { if (entityStack.empty ()) return null; else { return (String) entityStack.peek(); } }
| 10,604
|
public String getType (int i) { String type = parser.getAttributeType (elementName, getQName (i)); if (type == null) return "CDATA"; // ... use DeclHandler.attributeDecl to see enumerations if (type == "ENUMERATION") return "NMTOKEN"; return type; }
|
public String getType(int index) { String type = parser.getAttributeType (elementName, getQName (i)); if (type == null) return "CDATA"; // ... use DeclHandler.attributeDecl to see enumerations if (type == "ENUMERATION") return "NMTOKEN"; return type; }
| 10,605
|
public String getType (int i) { String type = parser.getAttributeType (elementName, getQName (i)); if (type == null) return "CDATA"; // ... use DeclHandler.attributeDecl to see enumerations if (type == "ENUMERATION") return "NMTOKEN"; return type; }
|
public String getType (int i) { if (index < 0 || index >= attributesList.size()) { return null; } String type = parser.getAttributeType(elementName, getQName(index)); if (type == null) return "CDATA"; // ... use DeclHandler.attributeDecl to see enumerations if (type == "ENUMERATION") return "NMTOKEN"; return type; }
| 10,606
|
public String getURI (int index) { return ((Attribute) attributesList.get (index)).nameSpace; }
|
public String getURI(int index) { if (index < 0 || index >= attributesList.size()) { return ((Attribute) attributesList.get (index)).nameSpace; }
| 10,608
|
public String getURI (int index) { return ((Attribute) attributesList.get (index)).nameSpace; }
|
public String getURI (int index) { return null; } return ((Attribute) attributesList.get(index)).nameSpace; }
| 10,609
|
public String getValue (int i) { return ((Attribute) attributesList.get (i)).value; }
|
public String getValue(int index) { if (index < 0 || index >= attributesList.size()) { return ((Attribute) attributesList.get (i)).value; }
| 10,610
|
public String getValue (int i) { return ((Attribute) attributesList.get (i)).value; }
|
public String getValue (int i) { return null; } return ((Attribute) attributesList.get(index)).value; }
| 10,611
|
void ignorableWhitespace (char ch[], int start, int length) throws SAXException { contentHandler.ignorableWhitespace (ch, start, length); }
|
void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { contentHandler.ignorableWhitespace (ch, start, length); }
| 10,612
|
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
|
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) { throw new ArrayIndexOutOfBoundsException(); } String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
| 10,613
|
void notationDecl (String name, String ids []) throws SAXException { try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
|
void notationDecl(String name, String publicId, String systemId, String baseUri) throws SAXException { try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
| 10,614
|
void notationDecl (String name, String ids []) throws SAXException { try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
|
void notationDecl (String name, String ids []) throws SAXException { try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
| 10,615
|
public void parse (InputSource source) throws SAXException, IOException { synchronized (base) { parser = new XmlParser (); if (namespaces) prefixStack = new NamespaceSupport (); else if (!xmlNames) throw new IllegalStateException (); parser.setHandler (this); try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream(); parser.doParse (source.getSystemId (), source.getPublicId (), r, in, source.getEncoding ()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException (e.getMessage (), this, e); } finally { contentHandler.endDocument (); reset(); } } }
|
public void parse (InputSource source) throws SAXException, IOException { synchronized (base) { parser = new XmlParser (); if (namespaces) { prefixStack = new NamespaceSupport(); } else if (!xmlNames) throw new IllegalStateException (); parser.setHandler (this); try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream(); parser.doParse (source.getSystemId (), source.getPublicId (), r, in, source.getEncoding ()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException (e.getMessage (), this, e); } finally { contentHandler.endDocument (); reset(); } } }
| 10,616
|
public void parse (InputSource source) throws SAXException, IOException { synchronized (base) { parser = new XmlParser (); if (namespaces) prefixStack = new NamespaceSupport (); else if (!xmlNames) throw new IllegalStateException (); parser.setHandler (this); try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream(); parser.doParse (source.getSystemId (), source.getPublicId (), r, in, source.getEncoding ()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException (e.getMessage (), this, e); } finally { contentHandler.endDocument (); reset(); } } }
|
public void parse (InputSource source) throws SAXException, IOException { synchronized (base) { parser = new XmlParser (); if (namespaces) prefixStack = new NamespaceSupport (); else if (!xmlNames) throw new IllegalStateException (); parser.setHandler (this); try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream(); parser.doParse (source.getSystemId (), source.getPublicId (), r, in, source.getEncoding ()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException (e.getMessage (), this, e); } finally { contentHandler.endDocument (); reset(); } } }
| 10,617
|
InputSource resolveEntity (boolean isPE, String name, InputSource in, String baseURI) throws SAXException, IOException { InputSource source; // external entities might be skipped if (isPE && !extPE) return null; if (!isPE && !extGE) return null; // ... or not lexicalHandler.startEntity (name); if (resolver2 != null && useResolver2) { source = resolver2.resolveEntity (name, in.getPublicId (), baseURI, in.getSystemId ()); if (source == null) { in.setSystemId (absolutize (baseURI, in.getSystemId (), false)); source = in; } } else { in.setSystemId (absolutize (baseURI, in.getSystemId (), false)); source = entityResolver.resolveEntity (in.getPublicId (), in.getSystemId ()); if (source == null) source = in; } startExternalEntity (name, source.getSystemId (), true); return source; }
|
InputSource resolveEntity (boolean isPE, String name, InputSource in, String baseURI) throws SAXException, IOException { InputSource source; // external entities might be skipped if (isPE && !extPE) return null; if (!isPE && !extGE) return null; // ... or not lexicalHandler.startEntity (name); if (resolver2 != null && useResolver2) { source = resolver2.resolveEntity (name, in.getPublicId (), baseURI, in.getSystemId ()); if (source == null) { in.setSystemId (absolutize (baseURI, in.getSystemId (), false)); source = in; } } else { in.setSystemId (absolutize (baseURI, in.getSystemId (), false)); source = entityResolver.resolveEntity (in.getPublicId (), in.getSystemId ()); if (source == null) source = in; } } startExternalEntity(name, source.getSystemId(), true); return source; }
| 10,618
|
public void setFeature (String featureId, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { boolean state; // Features with a defined value, we just change it if we can. state = getFeature (featureId); if (state == value) return; if (parser != null) throw new SAXNotSupportedException ("not while parsing"); if ((FEATURE + "namespace-prefixes").equals (featureId)) { // in this implementation, this only affects xmlns reporting xmlNames = value; // forcibly prevent illegal parser state if (!xmlNames) namespaces = true; return; } if ((FEATURE + "namespaces").equals (featureId)) { namespaces = value; // forcibly prevent illegal parser state if (!namespaces) xmlNames = true; return; } if ((FEATURE + "external-general-entities").equals (featureId)) { extGE = value; return; } if ((FEATURE + "external-parameter-entities") .equals (featureId)) { extPE = value; return; } if ((FEATURE + "resolve-dtd-uris").equals (featureId)) { resolveAll = value; return; } if ((FEATURE + "use-entity-resolver2").equals (featureId)) { useResolver2 = value; return; } throw new SAXNotRecognizedException (featureId); }
|
public void setFeature (String featureId, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { boolean state; // Features with a defined value, we just change it if we can. state = getFeature (featureId); if (state == value) return; if (parser != null) { throw new SAXNotSupportedException("not while parsing"); } if ((FEATURE + "namespace-prefixes").equals (featureId)) { // in this implementation, this only affects xmlns reporting xmlNames = value; // forcibly prevent illegal parser state if (!xmlNames) namespaces = true; return; } if ((FEATURE + "namespaces").equals (featureId)) { namespaces = value; // forcibly prevent illegal parser state if (!namespaces) xmlNames = true; return; } if ((FEATURE + "external-general-entities").equals (featureId)) { extGE = value; return; } if ((FEATURE + "external-parameter-entities") .equals (featureId)) { extPE = value; return; } if ((FEATURE + "resolve-dtd-uris").equals (featureId)) { resolveAll = value; return; } if ((FEATURE + "use-entity-resolver2").equals (featureId)) { useResolver2 = value; return; } throw new SAXNotRecognizedException (featureId); }
| 10,623
|
public void setLocale (Locale locale) throws SAXException { if ("en".equals (locale.getLanguage ())) return ; throw new SAXException ("AElfred2 only supports English locales."); }
|
public void setLocale (Locale locale) throws SAXException { if ("en".equals (locale.getLanguage ())) return ; throw new SAXException ("AElfred2 only supports English locales."); }
| 10,624
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; return ; } throw new SAXNotSupportedException (propertyId); }
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; return ; } throw new SAXNotSupportedException (propertyId); }
| 10,625
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; return ; } throw new SAXNotSupportedException (propertyId); }
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; return ; } throw new SAXNotSupportedException (propertyId); }
| 10,626
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; return ; } throw new SAXNotSupportedException (propertyId); }
|
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; } if ((PROPERTY + "lexical-handler").equals (propertyId)) { if (value == null) lexicalHandler = base; else if (! (value instanceof LexicalHandler)) throw new SAXNotSupportedException (propertyId); else lexicalHandler = (LexicalHandler) value; } throw new SAXNotSupportedException (propertyId); }
| 10,627
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,628
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (stringInterning) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,629
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,630
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) { fatal("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,631
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); } index = qname.indexOf(':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,632
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith("xmlns")) { continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,633
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,634
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
|
void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } }
| 10,635
|
void startExternalEntity (String name, String systemId, boolean stackOnly) throws SAXException { // The following warning was deleted because the application has the // option of not setting systemId. Sun's JAXP or Xerces seems to // ignore this case. /* if (systemId == null) warn ("URI was not reported to parser for entity " + name); */ if (!stackOnly) // spliced [dtd] needs startEntity lexicalHandler.startEntity (name); entityStack.push (systemId); }
|
void startExternalEntity (String name, String systemId, boolean stackOnly) throws SAXException { // The following warning was deleted because the application has the // option of not setting systemId. Sun's JAXP or Xerces seems to // ignore this case. /* if (systemId == null) warn ("URI was not reported to parser for entity " + name); */ if (!stackOnly) // spliced [dtd] needs startEntity lexicalHandler.startEntity (name); entityStack.push (systemId); }
| 10,636
|
void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
|
void unparsedEntityDecl(String name, String publicId, String systemId, String baseUri, String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
| 10,637
|
void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
|
void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
| 10,638
|
void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
|
void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, e); } }
| 10,639
|
public JSlider(int orientation, int minimum, int maximum, int value) { // TODO } // JSlider()
|
public JSlider() { // TODO } // JSlider()
| 10,640
|
public Identity(String name) { this.name = name; this.scope = null; }
|
protected Identity() { this.name = name; this.scope = null; }
| 10,641
|
public Identity(String name) { this.name = name; this.scope = null; }
|
public Identity(String name) { this.name = name; this.scope = null; }
| 10,642
|
private Pattern (String regex, int flags) throws PatternSyntaxException { this.regex = regex; this.flags = flags; int gnuFlags = 0; if ((flags & CASE_INSENSITIVE) != 0) gnuFlags |= RE.REG_ICASE; if ((flags & MULTILINE) != 0) gnuFlags |= RE.REG_MULTILINE; if ((flags & DOTALL) != 0) gnuFlags |= RE.REG_DOT_NEWLINE; // not yet supported: // if ((flags & UNICODE_CASE) != 0) gnuFlags = // if ((flags & CANON_EQ) != 0) gnuFlags = // Eventually there will be such a thing as JDK 1_4 syntax RESyntax syntax = RESyntax.RE_SYNTAX_PERL5; if ((flags & UNIX_LINES) != 0) { // Use a syntax set with \n for linefeeds? syntax = new RESyntax(syntax); syntax.setLineSeparator("\n"); } if ((flags & COMMENTS) != 0) { // Use a syntax with support for comments? } try { this.re = new RE(regex, gnuFlags, syntax); } catch (REException e) { throw new PatternSyntaxException(e.getMessage(), regex, e.getPosition()); } }
|
private Pattern (String regex, int flags) throws PatternSyntaxException { this.regex = regex; this.flags = flags; int gnuFlags = 0; if ((flags & CASE_INSENSITIVE) != 0) gnuFlags |= RE.REG_ICASE; if ((flags & MULTILINE) != 0) gnuFlags |= RE.REG_MULTILINE; if ((flags & DOTALL) != 0) gnuFlags |= RE.REG_DOT_NEWLINE; // not yet supported: // if ((flags & UNICODE_CASE) != 0) gnuFlags = // if ((flags & CANON_EQ) != 0) gnuFlags = // Eventually there will be such a thing as JDK 1_4 syntax RESyntax syntax = RESyntax.RE_SYNTAX_JAVA_1_4; if ((flags & UNIX_LINES) != 0) { // Use a syntax set with \n for linefeeds? syntax = new RESyntax(syntax); syntax.setLineSeparator("\n"); } if ((flags & COMMENTS) != 0) { // Use a syntax with support for comments? } try { this.re = new RE(regex, gnuFlags, syntax); } catch (REException e) { throw new PatternSyntaxException(e.getMessage(), regex, e.getPosition()); } }
| 10,643
|
public void connect() throws IOException { try { final PluginManager pluginMgr = (PluginManager) InitialNaming.lookup(PluginManager.NAME); final PluginDescriptor descr = pluginMgr.getRegistry().getPluginDescriptor(pluginId); if (descr == null) { throw new IOException("Plugin " + pluginId + " not found"); } this.jarFile = ((PluginDescriptorModel) descr).getJarFile(); if (this.jarFile == null) { throw new IOException("Plugin jarfile not found"); } } catch (NameNotFoundException ex) { throw new IOException("Cannot find plugin manager", ex); } }
|
public void connect() throws IOException { try { final PluginManager pluginMgr = (PluginManager) InitialNaming.lookup(PluginManager.NAME); final PluginDescriptor descr = pluginMgr.getRegistry().getPluginDescriptor(pluginId); if (descr == null) { throw new IOException("Plugin " + pluginId + " not found"); } this.jarFile = ((PluginDescriptorModel) descr).getJarFile(); if (this.jarFile == null) { throw new IOException("Plugin jarfile not found"); } } catch (NameNotFoundException ex) { final IOException ioe = new IOException("Cannot find plugin manager"); ioe.initCause(ex); throw ioe; } }
| 10,644
|
public MalformedURLException(String message) { super(message); }
|
public MalformedURLException() { super(message); }
| 10,645
|
public MalformedURLException(String message) { super(message); }
|
public MalformedURLException(String message) { }
| 10,646
|
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; if (b.isContentAreaFilled() && UIManager.get(getPropertyPrefix() + "gradient") != null && !b.getModel().isPressed() && b.isEnabled()) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
|
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; if (b.isContentAreaFilled() && UIManager.get(getPropertyPrefix() + "gradient") != null && ! b.getModel().isPressed() && ! b.getModel().isArmed() && b.isEnabled()) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
| 10,647
|
protected void installDefaults(AbstractButton b) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); focusColor = defaults.getColor("Button.focus"); b.setForeground(defaults.getColor("Button.foreground")); b.setBackground(defaults.getColor("Button.background")); b.setMargin(defaults.getInsets("Button.margin")); b.setBorder(defaults.getBorder("Button.border")); b.setIconTextGap(defaults.getInt("Button.textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get("Button.focusInputMap")); b.setOpaque(true); }
|
protected void installDefaults(AbstractButton b) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); focusColor = defaults.getColor("Button.focus"); b.setForeground(defaults.getColor("Button.foreground")); b.setBackground(defaults.getColor("Button.background")); b.setMargin(defaults.getInsets("Button.margin")); b.setBorder(defaults.getBorder("Button.border")); b.setIconTextGap(defaults.getInt("Button.textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get("Button.focusInputMap")); b.setOpaque(true); }
| 10,648
|
protected void installDefaults(AbstractButton b) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); focusColor = defaults.getColor("Button.focus"); b.setForeground(defaults.getColor("Button.foreground")); b.setBackground(defaults.getColor("Button.background")); b.setMargin(defaults.getInsets("Button.margin")); b.setBorder(defaults.getBorder("Button.border")); b.setIconTextGap(defaults.getInt("Button.textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get("Button.focusInputMap")); b.setOpaque(true); }
|
protected void installDefaults(AbstractButton b) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); focusColor = defaults.getColor("Button.focus"); b.setForeground(defaults.getColor("Button.foreground")); b.setBackground(defaults.getColor("Button.background")); b.setMargin(defaults.getInsets("Button.margin")); b.setBorder(defaults.getBorder("Button.border")); b.setIconTextGap(defaults.getInt("Button.textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get(prefix + ".focusInputMap")); b.setOpaque(true); }
| 10,649
|
public abstract boolean equals(Object perm);
|
boolean equals (Object perm);
| 10,650
|
public String toString();
|
String toString();
| 10,651
|
public static Policy getPolicy() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new SecurityPermission("getPolicy")); return currentPolicy; }
|
public static Policy getPolicy() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new SecurityPermission("getPolicy")); return getCurrentPolicy(); }
| 10,652
|
public BevelBorder(int top, int left, int bottom, int right, Color color) { super(top, left, bottom, right); this.c = color; }
|
public BevelBorder(int top, int left, int bottom, int right, Color color) { super(top, left, bottom, right); this.c = color; }
| 10,654
|
public boolean isBorderOpaque() { return false; }
|
public boolean isBorderOpaque() { return false; }
| 10,655
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { }
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { }
| 10,656
|
public DefaultTreeCellRenderer() { setLeafIcon(getDefaultLeafIcon()); setOpenIcon(getDefaultOpenIcon()); setClosedIcon(getDefaultClosedIcon()); setTextNonSelectionColor(UIManager.getColor("Tree.textForeground")); setTextSelectionColor(UIManager.getColor("Tree.selectionForeground")); setBackgroundNonSelectionColor(UIManager.getColor("Tree.nonSelectionBackground")); setBackgroundSelectionColor(UIManager.getColor("Tree.selectionBackground")); setBorderSelectionColor(UIManager.getColor("Tree.selectionBorderColor")); }
|
public DefaultTreeCellRenderer() { setLeafIcon(getDefaultLeafIcon()); setOpenIcon(getDefaultOpenIcon()); setClosedIcon(getDefaultClosedIcon()); setTextNonSelectionColor(UIManager.getColor("Tree.textForeground")); setTextSelectionColor(UIManager.getColor("Tree.selectionForeground")); setBackgroundNonSelectionColor(UIManager.getColor("Tree.textBackground")); setBackgroundSelectionColor(UIManager.getColor("Tree.selectionBackground")); setBorderSelectionColor(UIManager.getColor("Tree.selectionBorderColor")); }
| 10,658
|
protected void firePropertyChange(String value0, Object value1, Object value2) { // Overridden for performance reasons. } // firePropertyChange()
|
protected void firePropertyChange(String name, Object oldValue, Object newValue) { // Overridden for performance reasons. } // firePropertyChange()
| 10,659
|
public Dimension getPreferredSize() { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel(((JLabel) this), fm, getText(), getIcon(), getVerticalAlignment(), getHorizontalAlignment(), getVerticalTextPosition(), getHorizontalTextPosition(), vr, ir, tr, getIconTextGap()); Rectangle cr = ir.union(tr); return new Dimension(cr.width, cr.height); } // getPreferredSize()
|
public Dimension getPreferredSize() { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel((JLabel) this, fm, getText(), getIcon(), getVerticalAlignment(), getHorizontalAlignment(), getVerticalTextPosition(), getHorizontalTextPosition(), vr, ir, tr, getIconTextGap()); Rectangle cr = ir.union(tr); return new Dimension(cr.width, cr.height); } // getPreferredSize()
| 10,660
|
public void paint(Graphics g) { // paint background Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = new Insets(0, 0, 0, 0); Border border = UIManager.getBorder("Tree.selectionBorder"); if (border != null) insets = border.getBorderInsets(this); FontMetrics fm = getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel(((JLabel) this), fm, getText(), getIcon(), getVerticalAlignment(), getHorizontalAlignment(), getVerticalTextPosition(), getHorizontalTextPosition(), vr, ir, tr, getIconTextGap()); // Reusing one rectangle. Rectangle bounds = getBounds(ir); bounds.x = tr.x - insets.left; bounds.width = tr.width + insets.left+insets.right; g.setColor(super.getBackground()); g.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); super.paint(g); // Paint the border of the focused element only (lead selection) if (hasFocus) { Color b = getBorderSelectionColor(); if (b != null) { g.setColor(b); g.drawRect(bounds.x, bounds.y, bounds.width, bounds.height - 1); } } }
|
public void paint(Graphics g) { // paint background Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = new Insets(0, 0, 0, 0); Border border = UIManager.getBorder("Tree.selectionBorder"); if (border != null) insets = border.getBorderInsets(this); FontMetrics fm = getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel((JLabel) this, fm, getText(), getIcon(), getVerticalAlignment(), getHorizontalAlignment(), getVerticalTextPosition(), getHorizontalTextPosition(), vr, ir, tr, getIconTextGap()); // Reusing one rectangle. Rectangle bounds = getBounds(ir); bounds.x = tr.x - insets.left; bounds.width = tr.width + insets.left+insets.right; g.setColor(super.getBackground()); g.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); super.paint(g); // Paint the border of the focused element only (lead selection) if (hasFocus) { Color b = getBorderSelectionColor(); if (b != null) { g.setColor(b); g.drawRect(bounds.x, bounds.y, bounds.width, bounds.height - 1); } } }
| 10,661
|
public void repaint(long value0, int value1, int value2, int value3, int value4) { // Overridden for performance reasons. } // repaint()
|
public void repaint(long value0, int value1, int value2, int value3, int value4) { // Overridden for performance reasons. } // repaint()
| 10,662
|
public void setClosedIcon(Icon i) { closedIcon = i; }
|
public void setClosedIcon(Icon icon) { closedIcon = i; }
| 10,663
|
public void setClosedIcon(Icon i) { closedIcon = i; }
|
public void setClosedIcon(Icon i) { closedIcon = icon; }
| 10,664
|
public void setLeafIcon(Icon i) { leafIcon = i; }
|
public void setLeafIcon(Icon icon) { leafIcon = i; }
| 10,665
|
public void setLeafIcon(Icon i) { leafIcon = i; }
|
public void setLeafIcon(Icon i) { leafIcon = icon; }
| 10,666
|
public void setOpenIcon(Icon i) { openIcon = i; }
|
public void setOpenIcon(Icon icon) { openIcon = i; }
| 10,667
|
public void setOpenIcon(Icon i) { openIcon = i; }
|
public void setOpenIcon(Icon i) { openIcon = icon; }
| 10,668
|
TemplateNode clone(Stylesheet stylesheet) { return new OtherwiseNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet)); }
|
TemplateNode clone(Stylesheet stylesheet) { return new OtherwiseNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet)); }
| 10,669
|
clearRect(int x, int y, int width, int height);
|
public abstract void clearRect(int x, int y, int width, int height);
| 10,671
|
clipRect(int x, int y, int width, int height);
|
public abstract void clipRect(int x, int y, int width, int height);
| 10,672
|
copyArea(int x, int y, int width, int height, int dx, int dy);
|
public abstract void copyArea(int x, int y, int width, int height, int dx, int dy);
| 10,673
|
create();
|
public abstract Graphics create();
| 10,674
|
dispose();
|
public abstract void dispose();
| 10,675
|
draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
|
public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
| 10,676
|
drawArc(int x, int y, int width, int height, int arcStart, int arcAngle);
|
public abstract void drawArc(int x, int y, int width, int height, int arcStart, int arcAngle);
| 10,677
|
drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
|
public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
| 10,678
|
drawChars(char data[], int offset, int length, int x, int y){ drawString(new String(data, offset, length), x, y);}
|
public void drawChars(char data[], int offset, int length, int x, int y){ drawString(new String(data, offset, length), x, y);}
| 10,679
|
drawImage(Image image, int x, int y, ImageObserver observer);
|
public abstract boolean drawImage(Image image, int x, int y, ImageObserver observer);
| 10,680
|
drawLine(int x1, int y1, int x2, int y2);
|
public abstract void drawLine(int x1, int y1, int x2, int y2);
| 10,681
|
drawOval(int x, int y, int width, int height);
|
public abstract void drawOval(int x, int y, int width, int height);
| 10,682
|
drawPolygon(int xPoints[], int yPoints[], int npoints);
|
public abstract void drawPolygon(int xPoints[], int yPoints[], int npoints);
| 10,683
|
drawPolyline(int xPoints[], int yPoints[], int npoints);
|
public abstract void drawPolyline(int xPoints[], int yPoints[], int npoints);
| 10,684
|
drawRect(int x, int y, int width, int height){ int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; drawLine(x1, y1, x2, y1); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); drawLine(x1, y2, x1, y1);}
|
public void drawRect(int x, int y, int width, int height){ int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; drawLine(x1, y1, x2, y1); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); drawLine(x1, y2, x1, y1);}
| 10,685
|
drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight);
|
public abstract void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight);
| 10,686
|
drawString(String string, int x, int y);
|
public abstract void drawString(String string, int x, int y);
| 10,687
|
fill3DRect(int x, int y, int width, int height, boolean raised){ fillRect(x, y, width, height); draw3DRect(x, y, width-1, height-1, raised);}
|
public void fill3DRect(int x, int y, int width, int height, boolean raised){ fillRect(x, y, width, height); draw3DRect(x, y, width-1, height-1, raised);}
| 10,688
|
fillArc(int x, int y, int width, int height, int arcStart, int arcAngle);
|
public abstract void fillArc(int x, int y, int width, int height, int arcStart, int arcAngle);
| 10,689
|
fillOval(int x, int y, int width, int height);
|
public abstract void fillOval(int x, int y, int width, int height);
| 10,690
|
fillPolygon(int xPoints[], int yPoints[], int npoints);
|
public abstract void fillPolygon(int xPoints[], int yPoints[], int npoints);
| 10,691
|
fillRect(int x, int y, int width, int height);
|
public abstract void fillRect(int x, int y, int width, int height);
| 10,692
|
fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight);
|
public abstract void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight);
| 10,693
|
finalize(){ dispose();}
|
public void finalize(){ dispose();}
| 10,694
|
getClip();
|
public abstract Shape getClip();
| 10,695
|
getClipBounds();
|
public abstract Rectangle getClipBounds();
| 10,696
|
getClipRect(){ return(getClipBounds());}
|
public Rectangle getClipRect(){ return(getClipBounds());}
| 10,697
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.