rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
if(delegate != null) exportObject((Remote)this);
|
exportObject((Remote) this);
|
protected PortableRemoteObject() throws RemoteException { if(delegate != null) exportObject((Remote)this); }
|
if(delegate != null) delegate.connect(target, source);
|
delegate.connect(target, source);
|
public static void connect(Remote target, Remote source) throws RemoteException { if(delegate != null) delegate.connect(target, source); }
|
public static void exportObject(Remote obj)
|
public static void exportObject(Remote object)
|
public static void exportObject(Remote obj) throws RemoteException { if(delegate != null) delegate.exportObject(obj); }
|
if(delegate != null) delegate.exportObject(obj);
|
delegate.exportObject(object);
|
public static void exportObject(Remote obj) throws RemoteException { if(delegate != null) delegate.exportObject(obj); }
|
public static Object narrow(Object narrowFrom, Class narrowTo)
|
public static Object narrow(Object object, Class narrowToInstaceOf)
|
public static Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if(delegate != null) return delegate.narrow(narrowFrom, narrowTo); else return null; }
|
if(delegate != null) return delegate.narrow(narrowFrom, narrowTo); else return null;
|
return delegate.narrow(object, narrowToInstaceOf);
|
public static Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if(delegate != null) return delegate.narrow(narrowFrom, narrowTo); else return null; }
|
public static Remote toStub(Remote obj)
|
public static Remote toStub(Remote targetImpl)
|
public static Remote toStub(Remote obj) throws NoSuchObjectException { if(delegate != null) return delegate.toStub(obj); else return null; }
|
if(delegate != null) return delegate.toStub(obj); else return null;
|
return delegate.toStub(targetImpl);
|
public static Remote toStub(Remote obj) throws NoSuchObjectException { if(delegate != null) return delegate.toStub(obj); else return null; }
|
public static void unexportObject(Remote obj)
|
public static void unexportObject(Remote object)
|
public static void unexportObject(Remote obj) throws NoSuchObjectException { if(delegate != null) delegate.unexportObject(obj); }
|
if(delegate != null) delegate.unexportObject(obj);
|
delegate.unexportObject(object);
|
public static void unexportObject(Remote obj) throws NoSuchObjectException { if(delegate != null) delegate.unexportObject(obj); }
|
return new UTF_16Decoder (this, UTF_16Decoder.UNKNOWN_ENDIAN);
|
return new UTF_16Decoder (this, UTF_16Decoder.MAYBE_LITTLE_ENDIAN);
|
public CharsetDecoder newDecoder () { return new UTF_16Decoder (this, UTF_16Decoder.UNKNOWN_ENDIAN); }
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
LookAndFeel.installColorsAndFont(spinner, "Spinner.background", "Spinner.foreground", "Spinner.font"); LookAndFeel.installBorder(spinner, "Spinner.border");
|
protected void installDefaults() { /* most of it copied from BasicLabelUI, I don't know what keys are available, so someone may want to update this. Hence: TODO */ UIDefaults defaults = UIManager.getLookAndFeelDefaults(); /* spinner.setForeground(defaults.getColor("Spinner.foreground")); spinner.setBackground(defaults.getColor("Spinner.background")); spinner.setFont(defaults.getFont("Spinner.font")); spinner.setBorder(defaults.getBorder("Spinner.border")); */ spinner.setLayout(createLayout()); spinner.setOpaque(true); }
|
{
|
ElementNode(TemplateNode name, TemplateNode namespace, String uas, Node source) { this.name = name; this.namespace = namespace; this.uas = uas; this.source = source; NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } }
|
|
}
|
ElementNode(TemplateNode name, TemplateNode namespace, String uas, Node source) { this.name = name; this.namespace = namespace; this.uas = uas; this.source = source; NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } }
|
|
}
|
stylesheet.bindings.global = false;
|
void addAttributeSet(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling, String attributeSet) throws TransformerException { for (Iterator i = stylesheet.attributeSets.iterator(); i.hasNext(); ) { AttributeSet as = (AttributeSet) i.next(); if (!as.name.equals(attributeSet)) { continue; } if (as.uas != null) { StringTokenizer st = new StringTokenizer(as.uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, parent, nextSibling, st.nextToken()); } } if (as.children != null) { as.children.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } } }
|
{
|
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ElementNode(name.clone(stylesheet), (namespace == null) ? null : namespace.clone(stylesheet), uas, source); 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 ElementNode(name.clone(stylesheet), (namespace == null) ? null : namespace.clone(stylesheet), uas, source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
|
|
{
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); // Create a document fragment to hold the name DocumentFragment fragment = doc.createDocumentFragment(); // Apply name to the fragment name.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); String namespaceValue = null; if (namespace != null) { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment namespace.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) { namespaceValue = null; } } String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { int ci = nameValue.indexOf(':'); nameValue = nameValue.substring(ci + 1); } else { // Namespace aliasing if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } namespaceValue = source.lookupNamespaceURI(resultPrefix); } if (prefix == "#default") { prefix = null; } // Look up ordinary namespace for this prefix if (namespaceValue == null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { namespaceValue = XMLConstants.XML_NS_URI; } else { // Resolve namespace for this prefix namespaceValue = source.lookupNamespaceURI(prefix); } } /*if (prefix == null) { // Resolve prefix for this namespace prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue; } }*/ } // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : doc.createElement(nameValue); if (nextSibling != null) { parent.insertBefore(element, nextSibling); } else { parent.appendChild(element); } stylesheet.addNamespaceNodes(source, element, doc, elementExcludeResultPrefixes); if (uas != null) { StringTokenizer st = new StringTokenizer(uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, element, null, st.nextToken()); } } if (children != null) { children.apply(stylesheet, mode, context, pos, len, element, null); } if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
|
}
|
else {
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); // Create a document fragment to hold the name DocumentFragment fragment = doc.createDocumentFragment(); // Apply name to the fragment name.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); String namespaceValue = null; if (namespace != null) { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment namespace.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) { namespaceValue = null; } } String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { int ci = nameValue.indexOf(':'); nameValue = nameValue.substring(ci + 1); } else { // Namespace aliasing if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } namespaceValue = source.lookupNamespaceURI(resultPrefix); } if (prefix == "#default") { prefix = null; } // Look up ordinary namespace for this prefix if (namespaceValue == null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { namespaceValue = XMLConstants.XML_NS_URI; } else { // Resolve namespace for this prefix namespaceValue = source.lookupNamespaceURI(prefix); } } /*if (prefix == null) { // Resolve prefix for this namespace prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue; } }*/ } // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : doc.createElement(nameValue); if (nextSibling != null) { parent.insertBefore(element, nextSibling); } else { parent.appendChild(element); } stylesheet.addNamespaceNodes(source, element, doc, elementExcludeResultPrefixes); if (uas != null) { StringTokenizer st = new StringTokenizer(uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, element, null, st.nextToken()); } } if (children != null) { children.apply(stylesheet, mode, context, pos, len, element, null); } if (next != null) { 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 { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); // Create a document fragment to hold the name DocumentFragment fragment = doc.createDocumentFragment(); // Apply name to the fragment name.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); String namespaceValue = null; if (namespace != null) { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment namespace.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) { namespaceValue = null; } } String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { int ci = nameValue.indexOf(':'); nameValue = nameValue.substring(ci + 1); } else { // Namespace aliasing if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } namespaceValue = source.lookupNamespaceURI(resultPrefix); } if (prefix == "#default") { prefix = null; } // Look up ordinary namespace for this prefix if (namespaceValue == null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { namespaceValue = XMLConstants.XML_NS_URI; } else { // Resolve namespace for this prefix namespaceValue = source.lookupNamespaceURI(prefix); } } /*if (prefix == null) { // Resolve prefix for this namespace prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue; } }*/ } // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : doc.createElement(nameValue); if (nextSibling != null) { parent.insertBefore(element, nextSibling); } else { parent.appendChild(element); } stylesheet.addNamespaceNodes(source, element, doc, elementExcludeResultPrefixes); if (uas != null) { StringTokenizer st = new StringTokenizer(uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, element, null, st.nextToken()); } } if (children != null) { children.apply(stylesheet, mode, context, pos, len, element, null); } if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
|
/*if (prefix == null) { prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue;
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); // Create a document fragment to hold the name DocumentFragment fragment = doc.createDocumentFragment(); // Apply name to the fragment name.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); String namespaceValue = null; if (namespace != null) { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment namespace.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) { namespaceValue = null; } } String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { int ci = nameValue.indexOf(':'); nameValue = nameValue.substring(ci + 1); } else { // Namespace aliasing if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } namespaceValue = source.lookupNamespaceURI(resultPrefix); } if (prefix == "#default") { prefix = null; } // Look up ordinary namespace for this prefix if (namespaceValue == null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { namespaceValue = XMLConstants.XML_NS_URI; } else { // Resolve namespace for this prefix namespaceValue = source.lookupNamespaceURI(prefix); } } /*if (prefix == null) { // Resolve prefix for this namespace prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue; } }*/ } // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : doc.createElement(nameValue); if (nextSibling != null) { parent.insertBefore(element, nextSibling); } else { parent.appendChild(element); } stylesheet.addNamespaceNodes(source, element, doc, elementExcludeResultPrefixes); if (uas != null) { StringTokenizer st = new StringTokenizer(uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, element, null, st.nextToken()); } } if (children != null) { children.apply(stylesheet, mode, context, pos, len, element, null); } if (next != null) { 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 { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); // Create a document fragment to hold the name DocumentFragment fragment = doc.createDocumentFragment(); // Apply name to the fragment name.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); String namespaceValue = null; if (namespace != null) { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment namespace.apply(stylesheet, mode, context, pos, len, fragment, null); // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) { namespaceValue = null; } } String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { int ci = nameValue.indexOf(':'); nameValue = nameValue.substring(ci + 1); } else { // Namespace aliasing if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } namespaceValue = source.lookupNamespaceURI(resultPrefix); } if (prefix == "#default") { prefix = null; } // Look up ordinary namespace for this prefix if (namespaceValue == null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { namespaceValue = XMLConstants.XML_NS_URI; } else { // Resolve namespace for this prefix namespaceValue = source.lookupNamespaceURI(prefix); } } /*if (prefix == null) { // Resolve prefix for this namespace prefix = parent.lookupPrefix(namespaceValue); if (prefix != null) { nameValue = prefix + ":" + nameValue; } }*/ } // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : doc.createElement(nameValue); if (nextSibling != null) { parent.insertBefore(element, nextSibling); } else { parent.appendChild(element); } stylesheet.addNamespaceNodes(source, element, doc, elementExcludeResultPrefixes); if (uas != null) { StringTokenizer st = new StringTokenizer(uas, " "); while (st.hasMoreTokens()) { addAttributeSet(stylesheet, mode, context, pos, len, element, null, st.nextToken()); } } if (children != null) { children.apply(stylesheet, mode, context, pos, len, element, null); } if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
|
|
{
|
public boolean references(QName var) { if (name != null && name.references(var)) { return true; } if (namespace != null && namespace.references(var)) { return true; } return super.references(var); }
|
|
}
|
public boolean references(QName var) { if (name != null && name.references(var)) { return true; } if (namespace != null && namespace.references(var)) { return true; } return super.references(var); }
|
|
StringBuffer buf = new StringBuffer(getClass().getName());
|
StringBuffer buf = new StringBuffer("element");
|
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); if (uas != null) { buf.append(",uas="); buf.append(uas); } buf.append(']'); return buf.toString(); }
|
if (namespace != null) { buf.append(",namespace="); buf.append(namespace); }
|
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); if (uas != null) { buf.append(",uas="); buf.append(uas); } buf.append(']'); return buf.toString(); }
|
|
return add((JobStateReason) o);
|
return super.add((JobStateReason) o);
|
public boolean add(Object o) { if (o == null) throw new NullPointerException("reason is null"); return add((JobStateReason) o); }
|
public SwingContainerPeer(Component awtCont)
|
public SwingContainerPeer(Container awtCont)
|
public SwingContainerPeer(Component awtCont) { init(awtCont, null); }
|
init(awtCont, null);
|
heavyweightDescendents = new LinkedList();
|
public SwingContainerPeer(Component awtCont) { init(awtCont, null); }
|
Insets retVal; if (swingComponent != null) retVal = swingComponent.getJComponent().getInsets(); else retVal = new Insets(0, 0, 0, 0); return retVal;
|
return insets();
|
public Insets getInsets() { Insets retVal; if (swingComponent != null) retVal = swingComponent.getJComponent().getInsets(); else retVal = new Insets(0, 0, 0, 0); return retVal; }
|
if(comp == null) comp = awtComponent; if (comp != null) {
|
if(comp == null) comp = awtComponent;
|
protected void handleMouseEvent(MouseEvent ev) { Component comp = awtComponent.getComponentAt(ev.getPoint()); if(comp == null) comp = awtComponent; if (comp != null) { ComponentPeer peer = comp.getPeer(); if (awtComponent != comp && !comp.isLightweight() && peer instanceof SwingComponentPeer) { ev.translatePoint(comp.getX(), comp.getY()); ev.setSource(comp); ((SwingComponentPeer) peer).handleMouseEvent(ev); } } }
|
}
|
protected void handleMouseEvent(MouseEvent ev) { Component comp = awtComponent.getComponentAt(ev.getPoint()); if(comp == null) comp = awtComponent; if (comp != null) { ComponentPeer peer = comp.getPeer(); if (awtComponent != comp && !comp.isLightweight() && peer instanceof SwingComponentPeer) { ev.translatePoint(comp.getX(), comp.getY()); ev.setSource(comp); ((SwingComponentPeer) peer).handleMouseEvent(ev); } } }
|
|
protected void peerPaint(Graphics g)
|
protected void peerPaint(Graphics g, boolean update)
|
protected void peerPaint(Graphics g) { Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i) { Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip(); try { g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); } finally { if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); } } }
|
Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i)
|
if (isDoubleBuffering())
|
protected void peerPaint(Graphics g) { Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i) { Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip(); try { g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); } finally { if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); } } }
|
Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip();
|
int width = awtComponent.getWidth(); int height = awtComponent.getHeight(); if (backbuffer == null || backbuffer.getWidth(awtComponent) < width || backbuffer.getHeight(awtComponent) < height) backbuffer = awtComponent.createImage(width, height); Graphics g2 = backbuffer.getGraphics(); Rectangle clip = g.getClipRect();
|
protected void peerPaint(Graphics g) { Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i) { Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip(); try { g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); } finally { if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); } } }
|
{ g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); }
|
{ g2.setClip(clip); super.peerPaint(g2, update); peerPaintChildren(g2); }
|
protected void peerPaint(Graphics g) { Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i) { Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip(); try { g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); } finally { if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); } } }
|
{ if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); }
|
{ g2.dispose(); } g.drawImage(backbuffer, 0, 0, awtComponent); } else { super.peerPaint(g, update); peerPaintChildren(g);
|
protected void peerPaint(Graphics g) { Container c = (Container) awtComponent; Component[] children = c.getComponents(); for (int i = children.length - 1; i >= 0; --i) { Component child = children[i]; ComponentPeer peer = child.getPeer(); boolean translated = false; boolean clipped = false; Shape oldClip = g.getClip(); try { g.translate(child.getX(), child.getY()); translated = true; g.setClip(0, 0, child.getWidth(), child.getHeight()); clipped = true; if (peer instanceof SwingComponentPeer) ((SwingComponentPeer) peer).peerPaint(g); } finally { if (translated) g.translate(- child.getX(), - child.getY()); if (clipped) g.setClip(oldClip); } } }
|
OctetSeqHolder h = new OctetSeqHolder(); h._read(input); return h.value;
|
byte[] value = new byte[ input.read_long() ]; input.read_octet_array(value, 0, value.length); return value;
|
public static byte[] read(InputStream input) { OctetSeqHolder h = new OctetSeqHolder(); h._read(input); return h.value; }
|
OctetSeqHolder h = new OctetSeqHolder(value); h._write(output);
|
output.write_long(value.length); output.write_octet_array(value, 0, value.length);
|
public static void write(OutputStream output, byte[] value) { OctetSeqHolder h = new OctetSeqHolder(value); h._write(output); }
|
this (null, null, true, true);
|
super();
|
public BeanContextServicesSupport () { this (null, null, true, true); }
|
public void addBeanContextServicesListener (BeanContextServicesListener bcsl)
|
public void addBeanContextServicesListener (BeanContextServicesListener listener)
|
public void addBeanContextServicesListener (BeanContextServicesListener bcsl) { throw new Error ("Not implemented"); }
|
throw new Error ("Not implemented");
|
if (! bcsListeners.contains(listener)) bcsListeners.add(listener);
|
public void addBeanContextServicesListener (BeanContextServicesListener bcsl) { throw new Error ("Not implemented"); }
|
fireServiceRevoked (BeanContextServiceRevokedEvent bcsre)
|
protected final void fireServiceRevoked(BeanContextServiceRevokedEvent event)
|
fireServiceRevoked (BeanContextServiceRevokedEvent bcsre) { throw new Error ("Not implemented"); }
|
throw new Error ("Not implemented");
|
super.initialize(); bcsListeners = new ArrayList(); services = new HashMap();
|
public void initialize () { throw new Error ("Not implemented"); }
|
removeBeanContextServicesListener (BeanContextServicesListener bcsl)
|
public void removeBeanContextServicesListener (BeanContextServicesListener listener)
|
removeBeanContextServicesListener (BeanContextServicesListener bcsl) { throw new Error ("Not implemented"); }
|
throw new Error ("Not implemented");
|
int index = bcsListeners.indexOf(listener); if (index > -1) bcsListeners.remove(index);
|
removeBeanContextServicesListener (BeanContextServicesListener bcsl) { throw new Error ("Not implemented"); }
|
if (hostname == null) { throw new UnknownHostException("null"); } if (resolver == null) { throw new UnknownHostException(hostname); }
|
public ProtocolAddress[] getByName(final String hostname) throws UnknownHostException { final PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws UnknownHostException { ProtocolAddress[] protocolAddresses; protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } Lookup.setDefaultResolver(resolver); final Lookup lookup; try { lookup = new Lookup(hostname); } catch (TextParseException e) { throw new UnknownHostException(hostname); } lookup.run(); if (lookup.getResult() == Lookup.SUCCESSFUL) { final Record[] records = lookup.getAnswers(); final int recordCount = records.length; protocolAddresses = new ProtocolAddress[recordCount]; for (int i = 0; i < recordCount; i++) { final Record record = records[i]; protocolAddresses[i] = new IPv4Address(record.rdataToString()); } } else { throw new UnknownHostException(lookup.getErrorString()); } return protocolAddresses; } }; try { return (ProtocolAddress[])AccessController.doPrivileged(action); } catch (PrivilegedActionException ex) { if (ex.getException() instanceof UnknownHostException) { throw (UnknownHostException)ex.getException(); } else { throw (UnknownHostException)new UnknownHostException().initCause(ex.getException()); } } }
|
|
public IPv4Address(String addrStr) throws IllegalArgumentException { final StringTokenizer tok = new StringTokenizer(addrStr, "."); if (tok.countTokens() != length) { throw new IllegalArgumentException("Not an IPv4 address " + addrStr); }
|
public IPv4Address(byte[] src, int offset) {
|
public IPv4Address(String addrStr) throws IllegalArgumentException { final StringTokenizer tok = new StringTokenizer(addrStr, "."); if (tok.countTokens() != length) { throw new IllegalArgumentException("Not an IPv4 address " + addrStr); } address = new byte[length]; for (int i = 0; i < length; i++) { try { address[i] = (byte)Integer.parseInt(tok.nextToken()); } catch (NumberFormatException ex) { throw new IllegalArgumentException("Not a valid IPv4 address " + addrStr); } } }
|
for (int i = 0; i < length; i++) { try { address[i] = (byte)Integer.parseInt(tok.nextToken()); } catch (NumberFormatException ex) { throw new IllegalArgumentException("Not a valid IPv4 address " + addrStr); } }
|
System.arraycopy(src, offset, address, 0, length);
|
public IPv4Address(String addrStr) throws IllegalArgumentException { final StringTokenizer tok = new StringTokenizer(addrStr, "."); if (tok.countTokens() != length) { throw new IllegalArgumentException("Not an IPv4 address " + addrStr); } address = new byte[length]; for (int i = 0; i < length; i++) { try { address[i] = (byte)Integer.parseInt(tok.nextToken()); } catch (NumberFormatException ex) { throw new IllegalArgumentException("Not a valid IPv4 address " + addrStr); } } }
|
public void clearSelection() {
|
public void clearSelection () { index = -1;
|
public void clearSelection() { // Set Data index = -1; // Notify Listeners fireStateChanged(); } // clearSelection()
|
index = -1; fireStateChanged(); }
|
fireStateChanged (); }
|
public void clearSelection() { // Set Data index = -1; // Notify Listeners fireStateChanged(); } // clearSelection()
|
protected void fireStateChanged() {
|
protected void fireStateChanged () { ChangeListener listener; ChangeListener[] listeners; int index;
|
protected void fireStateChanged() { // Variables ChangeListener listener; EventListener[] listeners; int index; // Get Listeners listeners = listenerList.getListeners(ChangeListener.class); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listeners[index]; listener.stateChanged(changeEvent); } // for } // fireStateChanged()
|
ChangeListener listener; EventListener[] listeners; int index;
|
listeners = getChangeListeners ();
|
protected void fireStateChanged() { // Variables ChangeListener listener; EventListener[] listeners; int index; // Get Listeners listeners = listenerList.getListeners(ChangeListener.class); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listeners[index]; listener.stateChanged(changeEvent); } // for } // fireStateChanged()
|
listeners = listenerList.getListeners(ChangeListener.class); for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listeners[index]; listener.stateChanged(changeEvent); } }
|
for (index = 0; index < listeners.length; index++) { listener = listeners [index]; listener.stateChanged (changeEvent); } }
|
protected void fireStateChanged() { // Variables ChangeListener listener; EventListener[] listeners; int index; // Get Listeners listeners = listenerList.getListeners(ChangeListener.class); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listeners[index]; listener.stateChanged(changeEvent); } // for } // fireStateChanged()
|
public void setSelectedIndex(int index) {
|
public void setSelectedIndex (int index) { this.index = index;
|
public void setSelectedIndex(int index) { // Set Data this.index = index; // Notify Listeners fireStateChanged(); } // setSelectedIndex()
|
this.index = index; fireStateChanged(); }
|
fireStateChanged (); }
|
public void setSelectedIndex(int index) { // Set Data this.index = index; // Notify Listeners fireStateChanged(); } // setSelectedIndex()
|
Element e = newElement(element_name); return e;
|
return newElement(element_name);
|
public Element getElement(String element_name) { Element e = newElement(element_name); return e; }
|
Object old = super.put(key, value);
|
Object old; if (value != null) old = super.put(key, value); else old = super.remove(key);
|
public Object put(Object key, Object value) { Object old = super.put(key, value); if (key instanceof String && old != value) firePropertyChange((String) key, old, value); return old; }
|
public synchronized void release() { log.debug("io.release");
|
public void release() {
|
public synchronized void release() { log.debug("io.release"); io.release(); log.debug("irq.release"); irq.release(); }
|
log.debug("end of release");
|
public synchronized void release() { log.debug("io.release"); io.release(); log.debug("irq.release"); irq.release(); }
|
|
super(null, null);
|
super();
|
public JMenuItem() { super(null, null); }
|
DefaultButtonModel(JComponent a) { comp = a; }
|
public DefaultButtonModel() { stateMask = ENABLED; mnemonic = java.awt.event.KeyEvent.VK_UNDEFINED; listenerList = new EventListenerList(); changeEvent = new ChangeEvent(this); }
|
DefaultButtonModel(JComponent a) { comp = a; }
|
Graphics g = jComponent.getGraphics(); ((Component)component).paint(g);
|
final Graphics g = jComponent.getGraphics(); if (g != null) { ((Component)component).paint(g); }
|
public void handleEvent(AWTEvent event) { switch (event.getID()) { case PaintEvent.PAINT: { Graphics g = jComponent.getGraphics(); //Point p = component.getLocationOnScreen(); //g.translate(p.x, p.y); ((Component)component).paint(g); //g.translate(-p.x, -p.y); } break; case PaintEvent.UPDATE: { Graphics g = jComponent.getGraphics(); //Point p = component.getLocationOnScreen(); //g.translate(p.x, p.y); ((Component)component).update(getGraphics()); //g.translate(-p.x, -p.y); } break; } }
|
Graphics g = jComponent.getGraphics(); ((Component)component).update(getGraphics());
|
final Graphics g = jComponent.getGraphics(); if (g != null) { ((Component)component).update(getGraphics()); }
|
public void handleEvent(AWTEvent event) { switch (event.getID()) { case PaintEvent.PAINT: { Graphics g = jComponent.getGraphics(); //Point p = component.getLocationOnScreen(); //g.translate(p.x, p.y); ((Component)component).paint(g); //g.translate(-p.x, -p.y); } break; case PaintEvent.UPDATE: { Graphics g = jComponent.getGraphics(); //Point p = component.getLocationOnScreen(); //g.translate(p.x, p.y); ((Component)component).update(getGraphics()); //g.translate(-p.x, -p.y); } break; } }
|
if (!mode.canRead() && mode.canWrite()) { try { file.setLength(0); } catch (IOException e) {} }
|
public FileHandleImpl(FSFile file, VMOpenMode mode, FileHandleManager fhm) { this.mode = mode; this.file = file; this.readOnly = (mode == VMOpenMode.READ); this.fhm = fhm; this.closed = false; }
|
|
if (length > fileOffset) {
|
public synchronized void setLength(long length) throws IOException { if (closed) { throw new IOException("File closed"); } if (readOnly) { throw new IOException("Cannot write"); } file.setLength(length); if (length > fileOffset) { fileOffset = length; } }
|
|
}
|
public synchronized void setLength(long length) throws IOException { if (closed) { throw new IOException("File closed"); } if (readOnly) { throw new IOException("Cannot write"); } file.setLength(length); if (length > fileOffset) { fileOffset = length; } }
|
|
final public static ByteBuffer wrap (byte[] array)
|
public static final ByteBuffer wrap (byte[] array, int offset, int length)
|
final public static ByteBuffer wrap (byte[] array) { return wrap (array, 0, array.length); }
|
return wrap (array, 0, array.length);
|
return new ByteBufferImpl (array, 0, array.length, offset + length, offset, -1, false);
|
final public static ByteBuffer wrap (byte[] array) { return wrap (array, 0, array.length); }
|
public static String decode(String s, String encoding) throws UnsupportedEncodingException
|
public static String decode(String s)
|
public static String decode(String s, String encoding) throws UnsupportedEncodingException { // First convert all '+' characters to spaces. String str = s.replace('+', ' '); // Then go through the whole string looking for byte encoded characters int i; int start = 0; byte[] bytes = null; int length = str.length(); StringBuffer result = new StringBuffer(length); while ((i = str.indexOf('%', start)) >= 0) { // Add all non-encoded characters to the result buffer result.append(str.substring(start, i)); start = i; // Get all consecutive encoded bytes while ((i + 2 < length) && (str.charAt(i) == '%')) i += 3; // Decode all these bytes if ((bytes == null) || (bytes.length < ((i - start) / 3))) bytes = new byte[((i - start) / 3)]; int index = 0; try { while (start < i) { String sub = str.substring(start + 1, start + 3); bytes[index] = (byte) Integer.parseInt(sub, 16); index++; start += 3; } } catch (NumberFormatException nfe) { // One of the hex encoded strings was bad } // Add the bytes as characters according to the given encoding result.append(new String(bytes, 0, index, encoding)); // Make sure we skip to just after a % sign // There might not have been enough encoded characters after the % // or the hex chars were not actually hex chars (NumberFormatException) if (start < length && s.charAt(start) == '%') { result.append('%'); start++; } } // Add any characters left if (start < str.length()) result.append(str.substring(start)); return result.toString(); }
|
String str = s.replace('+', ' '); int i; int start = 0; byte[] bytes = null; int length = str.length(); StringBuffer result = new StringBuffer(length); while ((i = str.indexOf('%', start)) >= 0)
|
try
|
public static String decode(String s, String encoding) throws UnsupportedEncodingException { // First convert all '+' characters to spaces. String str = s.replace('+', ' '); // Then go through the whole string looking for byte encoded characters int i; int start = 0; byte[] bytes = null; int length = str.length(); StringBuffer result = new StringBuffer(length); while ((i = str.indexOf('%', start)) >= 0) { // Add all non-encoded characters to the result buffer result.append(str.substring(start, i)); start = i; // Get all consecutive encoded bytes while ((i + 2 < length) && (str.charAt(i) == '%')) i += 3; // Decode all these bytes if ((bytes == null) || (bytes.length < ((i - start) / 3))) bytes = new byte[((i - start) / 3)]; int index = 0; try { while (start < i) { String sub = str.substring(start + 1, start + 3); bytes[index] = (byte) Integer.parseInt(sub, 16); index++; start += 3; } } catch (NumberFormatException nfe) { // One of the hex encoded strings was bad } // Add the bytes as characters according to the given encoding result.append(new String(bytes, 0, index, encoding)); // Make sure we skip to just after a % sign // There might not have been enough encoded characters after the % // or the hex chars were not actually hex chars (NumberFormatException) if (start < length && s.charAt(start) == '%') { result.append('%'); start++; } } // Add any characters left if (start < str.length()) result.append(str.substring(start)); return result.toString(); }
|
result.append(str.substring(start, i)); start = i; while ((i + 2 < length) && (str.charAt(i) == '%')) i += 3; if ((bytes == null) || (bytes.length < ((i - start) / 3))) bytes = new byte[((i - start) / 3)]; int index = 0; try { while (start < i) { String sub = str.substring(start + 1, start + 3); bytes[index] = (byte) Integer.parseInt(sub, 16); index++; start += 3; } } catch (NumberFormatException nfe) { } result.append(new String(bytes, 0, index, encoding)); if (start < length && s.charAt(start) == '%') { result.append('%'); start++; }
|
return decode(s, "UTF-8");
|
public static String decode(String s, String encoding) throws UnsupportedEncodingException { // First convert all '+' characters to spaces. String str = s.replace('+', ' '); // Then go through the whole string looking for byte encoded characters int i; int start = 0; byte[] bytes = null; int length = str.length(); StringBuffer result = new StringBuffer(length); while ((i = str.indexOf('%', start)) >= 0) { // Add all non-encoded characters to the result buffer result.append(str.substring(start, i)); start = i; // Get all consecutive encoded bytes while ((i + 2 < length) && (str.charAt(i) == '%')) i += 3; // Decode all these bytes if ((bytes == null) || (bytes.length < ((i - start) / 3))) bytes = new byte[((i - start) / 3)]; int index = 0; try { while (start < i) { String sub = str.substring(start + 1, start + 3); bytes[index] = (byte) Integer.parseInt(sub, 16); index++; start += 3; } } catch (NumberFormatException nfe) { // One of the hex encoded strings was bad } // Add the bytes as characters according to the given encoding result.append(new String(bytes, 0, index, encoding)); // Make sure we skip to just after a % sign // There might not have been enough encoded characters after the % // or the hex chars were not actually hex chars (NumberFormatException) if (start < length && s.charAt(start) == '%') { result.append('%'); start++; } } // Add any characters left if (start < str.length()) result.append(str.substring(start)); return result.toString(); }
|
if (start < str.length()) result.append(str.substring(start)); return result.toString();
|
catch (UnsupportedEncodingException uee) { return s; }
|
public static String decode(String s, String encoding) throws UnsupportedEncodingException { // First convert all '+' characters to spaces. String str = s.replace('+', ' '); // Then go through the whole string looking for byte encoded characters int i; int start = 0; byte[] bytes = null; int length = str.length(); StringBuffer result = new StringBuffer(length); while ((i = str.indexOf('%', start)) >= 0) { // Add all non-encoded characters to the result buffer result.append(str.substring(start, i)); start = i; // Get all consecutive encoded bytes while ((i + 2 < length) && (str.charAt(i) == '%')) i += 3; // Decode all these bytes if ((bytes == null) || (bytes.length < ((i - start) / 3))) bytes = new byte[((i - start) / 3)]; int index = 0; try { while (start < i) { String sub = str.substring(start + 1, start + 3); bytes[index] = (byte) Integer.parseInt(sub, 16); index++; start += 3; } } catch (NumberFormatException nfe) { // One of the hex encoded strings was bad } // Add the bytes as characters according to the given encoding result.append(new String(bytes, 0, index, encoding)); // Make sure we skip to just after a % sign // There might not have been enough encoded characters after the % // or the hex chars were not actually hex chars (NumberFormatException) if (start < length && s.charAt(start) == '%') { result.append('%'); start++; } } // Add any characters left if (start < str.length()) result.append(str.substring(start)); return result.toString(); }
|
public static Constant getInstance(Object value) { return new ReferenceConstant(value);
|
public static Constant getInstance(byte value) { throw new IllegalArgumentException("constant not yet defined");
|
public static Constant getInstance(Object value) { return new ReferenceConstant(value); }
|
Container getContentPane() {
|
public Container getContentPane() {
|
Container getContentPane() { return getRootPane().getContentPane(); }
|
void setContentPane(Container contentPane) {
|
public void setContentPane(Container contentPane) {
|
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
|
void setDefaultCloseOperation(int operation) {
|
public void setDefaultCloseOperation(int operation) {
|
void setDefaultCloseOperation(int operation) { close_action = operation; }
|
void setGlassPane(Component glassPane) {
|
public void setGlassPane(Component glassPane) {
|
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); }
|
String classname = p[i].getProperty("KeyFactory." + algorithm); if (classname != null) return getInstance(classname, algorithm, p[i]);
|
return getInstance(algorithm, p[i]);
|
public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { String classname = p[i].getProperty("KeyFactory." + algorithm); if (classname != null) return getInstance(classname, algorithm, p[i]); } throw new NoSuchAlgorithmException(algorithm); }
|
catch (NoSuchAlgorithmException ignored) {}
|
public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { String classname = p[i].getProperty("KeyFactory." + algorithm); if (classname != null) return getInstance(classname, algorithm, p[i]); } throw new NoSuchAlgorithmException(algorithm); }
|
|
return affineTransform == null ? 0 : affineTransform.hashCode ();
|
int code = ( isAntiAliased ? 1 : 0 ) + ( usesFractionalMetrics ? 2 : 0 ); if( affineTransform != null && !affineTransform.isIdentity() ) code ^= affineTransform.hashCode(); return code;
|
public int hashCode () { // FIXME: check what SUN does here. return affineTransform == null ? 0 : affineTransform.hashCode (); }
|
else super.propertyChange(e);
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(FREE_STANDING_PROP)) { Boolean prop = (Boolean) e.getNewValue(); isFreeStanding = (prop == null ? true : prop.booleanValue()); increaseButton.setFreeStanding(isFreeStanding); decreaseButton.setFreeStanding(isFreeStanding); } }
|
|
thumbColor = defaults.getColor("ScrollBar.thumb"); thumbDarkShadowColor = defaults.getColor("ScrollBar.thumbDarkShadow"); thumbHighlightColor = defaults.getColor("ScrollBar.thumbHighlight"); thumbLightShadowColor = defaults.getColor("ScrollBar.thumbShadow");
|
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border")); scrollbar.setOpaque(true); maximumThumbSize = defaults.getDimension("ScrollBar.maximumThumbSize"); minimumThumbSize = defaults.getDimension("ScrollBar.minimumThumbSize"); }
|
|
return new String[]
|
if (countryCache == null)
|
public static String[] getISOCountries() { return new String[] { "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW" }; }
|
"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW" };
|
countryCache = getISOStrings("territories"); } return countryCache;
|
public static String[] getISOCountries() { return new String[] { "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW" }; }
|
return new String[]
|
if (languageCache == null)
|
public static String[] getISOLanguages() { return new String[] { "aa", "ab", "af", "am", "ar", "as", "ay", "az", "ba", "be", "bg", "bh", "bi", "bn", "bo", "br", "ca", "co", "cs", "cy", "da", "de", "dz", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ia", "id", "ie", "ik", "in", "is", "it", "iu", "iw", "ja", "ji", "jw", "ka", "kk", "kl", "km", "kn", "ko", "ks", "ku", "ky", "la", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "ne", "nl", "no", "oc", "om", "or", "pa", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sd", "sg", "sh", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ug", "uk", "ur", "uz", "vi", "vo", "wo", "xh", "yi", "yo", "za", "zh", "zu" }; }
|
"aa", "ab", "af", "am", "ar", "as", "ay", "az", "ba", "be", "bg", "bh", "bi", "bn", "bo", "br", "ca", "co", "cs", "cy", "da", "de", "dz", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ia", "id", "ie", "ik", "in", "is", "it", "iu", "iw", "ja", "ji", "jw", "ka", "kk", "kl", "km", "kn", "ko", "ks", "ku", "ky", "la", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "ne", "nl", "no", "oc", "om", "or", "pa", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sd", "sg", "sh", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ug", "uk", "ur", "uz", "vi", "vo", "wo", "xh", "yi", "yo", "za", "zh", "zu" }; }
|
languageCache = getISOStrings("languages"); } return languageCache; }
|
public static String[] getISOLanguages() { return new String[] { "aa", "ab", "af", "am", "ar", "as", "ay", "az", "ba", "be", "bg", "bh", "bi", "bn", "bo", "br", "ca", "co", "cs", "cy", "da", "de", "dz", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ia", "id", "ie", "ik", "in", "is", "it", "iu", "iw", "ja", "ji", "jw", "ka", "kk", "kl", "km", "kn", "ko", "ks", "ku", "ky", "la", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "ne", "nl", "no", "oc", "om", "or", "pa", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sd", "sg", "sh", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ug", "uk", "ur", "uz", "vi", "vo", "wo", "xh", "yi", "yo", "za", "zh", "zu" }; }
|
public JRadioButtonMenuItem() { }
|
public JRadioButtonMenuItem() { this(null, null); }
|
public JRadioButtonMenuItem() { // TODO } // JRadioButtonMenuItem()
|
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJRadioButtonMenuItem(this); } return accessibleContext; }
|
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJRadioButtonMenuItem(this); return accessibleContext; }
|
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJRadioButtonMenuItem(this); } // if return accessibleContext; } // getAccessibleContext()
|
protected String paramString() { return null; }
|
protected String paramString() { return "JRadioButtonMenuItem"; }
|
protected String paramString() { return null; // TODO } // paramString()
|
}
|
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && ! text.equals("")) { if (menuItem.isEnabled()) g.setColor(menuItem.getForeground()); else // FIXME: should fix this to use 'disabledForeground', but its // default value in BasicLookAndFeel is null. g.setColor(Color.gray); int mnemonicIndex = menuItem.getDisplayedMnemonicIndex(); if (mnemonicIndex != -1) BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent()); else BasicGraphicsUtils.drawString(g, text, 0, textRect.x, textRect.y + fm.getAscent()); } }
|
|
protected final void doTransmit(SocketBuffer skbuf, HardwareAddress destination) throws NetworkException { skbuf.insert(ETH_HLEN); if (destination != null) { destination.writeTo(skbuf, 0);
|
protected final void doTransmit(SocketBuffer skbuf, HardwareAddress destination) throws NetworkException { skbuf.insert(ETH_HLEN); if (destination != null) { destination.writeTo(skbuf, 0); } else { EthernetAddress.BROADCAST.writeTo(skbuf, 0); } getAddress().writeTo(skbuf, 6); skbuf.set16(12, skbuf.getProtocolID()); onReceive(skbuf);
|
protected final void doTransmit(SocketBuffer skbuf, HardwareAddress destination) throws NetworkException { skbuf.insert(ETH_HLEN); if (destination != null) { destination.writeTo(skbuf, 0); } else { EthernetAddress.BROADCAST.writeTo(skbuf, 0); } getAddress().writeTo(skbuf, 6); skbuf.set16(12, skbuf.getProtocolID()); onReceive(skbuf); }
|
else { EthernetAddress.BROADCAST.writeTo(skbuf, 0); } getAddress().writeTo(skbuf, 6); skbuf.set16(12, skbuf.getProtocolID()); onReceive(skbuf); }
|
protected final void doTransmit(SocketBuffer skbuf, HardwareAddress destination) throws NetworkException { skbuf.insert(ETH_HLEN); if (destination != null) { destination.writeTo(skbuf, 0); } else { EthernetAddress.BROADCAST.writeTo(skbuf, 0); } getAddress().writeTo(skbuf, 6); skbuf.set16(12, skbuf.getProtocolID()); onReceive(skbuf); }
|
|
int save = iter.getIndex();
|
public int following (int pos) { int save = iter.getIndex(); iter.setIndex(pos); int r = next (); return r; }
|
|
if (name.equalsIgnoreCase(child.getLocalName()))
|
String childName = child.getLocalName(); if (childName == null) { childName = child.getLocalName(); } if (name.equalsIgnoreCase(childName))
|
protected Node getChildElement(String name) { for (Node child = getFirstChild(); child != null; child = child.getNextSibling()) { if (name.equalsIgnoreCase(child.getLocalName())) { return child; } } return null; }
|
if (attrName == null) { attrName = attr.getNodeName(); }
|
protected String getHTMLAttribute(String name) { if (hasAttributes()) { NamedNodeMap attrs = getAttributes(); int len = attrs.getLength(); for (int i = 0; i < len; i++) { Node attr = attrs.item(i); String attrName = attr.getLocalName(); if (attrName.equalsIgnoreCase(name)) { return attr.getNodeValue(); } } } return ""; }
|
|
if (name.equalsIgnoreCase(parent.getLocalName()))
|
String parentName = parent.getLocalName(); if (parentName == null) { parentName = parent.getNodeName(); } if (name.equalsIgnoreCase(parentName))
|
protected Node getParentElement(String name) { for (Node parent = getParentNode(); parent != null; parent = parent.getParentNode()) { if (name.equalsIgnoreCase(parent.getLocalName())) { return parent; } } return null; }
|
if (attrName == null) { attrName = attr.getNodeName(); }
|
protected void setHTMLAttribute(String name, String value) { Node attr; NamedNodeMap attrs = getAttributes(); int len = attrs.getLength(); for (int i = 0; i < len; i++) { attr = attrs.item(i); String attrName = attr.getLocalName(); if (attrName.equalsIgnoreCase(name)) { if (value != null) { attr.setNodeValue(value); } else { attrs.removeNamedItem(attr.getNodeName()); } return; } } if (value != null) { // Create a new attribute DomHTMLDocument doc = (DomHTMLDocument) getOwnerDocument(); // XXX namespace URI for attribute? attr = doc.createAttribute(name); attr.setNodeValue(value); } }
|
|
CharSeqHolder h = new CharSeqHolder(); h._read(input); return h.value;
|
char [] value = new char[ input.read_long() ]; input.read_char_array(value, 0, value.length); return value;
|
public static char[] read(InputStream input) { CharSeqHolder h = new CharSeqHolder(); h._read(input); return h.value; }
|
CharSeqHolder h = new CharSeqHolder(value); h._write(output);
|
output.write_long(value.length); output.write_char_array(value, 0, value.length);
|
public static void write(OutputStream output, char[] value) { CharSeqHolder h = new CharSeqHolder(value); h._write(output); }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.