rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
out.write(APOS); | out.write(0x22); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
out.write(" encoding='".getBytes("US-ASCII")); | out.write(" encoding=\"".getBytes("US-ASCII")); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
{ out.write(" standalone='yes'".getBytes("US-ASCII")); } | out.write(" standalone=\"yes\"".getBytes("US-ASCII")); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
if (ctx.getNodeType() == Node.ELEMENT_NODE) | if (ctx.getNodeType() == Node.ELEMENT_NODE && isHTMLElement(ctx, "html")) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
if (html == null) { html = doc.createElement("html"); node.appendChild(html); } | if (html != null) { | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
if (ctx.getNodeType() == Node.ELEMENT_NODE) { String name = ctx.getLocalName(); if (name == null) { name = ctx.getNodeName(); } if ("head".equalsIgnoreCase(name)) | if (isHTMLElement(ctx, "head")) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
} if (head == null) { head = doc.createElement("head"); Node c1 = null; for (Node ctx = html.getFirstChild(); ctx != null; ctx = ctx.getNextSibling()) { if (ctx.getNodeType() == Node.ELEMENT_NODE) | if (head != null) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
c1 = ctx; break; } } if (c1 != null) { html.insertBefore(head, c1); } else { html.appendChild(head); } } | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
if (ctx.getNodeType() == Node.ELEMENT_NODE) { String name = ctx.getLocalName(); if (name == null) { name = ctx.getNodeName(); } if ("meta".equalsIgnoreCase(name)) | if (isHTMLElement(ctx, "meta")) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
htmlEncoded = true; } } | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
} if (defined) { undefine(uri); | default: System.err.println("Unhandled node type: "+nt); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
{ | String encode(String text, boolean encodeCtl, boolean inAttr) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c == '<') { if (buf == null) { buf = new StringBuffer(text.substri... | |
} | String encode(String text, boolean encodeCtl, boolean inAttr) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c == '<') { if (buf == null) { buf = new StringBuffer(text.substri... | |
if (!encoder.canEncode(text)) | boolean htmlNeedingEncoding = (mode == Stylesheet.OUTPUT_HTML && !htmlEncoded); if (!encoder.canEncode(text) || htmlNeedingEncoding) | final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ... |
if (encoder.canEncode(c)) { buf.append(c); } else | if (!encoder.canEncode(c)) | final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ... |
else if (htmlNeedingEncoding) { String entityName = getHTMLCharacterEntity(c); if (entityName != null) { buf.append('&'); buf.append(entityName); buf.append(';'); } else buf.append(c); } else buf.append(c); | final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ... | |
boolean isDefined(String uri) | boolean isDefined(String uri, String prefix) | boolean isDefined(String uri) { return XMLConstants.XML_NS_URI.equals(uri) || XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri) || namespaces.containsKey(uri); } |
return XMLConstants.XML_NS_URI.equals(uri) || XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri) || namespaces.containsKey(uri); | if (XMLConstants.XML_NS_URI.equals(uri)) return "xml".equals(prefix); if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri)) return "xmlns".equals(prefix); if (prefix == null) prefix = ""; for (Iterator i = namespaces.iterator(); i.hasNext(); ) { Map ctx = (Map) i.next(); String val = (String) ctx.get(uri); if (val != nu... | boolean isDefined(String uri) { return XMLConstants.XML_NS_URI.equals(uri) || XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri) || namespaces.containsKey(uri); } |
if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (h != null) { BoundedRangeModel model = h.getModel(); if (model != null) model.addChangeListener(scrollListener); } | public void setHorizontalScrollBar(JScrollBar h) { if (horizontalScrollBar == h) return; JScrollBar old = horizontalScrollBar; removeNonNull(old); horizontalScrollBar = h; addNonNull(h, JScrollPane.HORIZONTAL_SCROLLBAR); firePropertyChange("horizontalScrollBar", old, h); sync(); if (old ... | |
revalidate(); | public void setHorizontalScrollBarPolicy(int h) { if (horizontalScrollBarPolicy == h) return; if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED && h != HORIZONTAL_SCROLLBAR_NEVER && h != HORIZONTAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown horizontal scrollbar policy"); ... | |
if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (v != null) { BoundedRangeModel model = v.getModel(); if (model != null) model.addChangeListener(scrollListener); } | public void setVerticalScrollBar(JScrollBar v) { if (verticalScrollBar == v) return; JScrollBar old = verticalScrollBar; removeNonNull(old); verticalScrollBar = v; addNonNull(v, JScrollPane.VERTICAL_SCROLLBAR); firePropertyChange("verticalScrollBar", old, v); sync(); if (old != null)... | |
revalidate(); | public void setVerticalScrollBarPolicy(int v) { if (verticalScrollBarPolicy == v) return; if (v != VERTICAL_SCROLLBAR_AS_NEEDED && v != VERTICAL_SCROLLBAR_NEVER && v != VERTICAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown vertical scrollbar policy"); int... | |
if (old != null) old.removeChangeListener(scrollListener); | public void setViewport(JViewport v) { if (viewport == v) return; JViewport old = viewport; removeNonNull(old); if (old != null) old.removeChangeListener(scrollListener); viewport = v; if (v != null) v.addChangeListener(scrollListener); addNonNull(v, JScrollPane.VIEWPORT); ... | |
if (v != null) v.addChangeListener(scrollListener); | public void setViewport(JViewport v) { if (viewport == v) return; JViewport old = viewport; removeNonNull(old); if (old != null) old.removeChangeListener(scrollListener); viewport = v; if (v != null) v.addChangeListener(scrollListener); addNonNull(v, JScrollPane.VIEWPORT); ... | |
public Insets getBorderInsets(Component c); | Insets getBorderInsets(Component c); | public Insets getBorderInsets(Component c); |
public void addAttribute(Object name, Object value); | void addAttribute(Object name, Object value); | public void addAttribute(Object name, Object value); |
public void addAttributes(AttributeSet attributes); | void addAttributes(AttributeSet attributes); | public void addAttributes(AttributeSet attributes); |
public void removeAttribute(Object name); | void removeAttribute(Object name); | public void removeAttribute(Object name); |
public void removeAttributes(AttributeSet attributes); | void removeAttributes(Enumeration names); | public void removeAttributes(AttributeSet attributes); |
public void setResolveParent(AttributeSet parent); | void setResolveParent(AttributeSet parent); | public void setResolveParent(AttributeSet parent); |
BadLocationException() { } | public BadLocationException (String str, int offset) { super (str); this.offset = offset; } | BadLocationException() { } |
for (int i = 0; i < listenerList.length; i += 2) | for (int i = listenerList.length - 2; i >= 0; i -= 2) | public EventListener[] getListeners(Class c) { int count, f; EventListener[] result; count = getListenerCount(c); result = (EventListener[]) Array.newInstance(c, count); f = 0; for (int i = 0; i < listenerList.length; i += 2) if (listenerList[i] == c) result[f++] = (EventListener) liste... |
public InetAddress(byte[] ipaddr, String hostname) { this(ipaddr, hostname, null); | public InetAddress(byte[] ipaddr) { this(ipaddr, null, null); | public InetAddress(byte[] ipaddr, String hostname) { this(ipaddr, hostname, null); } |
if (i == 4) { return (new InetAddress(ip)); } | if (i == 4) { return (new Inet4Address(ip)); } | public static InetAddress getByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) return getLocalHost(); // First, check to see if it is an IP address. If so, then don't // do a DNS lookup. StringTokenizer s... |
public UnknownHostException(String message) | public UnknownHostException() | public UnknownHostException(String message) { super(message); } |
super(message); | public UnknownHostException(String message) { super(message); } | |
super(addr, host, null); | super(addr, host); | Inet6Address(byte[] addr, String host) { super(addr, host, null); this.ipaddress = addr; } |
if (isHorizontalIn(parent)) layoutAlgorithm(parent, HORIZONTAL, VERTICAL); | Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); int[] hSpans = new int[children.length]; int[] hOffsets = new int[children.length]; in... | public void layoutContainer(Container parent) { if (isHorizontalIn(parent)) layoutAlgorithm(parent, HORIZONTAL, VERTICAL); else layoutAlgorithm(parent, VERTICAL, HORIZONTAL); } |
layoutAlgorithm(parent, VERTICAL, HORIZONTAL); | { SizeRequirements.calculateTiledPositions(height, null, vSizeReqs, vOffsets, vSpans); SizeRequirements.calculateAlignedPositions(width, null, hSizeReqs, hOffsets, hSpans); } for (int i = 0; i < children.length; i++) { Component child = children[i]; child.setBounds(hOffsets[i] + insets.left, vOffsets[i] + insets.top,... | public void layoutContainer(Container parent) { if (isHorizontalIn(parent)) layoutAlgorithm(parent, HORIZONTAL, VERTICAL); else layoutAlgorithm(parent, VERTICAL, HORIZONTAL); } |
Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; | public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isH... | |
List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) | Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); SizeRequirements hReq; SizeRequirements vReq; if (isHorizontalIn(container)) | public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); x += sz.width; if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } | hReq = SizeRequirements.getTiledSizeRequirements(hSizeReqs); vReq = SizeRequirements.getAlignedSizeRequirements(vSizeReqs); | public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); y += sz.height; if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); | hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs); } return new Dimension(hReq.maximum, vReq.maximum); | public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isH... | |
List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) | Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); SizeRequirements hReq; SizeRequirements vReq; if (isHorizontalIn(container)) | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } | hReq = SizeRequirements.getTiledSizeRequirements(hSizeReqs); vReq = SizeRequirements.getAlignedSizeRequirements(vSizeReqs); | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } | hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs); | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
return new Dimension(x, y); | return new Dimension(hReq.minimum, vReq.minimum); | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; List children = AWTUtilities.getVisibleChildren(parent); if (isH... |
Insets insets = parent.getInsets(); int x = 0; int y = 0; | public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = i... | |
List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = insets.left + insets.right; for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } y += insets.bottom ... | Component[] children = container.getComponents(); SizeRequirements[] hSizeReqs = new SizeRequirements[children.length]; SizeRequirements[] vSizeReqs = new SizeRequirements[children.length]; getSizeRequirements(hSizeReqs, vSizeReqs); SizeRequirements hReq; SizeRequirements vReq; if (isHorizontalIn(container)) { hReq = S... | public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = i... |
return new Dimension(x, y); | else { hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs); } return new Dimension(hReq.preferred, vReq.preferred); | public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = 0; int y = 0; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { x = i... |
public _IDLTypeStub(Delegate delegate) | public _IDLTypeStub() | public _IDLTypeStub(Delegate delegate) { _set_delegate(delegate); } |
_set_delegate(delegate); | public _IDLTypeStub(Delegate delegate) { _set_delegate(delegate); } | |
public void setSystemId(String systemID); | public void setSystemId(String systemId); | public void setSystemId(String systemID); |
public TransformerException(String msg) { super(msg); | public TransformerException(String msg) { this(msg, null, null); | public TransformerException(String msg) { super(msg); } |
if (transform != null) | if (transform == null) | public TransformAttribute (AffineTransform transform) { if (transform != null) { this.affineTransform = new AffineTransform (transform); } } |
this.affineTransform = new AffineTransform (transform); | throw new IllegalArgumentException("Null 'transform' not permitted."); | public TransformAttribute (AffineTransform transform) { if (transform != null) { this.affineTransform = new AffineTransform (transform); } } |
this.affineTransform = new AffineTransform (transform); | public TransformAttribute (AffineTransform transform) { if (transform != null) { this.affineTransform = new AffineTransform (transform); } } | |
return affineTransform; | return (AffineTransform) affineTransform.clone(); | public AffineTransform getTransform () { return affineTransform; } |
return 16; | return 16 + getAdditionalHeight(); | public int getIconHeight() { return 16; } |
return new MetalCheckBoxIcon(); | if (checkBoxIcon == null) checkBoxIcon = new MetalCheckBoxIcon(); return checkBoxIcon; | public static Icon getCheckBoxIcon() { return new MetalCheckBoxIcon(); } |
return new CheckBoxMenuItemIcon(); | if (checkBoxMenuItemIcon == null) checkBoxMenuItemIcon = new CheckBoxMenuItemIcon(); return checkBoxMenuItemIcon; | public static Icon getCheckBoxMenuItemIcon() { return new CheckBoxMenuItemIcon(); } |
return new FileChooserDetailViewIcon(); | if (fileChooserDetailViewIcon == null) fileChooserDetailViewIcon = new FileChooserDetailViewIcon(); return fileChooserDetailViewIcon; | public static Icon getFileChooserDetailViewIcon() { return new FileChooserDetailViewIcon(); } |
return new FileChooserHomeFolderIcon(); | if (fileChooserHomeFolderIcon == null) fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon(); return fileChooserHomeFolderIcon; | public static Icon getFileChooserHomeFolderIcon() { return new FileChooserHomeFolderIcon(); } |
return new FileChooserListViewIcon(); | if (fileChooserListViewIcon == null) fileChooserListViewIcon = new FileChooserListViewIcon(); return fileChooserListViewIcon; | public static Icon getFileChooserListViewIcon() { return new FileChooserListViewIcon(); } |
return new FileChooserNewFolderIcon(); | if (fileChooserNewFolderIcon == null) fileChooserNewFolderIcon = new FileChooserNewFolderIcon(); return fileChooserNewFolderIcon; | public static Icon getFileChooserNewFolderIcon() { return new FileChooserNewFolderIcon(); } |
return new FileChooserUpFolderIcon(); | if (fileChooserUpFolderIcon == null) fileChooserUpFolderIcon = new FileChooserUpFolderIcon(); return fileChooserUpFolderIcon; | public static Icon getFileChooserUpFolderIcon() { return new FileChooserUpFolderIcon(); } |
return new InternalFrameDefaultMenuIcon(); | if (internalFrameDefaultMenuIcon == null) internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon(); return internalFrameDefaultMenuIcon; | public static Icon getInternalFrameDefaultMenuIcon() { return new InternalFrameDefaultMenuIcon(); } |
return new RadioButtonMenuItemIcon(); | if (radioButtonMenuItemIcon == null) radioButtonMenuItemIcon = new RadioButtonMenuItemIcon(); return radioButtonMenuItemIcon; | public static Icon getRadioButtonMenuItemIcon() { return new RadioButtonMenuItemIcon(); } |
return new TreeComputerIcon(); | if (treeComputerIcon == null) treeComputerIcon = new TreeComputerIcon(); return treeComputerIcon; | public static Icon getTreeComputerIcon() { return new TreeComputerIcon(); } |
return new TreeFloppyDriveIcon(); | if (treeFloppyDriveIcon == null) treeFloppyDriveIcon = new TreeFloppyDriveIcon(); return treeFloppyDriveIcon; | public static Icon getTreeFloppyDriveIcon() { return new TreeFloppyDriveIcon(); } |
return new TreeHardDriveIcon(); | if (treeHardDriveIcon == null) treeHardDriveIcon = new TreeHardDriveIcon(); return treeHardDriveIcon; | public static Icon getTreeHardDriveIcon() { return new TreeHardDriveIcon(); } |
public Polygon(int[] xpoints, int[] ypoints, int npoints) | public Polygon() | public Polygon(int[] xpoints, int[] ypoints, int npoints) { this.xpoints = new int[npoints]; this.ypoints = new int[npoints]; System.arraycopy(xpoints, 0, this.xpoints, 0, npoints); System.arraycopy(ypoints, 0, this.ypoints, 0, npoints); this.npoints = npoints; } |
this.xpoints = new int[npoints]; this.ypoints = new int[npoints]; System.arraycopy(xpoints, 0, this.xpoints, 0, npoints); System.arraycopy(ypoints, 0, this.ypoints, 0, npoints); this.npoints = npoints; | xpoints = new int[4]; ypoints = new int[4]; | public Polygon(int[] xpoints, int[] ypoints, int npoints) { this.xpoints = new int[npoints]; this.ypoints = new int[npoints]; System.arraycopy(xpoints, 0, this.xpoints, 0, npoints); System.arraycopy(ypoints, 0, this.ypoints, 0, npoints); this.npoints = npoints; } |
public void fillPolygon(Polygon polygon) { fillPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints); } | public abstract void fillPolygon(int xPoints[], int yPoints[], int npoints); | public void fillPolygon(Polygon polygon) { fillPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints); } |
public void setMargin(Insets m) { margin = m; revalidate(); repaint(); } | public void setMargin(Insets m) { Insets old = margin; margin = m; if (m != old) { firePropertyChange(MARGIN_CHANGED_PROPERTY, old, m); revalidate(); repaint(); } } | public void setMargin(Insets m) { margin = m; revalidate(); repaint(); } |
public boolean isEnabled(); | boolean isEnabled(); | public boolean isEnabled(); |
public void setMnemonic(int mne) { getModel().setMnemonic(mne); } | public void setMnemonic(char mne) { int old = getModel().getMnemonic(); getModel().setMnemonic(mne); if (old != getModel().getMnemonic()) { firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, (int) mne); revalidate(); repaint(); } } | public void setMnemonic(int mne) { getModel().setMnemonic(mne); } |
public void putValue(String key, Object value); | void putValue(String key, Object value); | public void putValue(String key, Object value); |
public void setEnabled(boolean b); | void setEnabled(boolean b); | public void setEnabled(boolean b); |
public abstract FontMetrics getFontMetrics(Font font); | public FontMetrics getFontMetrics() { return getFontMetrics(getFont()); } | public abstract FontMetrics getFontMetrics(Font font); |
public void setIcon(Icon defaultIcon) { if (default_icon == defaultIcon) return; default_icon = defaultIcon; if (default_icon != null) { } revalidate(); repaint(); } | public void setIcon(Icon i) { Icon old = default_icon; default_icon = i; if (old != i) { firePropertyChange(ICON_CHANGED_PROPERTY, old, i); revalidate(); repaint(); } } | public void setIcon(Icon defaultIcon) { if (default_icon == defaultIcon) return; default_icon = defaultIcon; if (default_icon != null) { // XXX FIXME - icons do not know their parent // default_icon.setParent(this); } revalidate(); repaint(); } |
public JScrollPane(Component view, int vsbPolicy, int hsbPolicy) | public JScrollPane() | public JScrollPane(Component view, int vsbPolicy, int hsbPolicy) { scrollListener = createScrollListener(); setVerticalScrollBarPolicy(vsbPolicy); setVerticalScrollBar(createVerticalScrollBar()); setHorizontalScrollBarPolicy(hsbPolicy); setHorizontalScrollBar(createHorizontalScrollBar()); setViewp... |
scrollListener = createScrollListener(); setVerticalScrollBarPolicy(vsbPolicy); setVerticalScrollBar(createVerticalScrollBar()); setHorizontalScrollBarPolicy(hsbPolicy); setHorizontalScrollBar(createHorizontalScrollBar()); setViewportView(view); setLayout(new ScrollPaneLayout()); setOpaque(false); updateUI(); | this(null); | public JScrollPane(Component view, int vsbPolicy, int hsbPolicy) { scrollListener = createScrollListener(); setVerticalScrollBarPolicy(vsbPolicy); setVerticalScrollBar(createVerticalScrollBar()); setHorizontalScrollBarPolicy(hsbPolicy); setHorizontalScrollBar(createHorizontalScrollBar()); setViewp... |
public Image createImage(int width, int height) | public Image createImage(ImageProducer prod) | public Image createImage(int width, int height) { Component parent = awtComponent.getParent(); ComponentPeer parentPeer = parent.getPeer(); return parentPeer.createImage(width, height); } |
Component parent = awtComponent.getParent(); ComponentPeer parentPeer = parent.getPeer(); return parentPeer.createImage(width, height); | Image image = Toolkit.getDefaultToolkit().createImage(prod); return image; | public Image createImage(int width, int height) { Component parent = awtComponent.getParent(); ComponentPeer parentPeer = parent.getPeer(); return parentPeer.createImage(width, height); } |
throw new Error("Please report a bug", e); | public void replaceRange(String text, int start, int end) { Document doc = getDocument(); if (start > end || start < doc.getStartPosition().getOffset() || end >= doc.getEndPosition().getOffset()) throw new IllegalArgumentException(); try { doc.remove(start, end - start); doc.insertStrin... | |
public BeanDescriptor(Class beanClass, Class customizerClass) { this.beanClass = beanClass; this.customizerClass = customizerClass; | public BeanDescriptor(Class beanClass) { this(beanClass,null); | public BeanDescriptor(Class beanClass, Class customizerClass) { this.beanClass = beanClass; this.customizerClass = customizerClass; } |
private Pattern (String regex) | private Pattern (String regex, int flags) | private Pattern (String regex) throws PatternSyntaxException { this (regex, 0); } |
this (regex, 0); | 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; RESyntax syntax = RESyntax.RE_SYNTAX_PERL5; if ((flags & UNIX_LINES) != 0)... | private Pattern (String regex) throws PatternSyntaxException { this (regex, 0); } |
} | private Pattern (String regex) throws PatternSyntaxException { this (regex, 0); } | |
public RESyntax(RESyntax other) { bits = (BitSet) other.bits.clone(); | public RESyntax() { bits = new BitSet(BIT_TOTAL); | public RESyntax(RESyntax other) { bits = (BitSet) other.bits.clone(); } |
public RE(Object pattern, int cflags, RESyntax syntax) throws REException { this(pattern,cflags,syntax,0,0); | public RE(Object pattern) throws REException { this(pattern,0,RESyntax.RE_SYNTAX_PERL5,0,0); | public RE(Object pattern, int cflags, RESyntax syntax) throws REException { this(pattern,cflags,syntax,0,0); } |
public Number parse (String sourceStr) throws ParseException { ParsePosition pp = new ParsePosition (0); Number r = parse (sourceStr, pp); if (r == null) { int index = pp.getErrorIndex(); if (index < 0) index = pp.getIndex(); throw new ParseException ("couldn't parse number", index); } return r; } | public abstract Number parse (String sourceStr, ParsePosition pos); | public Number parse (String sourceStr) throws ParseException { ParsePosition pp = new ParsePosition (0); Number r = parse (sourceStr, pp); if (r == null) { int index = pp.getErrorIndex(); if (index < 0) index = pp.getIndex(); throw new ParseException ("couldn't parse number", index); } return... |
return new gnu.java.awt.peer.GLightweightPeer (target); | return new GLightweightPeer(target); | protected LightweightPeer createComponent(Component target) { return new gnu.java.awt.peer.GLightweightPeer (target); } |
int ic = popupMenu.getItemCount(); for(int i = 0; i < ic ; i++){ MenuItem mi = popupMenu.getItem(i); JMenuItem jmi = new JMenuItem(mi.getLabel()); | int item_count = popupMenu.getItemCount(); for(int i = 0; i < item_count; i++){ MenuItem menu_item = popupMenu.getItem(i); menu_item.addNotify(); jComponent.add(((SwingMenuComponentPeer)menu_item.getPeer()).jComponent); | public SwingPopupMenuPeer(SwingToolkit toolkit, PopupMenu popupMenu) { super(toolkit, popupMenu, new JPopupMenu()); int ic = popupMenu.getItemCount(); for(int i = 0; i < ic ; i++){ MenuItem mi = popupMenu.getItem(i); JMenuItem jmi = new JMenuItem(mi.getLabel()); } ... |
public BAD_OPERATION() | public BAD_OPERATION(String message) | public BAD_OPERATION() { super("", 0, CompletionStatus.COMPLETED_NO); } |
super("", 0, CompletionStatus.COMPLETED_NO); | super(message, 0, CompletionStatus.COMPLETED_NO); | public BAD_OPERATION() { super("", 0, CompletionStatus.COMPLETED_NO); } |
closeEntry(); | private void readManifest(boolean verify) throws IOException { firstEntry = (JarEntry) super.getNextEntry(); while ((firstEntry != null) && firstEntry.getName().startsWith("META-INF/")) { if (firstEntry.getName().equals(JarFile.MANIFEST_NAME)) { manifest = new Manifest(this); } firstEntry = (Ja... | |
public JarEntry(ZipEntry entry) | public JarEntry(String name) throws NullPointerException, IllegalArgumentException | public JarEntry(ZipEntry entry) { super(entry); attr = null; certs = null; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.