bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public Dimension getPreferredSize(JComponent c) { Dimension dims = new Dimension(0, 0); Insets insets = c.getInsets(); if (c instanceof JSeparator) { JSeparator s = (JSeparator) c; if (s.getOrientation() == JSeparator.HORIZONTAL) { dims.height = 2; dims.width = 40; } else { dims.width = 2; dims.height = 40; } } dims.width += insets.left + insets.right; dims.height += insets.top + insets.bottom; return dims; }
|
public Dimension getPreferredSize(JComponent c) { Dimension dims = new Dimension(0, 0); Insets insets = c.getInsets(); if (c instanceof JSeparator) { JSeparator s = (JSeparator) c; if (s.getOrientation() == JSeparator.HORIZONTAL) { dims.height = 2; dims.width = 40; } else { dims.width = 2; dims.height = 40; } } dims.width += insets.left + insets.right; dims.height += insets.top + insets.bottom; return dims; }
| 15,207
|
public void paint(Graphics g, JComponent c) { Rectangle r = new Rectangle(); SwingUtilities.calculateInnerArea(c, r); Color saved = g.getColor(); int midAB = r.width / 2 + r.x; int midAD = r.height / 2 + r.y; JSeparator s; if (c instanceof JSeparator) s = (JSeparator) c; else return; if (s.getOrientation() == JSeparator.HORIZONTAL) { g.setColor(highlight); g.drawLine(r.x, midAD, r.x + r.width, midAD); g.setColor(shadow); g.drawLine(r.x, midAD + 1, r.x + r.width, midAD + 1); } else { g.setColor(highlight); g.drawLine(midAB, r.y, midAB, r.y + r.height); g.setColor(shadow); g.drawLine(midAB + 1, r.y, midAB + 1, r.y + r.height); } }
|
public void paint(Graphics g, JComponent c) { Rectangle r = new Rectangle(); SwingUtilities.calculateInnerArea(c, r); Color saved = g.getColor(); int midAB = r.width / 2 + r.x; int midAD = r.height / 2 + r.y; JSeparator s; if (c instanceof JSeparator) s = (JSeparator) c; else return; if (s.getOrientation() == JSeparator.HORIZONTAL) { g.setColor(highlight); g.drawLine(r.x, midAD, r.x + r.width, midAD); g.setColor(shadow); g.drawLine(r.x, midAD + 1, r.x + r.width, midAD + 1); } else { g.setColor(highlight); g.drawLine(midAB, r.y, midAB, r.y + r.height); g.setColor(shadow); g.drawLine(midAB + 1, r.y, midAB + 1, r.y + r.height); } }
| 15,208
|
public void paint(Graphics g, JComponent c) { Rectangle r = new Rectangle(); SwingUtilities.calculateInnerArea(c, r); Color saved = g.getColor(); int midAB = r.width / 2 + r.x; int midAD = r.height / 2 + r.y; JSeparator s; if (c instanceof JSeparator) s = (JSeparator) c; else return; if (s.getOrientation() == JSeparator.HORIZONTAL) { g.setColor(highlight); g.drawLine(r.x, midAD, r.x + r.width, midAD); g.setColor(shadow); g.drawLine(r.x, midAD + 1, r.x + r.width, midAD + 1); } else { g.setColor(highlight); g.drawLine(midAB, r.y, midAB, r.y + r.height); g.setColor(shadow); g.drawLine(midAB + 1, r.y, midAB + 1, r.y + r.height); } }
|
public void paint(Graphics g, JComponent c) { Rectangle r = new Rectangle(); SwingUtilities.calculateInnerArea(c, r); Color saved = g.getColor(); int midAB = r.width / 2 + r.x; int midAD = r.height / 2 + r.y; JSeparator s; if (c instanceof JSeparator) s = (JSeparator) c; else return; if (s.getOrientation() == JSeparator.HORIZONTAL) { g.setColor(highlight); g.drawLine(r.x, midAD, r.x + r.width, midAD); g.setColor(shadow); g.drawLine(r.x, midAD + 1, r.x + r.width, midAD + 1); } else { g.setColor(highlight); g.drawLine(midAB, r.y, midAB, r.y + r.height); g.setColor(shadow); g.drawLine(midAB + 1, r.y, midAB + 1, r.y + r.height); } }
| 15,209
|
public TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = new TreePath[]{path}; this.areNew = new boolean[]{isNew}; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath; } // TreeSelectionEvent()
|
public TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = new TreePath[]{path}; this.areNew = new boolean[]{isNew}; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath; } // TreeSelectionEvent()
| 15,210
|
public TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = new TreePath[]{path}; this.areNew = new boolean[]{isNew}; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath; } // TreeSelectionEvent()
|
public TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = new TreePath[]{path}; this.areNew = new boolean[]{isNew}; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath; } // TreeSelectionEvent()
| 15,211
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,212
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,213
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,214
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; // if // for // Tree Path's are equals return true; // if // Unequal return false; // equals()
| 15,215
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,216
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,217
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,218
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
|
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) { return false; } // if // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) { return false; } // if } // for // Tree Path's are equals return true; } // if // Unequal return false; } // equals()
| 15,219
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
| 15,220
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
| 15,221
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
| 15,222
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
|
public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); } return sbuf.toString(); }
| 15,223
|
public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.image = image; this.thumbnails = thumbnails; this.metadata = metadata; }
|
public IIOImage (Raster raster, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.image = image; this.thumbnails = thumbnails; this.metadata = metadata; }
| 15,224
|
public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.image = image; this.thumbnails = thumbnails; this.metadata = metadata; }
|
public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.image = image; this.thumbnails = thumbnails; this.metadata = metadata; }
| 15,225
|
public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.image = image; this.thumbnails = thumbnails; this.metadata = metadata; }
|
public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata) { if (image == null) throw new IllegalArgumentException ("image may not be null"); this.raster = raster; this.thumbnails = thumbnails; this.metadata = metadata; }
| 15,226
|
public int getNumThumbnails() { return thumbnails.size(); }
|
public int getNumThumbnails() { return thumbnails == null ? 0 : thumbnails.size(); }
| 15,227
|
public boolean isFocusCycleRoot () { return focusCycleRoot; }
|
public boolean isFocusCycleRoot (Container c) { return focusCycleRoot; }
| 15,229
|
public boolean isFocusCycleRoot () { return focusCycleRoot; }
|
public boolean isFocusCycleRoot () { if (this == c && isFocusCycleRoot ()) return true; Container ancestor = getFocusCycleRootAncestor (); if (c == ancestor) return true; return false; }
| 15,230
|
public void appendData(String arg) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } String value = text + arg; mutating(value); text = value; }
|
public void appendData(String arg) { if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } String value = text + arg; mutating(value); text = value; }
| 15,231
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
| 15,232
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,233
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void deleteData(int offset, int count) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); if (offset < 0 || count < 0 || offset > raw.length) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } if (count == 0) { return; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,234
|
public void insertData(int offset, String arg) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); char[] tmp = arg.toCharArray (); char[] buf = new char[raw.length + tmp.length]; try { System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void insertData(int offset, String arg) { if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); char[] tmp = arg.toCharArray (); char[] buf = new char[raw.length + tmp.length]; try { System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
| 15,235
|
public void insertData(int offset, String arg) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); char[] tmp = arg.toCharArray (); char[] buf = new char[raw.length + tmp.length]; try { System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void insertData(int offset, String arg) { if (isReadonly()) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); char[] tmp = arg.toCharArray (); char[] buf = new char[raw.length + tmp.length]; try { System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,236
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
| 15,237
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,238
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public void replaceData(int offset, int count, String arg) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); // deleteData if (offset < 0 || count < 0 || offset > raw.length) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } if ((offset + count) > raw.length) { count = raw.length - offset; } try { char[] buf = new char[raw.length - count]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(tmp, 0, buf, offset, tmp.length); System.arraycopy(raw, offset, buf, offset + tmp.length, raw.length - offset); String value = new String(buf); mutating(value); text = value; } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,239
|
public void setNodeValue(String value) { if (isReadonly()) { throw new DomEx (DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (value == null) { value = ""; } mutating(value); text = value; }
|
public void setNodeValue(String value) { if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } if (value == null) { value = ""; } mutating(value); text = value; }
| 15,240
|
public String substringData(int offset, int count) { try { return text.substring(offset, count); } catch (StringIndexOutOfBoundsException e) { if (offset >= 0 && count >= 0 && offset < text.length()) { return text.substring(offset); } throw new DomEx(DomEx.INDEX_SIZE_ERR); } }
|
public String substringData(int offset, int count) { try { return text.substring(offset, count); } catch (StringIndexOutOfBoundsException e) { if (offset >= 0 && count >= 0 && offset < text.length()) { return text.substring(offset); } throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } }
| 15,241
|
public URLDecoder () { }
|
public URLDecoder() { }
| 15,242
|
public RemoteException(String s) { this(s, null); }
|
public RemoteException() { this(s, null); }
| 15,243
|
public RemoteException(String s) { this(s, null); }
|
public RemoteException(String s) { this(null, null); }
| 15,244
|
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
|
public InetSocketAddress(InetAddress addr, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
| 15,245
|
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
|
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException("Bad port number: " + port); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
| 15,246
|
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
|
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; try { this.addr = InetAddress.getByName(hostname); } catch (Exception e) // UnknownHostException, SecurityException { this.addr = null; } }
| 15,247
|
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
|
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
| 15,248
|
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
|
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
| 15,249
|
public ProtocolException(String message) { super(message); }
|
public ProtocolException() { super(message); }
| 15,250
|
public ProtocolException(String message) { super(message); }
|
public ProtocolException(String message) { }
| 15,251
|
ForEachNode(TemplateNode children, TemplateNode next, Expr select, List sortKeys) { super(children, next); this.select = select; this.sortKeys = sortKeys; }
|
ForEachNode(TemplateNode children, TemplateNode next, Expr select, List sortKeys) { super(children, next); this.select = select; this.sortKeys = sortKeys; }
| 15,252
|
ForEachNode(TemplateNode children, TemplateNode next, Expr select, List sortKeys) { super(children, next); this.select = select; this.sortKeys = sortKeys; }
|
ForEachNode(TemplateNode children, TemplateNode next, Expr select, List sortKeys) { this.select = select; this.sortKeys = sortKeys; }
| 15,253
|
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) { sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); } return new ForEachNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), select.clone(stylesheet), sortKeys2); }
|
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) { sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); } return new ForEachNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), select.clone(stylesheet), sortKeys2); }
| 15,254
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus);
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus);
| 15,256
|
public Component getEditorComponent();
|
public Component getEditorComponent();
| 15,257
|
public void addItemListener(ItemListener value0) { // TODO } // addItemListener()
|
public void addItemListener(ItemListener value0) { // TODO } // addItemListener()
| 15,258
|
public void setItem(Object item);
|
public void setItem(Object item);
| 15,259
|
public void removeItemListener(ItemListener value0) { // TODO } // removeItemListener()
|
public void removeItemListener(ItemListener value0) { // TODO } // removeItemListener()
| 15,260
|
public Set getAllFonts() { if(fontsByName.size() == 0) { // load the luxisr.ttf TTFFontData fontData; try { fontData = new TTFFontDataFile(this.getClass().getClassLoader().getResource("/" + "luxisr.ttf")); TTFFont font = new TTFFont(fontData,10 ); fontsByName.put(font.getName(),font); } catch (IOException e) { throw new RuntimeException(e); } } return new HashSet(fontsByName.values()); }
|
public Set getAllFonts() { if(fontsByName.size() == 0) { // load the luxisr.ttf TTFFontData fontData; try { fontData = new TTFFontDataFile(this.getClass().getClassLoader().getResource("/" + "luxisr.ttf")); TTFFont font = new TTFFont(fontData,10 ); fontsByName.put(font.getName(),font); } catch (IOException e) { throw new RuntimeException(e); } } return new HashSet(fontsByName.values()); }
| 15,261
|
private TTFFontData getFontData(Font font) { if(font instanceof TTFFont) return ((TTFFont)font).getFontData(); return null; }
|
private TTFFontData getFontData(Font font) { if(font instanceof TTFFont) return ((TTFFont)font).getFontData(); return null; }
| 15,262
|
public TextRenderer getTextRenderer(Font font) { TextRenderer r = (TextRenderer)renderers.get(font); if (r == null) { r = new TTFTextRenderer(getFontData(font), font.getSize()); renderers.put(font, r); } return r; }
|
public TextRenderer getTextRenderer(Font font) { TextRenderer r = (TextRenderer)renderers.get(font); if (r == null) { r = new TTFTextRenderer(getFontData(font), font.getSize()); renderers.put(font, r); } return r; }
| 15,263
|
public boolean provides(Font font) { final Font f = (Font)fontsByName.get(font.getFamily()); return (f != null); }
|
public boolean provides(Font font) { if (!fontsLoaded) { loadFonts(); } final Font f = (Font) fontsByName.get(font.getFamily()); return (f != null); }
| 15,264
|
<T> T[] toArray(T[] a);
|
<T> T[] toArray(T[] a);
| 15,265
|
public abstract void close() throws SecurityException;
|
public abstract void close() throws SecurityException;
| 15,266
|
public String getEncoding() { return encoding; }
|
public String getEncoding() { return encoding; }
| 15,267
|
public ErrorManager getErrorManager() { LogManager.getLogManager().checkAccess(); /* Developers wanting to change the subsequent code should * have a look at Handler.reportError -- it also can create * an ErrorManager, but does so without checking permissions * to control the logging infrastructure. */ if (errorManager == null) errorManager = new ErrorManager(); return errorManager; }
|
public ErrorManager getErrorManager() { LogManager.getLogManager().checkAccess(); /* Developers wanting to change the subsequent code should * have a look at Handler.reportError -- it also can create * an ErrorManager, but does so without checking permissions * to control the logging infrastructure. */ if (errorManager == null) errorManager = new ErrorManager(); return errorManager; }
| 15,268
|
public Filter getFilter() { return filter; }
|
public Filter getFilter() { return filter; }
| 15,269
|
public Formatter getFormatter() { return formatter; }
|
public Formatter getFormatter() { return formatter; }
| 15,270
|
public Level getLevel() { return level; }
|
public Level getLevel() { return level; }
| 15,271
|
public boolean isLoggable(LogRecord record) { if (record.getLevel().intValue() < level.intValue()) return false; if (filter != null) return filter.isLoggable(record); else return true; }
|
public boolean isLoggable(LogRecord record) { if (record.getLevel().intValue() < level.intValue()) return false; if (filter != null) return filter.isLoggable(record); else return true; }
| 15,272
|
protected void reportError(String message, Exception ex, int code) { if (errorManager == null) errorManager = new ErrorManager(); errorManager.error(message, ex, code); }
|
protected void reportError(String message, Exception ex, int code) { if (errorManager == null) errorManager = new ErrorManager(); errorManager.error(message, ex, code); }
| 15,273
|
public void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException { /* Should any developer ever change this implementation, they are * advised to have a look at StreamHandler.setEncoding(String), * which overrides this method without calling super.setEncoding. */ LogManager.getLogManager().checkAccess(); /* Simple check for supported encodings. This is more expensive * than it could be, but this method is overwritten by StreamHandler * anyway. */ if (encoding != null) new String(new byte[0], encoding); this.encoding = encoding; }
|
public void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException { /* Should any developer ever change this implementation, they are * advised to have a look at StreamHandler.setEncoding(String), * which overrides this method without calling super.setEncoding. */ LogManager.getLogManager().checkAccess(); /* Simple check for supported encodings. This is more expensive * than it could be, but this method is overwritten by StreamHandler * anyway. */ if (encoding != null) new String(new byte[0], encoding); this.encoding = encoding; }
| 15,274
|
public void setErrorManager(ErrorManager manager) { LogManager.getLogManager().checkAccess(); /* Make sure manager is not null. */ manager.getClass(); this.errorManager = manager; }
|
public void setErrorManager(ErrorManager manager) { LogManager.getLogManager().checkAccess(); /* Make sure manager is not null. */ manager.getClass(); this.errorManager = manager; }
| 15,275
|
public void setFilter(Filter filter) throws SecurityException { LogManager.getLogManager().checkAccess(); this.filter = filter; }
|
public void setFilter(Filter filter) throws SecurityException { LogManager.getLogManager().checkAccess(); this.filter = filter; }
| 15,276
|
public void setFormatter(Formatter formatter) throws SecurityException { LogManager.getLogManager().checkAccess(); /* Throws a NullPointerException if formatter is null. */ formatter.getClass(); this.formatter = formatter; }
|
public void setFormatter(Formatter formatter) throws SecurityException { LogManager.getLogManager().checkAccess(); /* Throws a NullPointerException if formatter is null. */ formatter.getClass(); this.formatter = formatter; }
| 15,277
|
public void setLevel(Level level) { LogManager.getLogManager().checkAccess(); /* Throw NullPointerException if level is null. */ level.getClass(); this.level = level; }
|
public void setLevel(Level level) { LogManager.getLogManager().checkAccess(); /* Throw NullPointerException if level is null. */ level.getClass(); this.level = level; }
| 15,278
|
public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizontalHeaderTable(); final TTFHorizontalMetricsTable hmTable = fontData.getHorizontalMetricsTable(); if (!(cmapTable.getNrEncodingTables() > 0)) { throw new RuntimeException("No Encoding is found!"); } final TTFCMapTable.EncodingTable encTable = cmapTable.getEncodingTable(0); if (encTable.getTableFormat() == null) { throw new RuntimeException("The table is NUll!!"); } final int ascent = hheadTable.getAscent(); final AffineTransform tx = new AffineTransform(); final double scale = fontSize / ascent; tx.translate(x, y + fontSize); //System.out.println("Scale=" + scale); tx.scale(scale, -scale); tx.translate(0, ascent); for (int i = 0; i < text.length(); i++) { // get the index for the needed glyph int index = encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shape shape = glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx), false); tx.translate(hmTable.getAdvanceWidth(index), 0); } //System.out.println("Drawing string..." + gp + ", bounds " + gp.getBounds()); g.draw(gp); } catch (IOException ex) { log.error("Error drawing text", ex); } }
|
public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizontalHeaderTable(); final TTFHorizontalMetricsTable hmTable = fontData.getHorizontalMetricsTable(); if (!(cmapTable.getNrEncodingTables() > 0)) { throw new RuntimeException("No Encoding is found!"); } final TTFCMapTable.EncodingTable encTable = cmapTable.getEncodingTable(0); if (encTable.getTableFormat() == null) { throw new RuntimeException("The table is NUll!!"); } final int ascent = hheadTable.getAscent(); final AffineTransform tx = new AffineTransform(); final double scale = fontSize / ascent; tx.translate(x, y + fontSize); //System.out.println("Scale=" + scale); tx.scale(scale, -scale); tx.translate(0, ascent); for (int i = 0; i < text.length(); i++) { // get the index for the needed glyph int index = encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shape shape = glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx), false); tx.translate(hmTable.getAdvanceWidth(index), 0); } //System.out.println("Drawing string..." + gp + ", bounds " + gp.getBounds()); g.draw(gp); } catch (IOException ex) { log.error("Error drawing text", ex); } }
| 15,279
|
public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizontalHeaderTable(); final TTFHorizontalMetricsTable hmTable = fontData.getHorizontalMetricsTable(); if (!(cmapTable.getNrEncodingTables() > 0)) { throw new RuntimeException("No Encoding is found!"); } final TTFCMapTable.EncodingTable encTable = cmapTable.getEncodingTable(0); if (encTable.getTableFormat() == null) { throw new RuntimeException("The table is NUll!!"); } final int ascent = hheadTable.getAscent(); final AffineTransform tx = new AffineTransform(); final double scale = fontSize / ascent; tx.translate(x, y + fontSize); //System.out.println("Scale=" + scale); tx.scale(scale, -scale); tx.translate(0, ascent); for (int i = 0; i < text.length(); i++) { // get the index for the needed glyph int index = encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shape shape = glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx), false); tx.translate(hmTable.getAdvanceWidth(index), 0); } //System.out.println("Drawing string..." + gp + ", bounds " + gp.getBounds()); g.draw(gp); } catch (IOException ex) { log.error("Error drawing text", ex); } }
|
publicvoidrender(Graphics2Dg,Stringtext,intx,inty){ try{ finalGeneralPathgp=newGeneralPath(); gp.moveTo(x,y); finalTTFGlyphTableglyphTable=fontData.getGlyphTable(); finalTTFCMapTablecmapTable=fontData.getCMapTable(); finalTTFHorizontalHeaderTablehheadTable=fontData.getHorizontalHeaderTable(); finalTTFHorizontalMetricsTablehmTable=fontData.getHorizontalMetricsTable(); if(!(cmapTable.getNrEncodingTables()>0)){ thrownewRuntimeException("NoEncodingisfound!"); } finalTTFCMapTable.EncodingTableencTable=cmapTable.getEncodingTable(0); if(encTable.getTableFormat()==null){ thrownewRuntimeException("ThetableisNUll!!"); } finalintascent=hheadTable.getAscent(); finalAffineTransformtx=newAffineTransform(); finaldoublescale=fontSize/ascent; tx.translate(x,y+fontSize); //System.out.println("Scale="+scale); tx.scale(scale,-scale); tx.translate(0,ascent); for(inti=0;i<text.length();i++){ //gettheindexfortheneededglyph intindex=encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shapeshape=glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx),false); tx.translate(hmTable.getAdvanceWidth(index),0); } //System.out.println("Drawingstring..."+gp+",bounds"+gp.getBounds()); g.draw(gp); }catch(IOExceptionex){ log.error("Errordrawingtext",ex); } }
| 15,280
|
public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizontalHeaderTable(); final TTFHorizontalMetricsTable hmTable = fontData.getHorizontalMetricsTable(); if (!(cmapTable.getNrEncodingTables() > 0)) { throw new RuntimeException("No Encoding is found!"); } final TTFCMapTable.EncodingTable encTable = cmapTable.getEncodingTable(0); if (encTable.getTableFormat() == null) { throw new RuntimeException("The table is NUll!!"); } final int ascent = hheadTable.getAscent(); final AffineTransform tx = new AffineTransform(); final double scale = fontSize / ascent; tx.translate(x, y + fontSize); //System.out.println("Scale=" + scale); tx.scale(scale, -scale); tx.translate(0, ascent); for (int i = 0; i < text.length(); i++) { // get the index for the needed glyph int index = encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shape shape = glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx), false); tx.translate(hmTable.getAdvanceWidth(index), 0); } //System.out.println("Drawing string..." + gp + ", bounds " + gp.getBounds()); g.draw(gp); } catch (IOException ex) { log.error("Error drawing text", ex); } }
|
public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizontalHeaderTable(); final TTFHorizontalMetricsTable hmTable = fontData.getHorizontalMetricsTable(); if (!(cmapTable.getNrEncodingTables() > 0)) { throw new RuntimeException("No Encoding is found!"); } final TTFCMapTable.EncodingTable encTable = cmapTable.getEncodingTable(0); if (encTable.getTableFormat() == null) { throw new RuntimeException("The table is NUll!!"); } final int ascent = hheadTable.getAscent(); final AffineTransform tx = new AffineTransform(); final double scale = fontSize / ascent; tx.translate(x, y + fontSize); //System.out.println("Scale=" + scale); tx.scale(scale, -scale); tx.translate(0, ascent); for (int i = 0; i < text.length(); i++) { // get the index for the needed glyph int index = encTable.getTableFormat().getGlyphIndex(text.charAt(i)); Shape shape = glyphTable.getGlyph(index).getShape(); gp.append(shape.getPathIterator(tx), false); tx.translate(hmTable.getAdvanceWidth(index), 0); } //System.out.println("Drawing string..." + gp + ", bounds " + gp.getBounds()); g.draw(gp); } catch (IOException ex) { log.error("Error drawing text", ex); } }
| 15,281
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
|
public void append(Shape s, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
| 15,282
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
| 15,283
|
public SQLWarning(String message, String SQLState) { super(message, SQLState); }
|
public SQLWarning(String reason, String SQLState, int vendorCode) { super(message, SQLState); }
| 15,284
|
public SQLWarning(String message, String SQLState) { super(message, SQLState); }
|
public SQLWarning(String message, String SQLState) { super(reason, SQLState, vendorCode); }
| 15,285
|
public BigInteger(byte[] val) { if (val == null || val.length < 1) throw new NumberFormatException(); words = byteArrayToIntArray(val, val[0] < 0 ? -1 : 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; }
|
private BigInteger() { if (val == null || val.length < 1) throw new NumberFormatException(); words = byteArrayToIntArray(val, val[0] < 0 ? -1 : 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; }
| 15,286
|
public BigInteger(byte[] val) { if (val == null || val.length < 1) throw new NumberFormatException(); words = byteArrayToIntArray(val, val[0] < 0 ? -1 : 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; }
|
public BigInteger(byte[] val) { if (val == null || val.length < 1) throw new NumberFormatException(); words = byteArrayToIntArray(val, val[0] < 0 ? -1 : 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; }
| 15,287
|
public String toString(int radix) { if (words == null) return Integer.toString(ival, radix); if (ival <= 2) return Long.toString(longValue(), radix); int buf_size = ival * (MPN.chars_per_word(radix) + 1); StringBuffer buffer = new StringBuffer(buf_size); format(radix, buffer); return buffer.toString(); }
|
public String toString() { if (words == null) return Integer.toString(ival, radix); if (ival <= 2) return Long.toString(longValue(), radix); int buf_size = ival * (MPN.chars_per_word(radix) + 1); StringBuffer buffer = new StringBuffer(buf_size); format(radix, buffer); return buffer.toString(); }
| 15,288
|
public String toString(int radix) { if (words == null) return Integer.toString(ival, radix); if (ival <= 2) return Long.toString(longValue(), radix); int buf_size = ival * (MPN.chars_per_word(radix) + 1); StringBuffer buffer = new StringBuffer(buf_size); format(radix, buffer); return buffer.toString(); }
|
public String toString(int radix) { if (words == null) return Integer.toString(ival, radix); if (ival <= 2) return Long.toString(longValue(), radix); int buf_size = ival * (MPN.chars_per_word(radix) + 1); StringBuffer buffer = new StringBuffer(buf_size); format(radix, buffer); return buffer.toString(); }
| 15,289
|
public SimpleDateFormat() { /* * There does not appear to be a standard API for determining * what the default pattern for a locale is, so use package-scope * variables in DateFormatSymbols to encapsulate this. */ super(); Locale locale = Locale.getDefault(); calendar = new GregorianCalendar(locale); computeCenturyStart(); tokens = new Vector(); formatData = new DateFormatSymbols(locale); pattern = (formatData.dateFormats[DEFAULT] + ' ' + formatData.timeFormats[DEFAULT]); compileFormat(pattern); numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); }
|
public SimpleDateFormat() { /* * There does not appear to be a standard API for determining * what the default pattern for a locale is, so use package-scope * variables in DateFormatSymbols to encapsulate this. */ super(); Locale locale = Locale.getDefault(); calendar = new GregorianCalendar(locale); computeCenturyStart(); tokens = new ArrayList(); formatData = new DateFormatSymbols(locale); pattern = (formatData.dateFormats[DEFAULT] + ' ' + formatData.timeFormats[DEFAULT]); compileFormat(pattern); numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); }
| 15,290
|
public final String format (Date date) { StringBuffer sb = new StringBuffer (); format (date, sb, new FieldPosition (MONTH_FIELD)); return sb.toString(); }
|
public final StringBuffer format (Object obj, StringBuffer buf, FieldPosition pos) { StringBuffer sb = new StringBuffer (); format (date, sb, new FieldPosition (MONTH_FIELD)); return sb.toString(); }
| 15,292
|
public final String format (Date date) { StringBuffer sb = new StringBuffer (); format (date, sb, new FieldPosition (MONTH_FIELD)); return sb.toString(); }
|
public final String format (Date date) { StringBuffer sb = new StringBuffer (); format (date, sb, new FieldPosition (MONTH_FIELD)); return sb.toString(); }
| 15,293
|
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
|
private static boolean equals(BigInteger x, BigInteger y) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
| 15,295
|
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
|
public boolean equals(Object obj) { if (x.words == null && y.words == null) return x.ival == y.ival; if (x.words == null || y.words == null || x.ival != y.ival) return false; return equals(this, (BigInteger) obj); }
| 15,296
|
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
|
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; for (int i = x.ival; --i >= 0; ) { if (x.words[i] != y.words[i]) return false; } return true; }
| 15,297
|
public String getDescription() { return descr; }
|
public String getDescription() { return descr; }
| 15,298
|
public int getIconHeight() { return image.getHeight(observer); }
|
public int getIconHeight() { return image.getHeight(observer); }
| 15,299
|
public int getIconWidth() { return image.getWidth(observer); }
|
public int getIconWidth() { return image.getWidth(observer); }
| 15,300
|
public Image getImage() { return image; }
|
public Image getImage() { return image; }
| 15,301
|
public void paintIcon(Component c, Graphics g, int x, int y) { g.drawImage(image, x, y, observer); }
|
public void paintIcon(Component c, Graphics g, int x, int y) { g.drawImage(image, x, y, observer); }
| 15,302
|
public void setDescription(String description) { this.descr = description; }
|
public void setDescription(String description) { this.descr = description; }
| 15,303
|
public void setParent(Component p) { observer = p; }
|
public void setParent(Component p) { observer = p; }
| 15,304
|
public void beginDraggingFrame(JComponent frame);
|
public void beginDraggingFrame(JComponent frame);
| 15,305
|
public void endDraggingFrame(JComponent frame);
|
public void endDraggingFrame(JComponent frame);
| 15,306
|
public void dragFrame(JComponent frame, int x, int y);
|
public void dragFrame(JComponent frame, int x, int y);
| 15,307
|
public void setHorizontalAlignment(int alignment) { hori_align = alignment; }
|
public void setHorizontalAlignment(int alignment) { hori_align = alignment; }
| 15,308
|
public void setHorizontalTextPosition(int textPosition) { hori_text_pos = textPosition; }
|
public void setHorizontalTextPosition(int textPosition) { hori_text_pos = textPosition; }
| 15,309
|
public void setText(String text) { this.text = text; revalidate(); repaint(); }
|
public void setText(String text) { this.text = text; revalidate(); repaint(); }
| 15,310
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.