rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0)
if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset)
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, to...
System.arraycopy(value, srcOffset, dst, dstOffset, todo);
System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset);
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, to...
|| str_offset < 0 || str_offset + len > str.length)
|| str_offset < 0 || str_offset > str.length - len)
public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len) { if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset + len > str.length) throw new StringIndexOutOfBoundsException(); ensureCapacity_unsynchroni...
count = newLength;
}
public synchronized void setLength(int newLength) { if (newLength < 0) throw new StringIndexOutOfBoundsException(newLength); ensureCapacity_unsynchronized(newLength); while (count < newLength) value[count++] = '\0'; count = newLength; }
public final void setAttributes(KeyEvent ke) {
public final void setAttributes(int keyCode, boolean isShiftDown, boolean isControlDown, boolean isAltDown, boolean isAltGrDown) {
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + ...
keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown();
this.keyCode = keyCode; this.isShiftDown = isShiftDown; this.isControlDown = isControlDown; this.isAltDown = isAltDown; this.isAltGrDown = isAltGrDown;
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + ...
(isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0);
(isAltDown ? 1 : 0);
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + ...
Icon icon = b.getComboIcon();
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidt...
Dimension d = getDisplaySize();
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidt...
return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH);
return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); } else return new Dimension(d.width + insetsW + (d.height + insetsH) - 4, d.height + insetsH + 1);
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidt...
public NetworkArgument(String name, String description) { super(name, description);
public NetworkArgument(String name, String description, boolean multi) { super(name, description, multi);
public NetworkArgument(String name, String description) { super(name, description); }
return Utilities.getTabbedTextWidth(buffer, metrics, 0, this,
return Utilities.getTabbedTextWidth(buffer, metrics, tabBase, this,
private int getLineLength(int line) { Element lineEl = getElement().getElement(line); Segment buffer = getLineBuffer(); try { Document doc = getDocument(); doc.getText(lineEl.getStartOffset(), lineEl.getEndOffset() - lineEl.getStartOffset() - 1, buffe...
Rectangle rect = a.getBounds();
Rectangle rect = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
protected Rectangle lineToRect(Shape a, int line) { // Ensure metrics are up-to-date. updateMetrics(); Rectangle rect = a.getBounds(); int fontHeight = metrics.getHeight(); return new Rectangle(rect.x, rect.y + (line * fontHeight), rect.width, fontHeight); }
int xoffset = Utilities.getTabbedTextWidth(segment, metrics, rect.x,
int xoffset = Utilities.getTabbedTextWidth(segment, metrics, tabBase,
public Shape modelToView(int position, Shape a, Position.Bias b) throws BadLocationException { // Ensure metrics are up-to-date. updateMetrics(); Document document = getDocument(); // Get rectangle of the line containing position. int lineIndex = getElement().getElementIndex(position); Recta...
float tabSizePixels = getTabSize() * metrics.charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels;
float next = x; if (tabSize != 0) { int numTabs = (((int) x) - tabBase) / tabSize; next = tabBase + (numTabs + 1) * tabSize; } return next;
public float nextTabStop(float x, int tabStop) { float tabSizePixels = getTabSize() * metrics.charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels; }
Rectangle rect = s.getBounds();
Rectangle rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds(); tabBase = rect.x;
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge...
Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent();
Element root = getElement();
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge...
for (int i = 0; i < count; i++)
Rectangle clip = g.getClipBounds(); SwingUtilities.computeIntersection(rect.x, rect.y, rect.width, rect.height, clip); int line0 = (clip.y - rect.y) / height; line0 = Math.max(0, Math.min(line0, count - 1)); int line1 = (clip.y + clip.height - rect.y) / height; line1 = Math.max(0, Math.min(line1, count - 1)); int y = r...
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge...
if (hl != null) { Element lineEl = root.getElement(i); if (i == count) hl.paintLayeredHighlights(g, lineEl.getStartOffset(), lineEl.getEndOffset(), s, textComponent, this); else hl.paintLayeredHighlights(g, lineEl.getStartOffset(), lineEl.getEndOffset() - 1, s, textComponent, this); }
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge...
tabSize = getTabSize() * metrics.charWidth('m');
protected void updateMetrics() { Component component = getContainer(); Font font = component.getFont(); if (this.font != font) { this.font = font; metrics = component.getFontMetrics(font); } }
Rectangle rec = a.getBounds();
Rectangle rec = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); tabBase = rec.x; int pos; if ((int) y < rec.y) pos = getStartOffset(); else if ((int) y > rec.y + rec.height) pos = getEndOffset() - 1; else {
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); int end = line.getEndOffset() - 1;
int line = Math.abs(((int) y - rec.y) / metrics.getHeight()); if (line >= root.getElementCount()) pos = getEndOffset() - 1; else { Element lineEl = root.getElement(line); if (x < rec.x) pos = lineEl.getStartOffset(); else if (x > rec.x + rec.width) pos = lineEl.getEndOffset() - 1; else {
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
doc.getText(start, end - start, s);
int p0 = lineEl.getStartOffset(); int p1 = lineEl.getEndOffset(); Segment s = new Segment(); doc.getText(p0, p1 - p0, s); tabBase = rec.x; pos = p0 + Utilities.getTabbedTextOffset(s, metrics, tabBase, (int) x, this, p0);
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
catch (BadLocationException ble)
catch (BadLocationException ex)
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae;
pos = -1; }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos);
} } b[0] = Position.Bias.Forward; return pos;
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. ...
public synchronized long[] allocNew(int nrClusters) throws IOException {
public synchronized long allocNew() throws IOException {
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
long rc[] = new long[nrClusters];
int i; int entryIndex = -1; for (i = lastFreeCluster; i < entries.length; i++) { if (isFreeCluster(entries[i])) { entryIndex=i; break; } } if(entryIndex<0){ for(i = 2; i < lastFreeCluster;i++){ if (isFreeCluster(entries[i])) { entryIndex=i; break; } } } if(entryIndex < 0){ throw new IOException("FAT Full (" + entries....
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc;
return entryIndex;
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
session.grabFocus();
public void addSessionView(String tabText,Session session) { sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount(...
sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus();
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
private void nextSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index < sessionPane.getTabCount() - 1) { sessionPane.setSelectedIndex(++index); sessionPane.setForegroundAt(index,Co...
sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus();
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
private void prevSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index == 0) { sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1); sessionPane.setForegroundAt(sessionPane.g...
((Session)sessionPane.getComponentAt(index)).requestFocus();
((Session)sessionPane.getComponentAt(index)).grabFocus();
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getT...
((Session)sessionPane.getComponentAt(0)).requestFocus();
((Session)sessionPane.getComponentAt(0)).grabFocus();
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getT...
sg.requestFocus();
sg.grabFocus();
public void stateChanged(ChangeEvent e) { JTabbedPane p = (JTabbedPane)e.getSource(); p.setForegroundAt(selectedIndex,Color.black); p.setIconAt(selectedIndex,unfocused); Session sg = (Session)p.getComponentAt(selectedIndex); sg.setVisible(false); sg = (Session)p.getSelectedComponent(); ...
public void drawLine(int lineIndex, Graphics g, int x, int y)
protected void drawLine(int lineIndex, Graphics g, int x, int y)
public void drawLine(int lineIndex, Graphics g, int x, int y) { try { metrics = g.getFontMetrics(); // FIXME: Selected text are not drawn yet. Element line = getDocument().getDefaultRootElement().getElement(lineIndex); drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset()); //drawSelectedTex...
public int getTabSize()
protected int getTabSize()
public int getTabSize() { return 8; }
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null;
public int decrementDimension() { if (dimension == 0) { Log.error(" in DataCube, incrementDimentsion, the dimension is 0"); return 0;
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
return setDimension(new Integer(dim.intValue()-1));
return dimension--;
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
public Number getDimension() { return (Number) ((XMLAttribute) attribHash.get("dimension")).getAttribValue();
public int getDimension() { return dimension;
public Number getDimension() { return (Number) ((XMLAttribute) attribHash.get("dimension")).getAttribValue();}
for(int i = 0; i < axes.size(); i++) {
int stop = axes.size(); for(int i = 0; i < stop; i++) {
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; for(int i = 0; i < axes.size(); i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute attribHash.put("maxDimensionIndex", maxDataIndices); retu...
attribHash.put("maxDimensionIndex", maxDataIndices);
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; for(int i = 0; i < axes.size(); i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute attribHash.put("maxDimensionIndex", maxDataIndices); retu...
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) {
public int incrementDimension(Axis axis) { if (dimension==0) {
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*le...
return setDimension(new Integer(1));
return dimension++;
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*le...
if (dim.intValue() == 1) {
if (dimension == 1) {
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*le...
return setDimension(new Integer(dim.intValue()+1));
return dimension++;
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*le...
attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension");
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href")...
attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE));
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href")...
attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE));
attribHash.put("encoding", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("checksum", new XMLAttribute(null, Constants.NUMBER_TYPE));
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href")...
if (!Utility.isValidDataCompression(strCompression)) return null;
public String setCompression (String strCompression) { return (String) ((XMLAttribute) attribHash.get("compression")).setAttribValue(strCompression); }
String checksum = getChecksum().toString();
Number checksum = getChecksum();
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) ...
writeOut(outputstream, " checksum = \"" + checksum + "\"");
writeOut(outputstream, " checksum = \"" + checksum.toString() + "\"");
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) ...
public BasicStroke()
public BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dashPhase)
public BasicStroke() { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); }
this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0);
if (width < 0.0f ) throw new IllegalArgumentException("width " + width + " < 0"); else if (cap < CAP_BUTT || cap > CAP_SQUARE) throw new IllegalArgumentException("cap " + cap + " out of range [" + CAP_BUTT + ".." + CAP_SQUARE + "]"); else if (miterlimit < 1.0f && join == JOIN_MITER) throw new IllegalArgumentException("...
public BasicStroke() { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); }
double[] p0 = start.last.last(); double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()}; double[] p2 = new double[]{segments[0].P1.getX(), segments[0].P1.getY()}; double[] p3 = segments[0].first(); Point2D p; double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - (p3[0] - p2[0])*(p1[1] - p0[1]); if( det > 0 )...
joinSegments(segments); start.add(segments[0]); end.add(segments[1]);
private void addSegments(Segment[] segments) { double[] p0 = start.last.last(); double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()}; double[] p2 = new double[]{segments[0].P1.getX(), segments[0].P1.getY()}; double[] p3 = segments[0].first(); Point2D p; double det = (p1[0] - p0[0]...
p0 = a.last.last();
p0 = a.last.cp2();
private void capEnd(Segment a, Segment b) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( cap ) { case CAP_BUTT: a.add(new LineSegment(a.last.P2, b.P1)); break; case CAP_SQUARE: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()...
PathIterator pi = s.getPathIterator( new AffineTransform() );
PathIterator pi = s.getPathIterator(null);
public Shape createStrokedShape(Shape s) { PathIterator pi = s.getPathIterator( new AffineTransform() ); if( dash == null ) return solidStroke( pi ); return dashedStroke( pi ); }
GeneralPath out = new GeneralPath(); return out;
FlatteningPathIterator flat = new FlatteningPathIterator(pi, Math.sqrt(width / 3)); double[] coords = new double[2]; double x, y, x0, y0; x = x0 = y = y0 = 0; boolean pathOpen = false; boolean dashOn = true; boolean offsetting = (phase != 0); double distance = 0; int dashIndex = 0; GeneralPath output = new Ge...
private Shape dashedStroke(PathIterator pi) { GeneralPath out = new GeneralPath(); return out; }
private void joinSegments(Segment a, Segment b, Point2D insideP)
private void joinSegments(Segment[] segments)
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.get...
double[] p0, p1; double dx, dy, l; Point2D c1,c2;
double[] p0 = start.last.cp2(); double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()}; double[] p2 = new double[]{segments[0].first.P1.getX(), segments[0].first.P1.getY()}; double[] p3 = segments[0].cp1(); Point2D p;
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.get...
switch( join )
p = lineIntersection(p0[0],p0[1],p1[0],p1[1], p2[0],p2[1],p3[0],p3[1], false); double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - (p3[0] - p2[0])*(p1[1] - p0[1]); if( det > 0 )
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.get...
case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last....
joinInnerSegments(start, segments[0], p); joinOuterSegments(end, segments[1], p);
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.get...
a.add(b);
else { joinInnerSegments(end, segments[1], p); joinOuterSegments(start, segments[0], p); }
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.get...
x = coords[0]; y = coords[1];
x = coords[2]; y = coords[3];
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case...
x = coords[0]; y = coords[1];
x = coords[4]; y = coords[5];
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case...
p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0);
if (x == x0 && y == y0) { joinSegments(new Segment[] { start.first, end.first }); } else { p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width / 2.0);
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case...
output.setWindingRule(GeneralPath.WIND_EVEN_ODD);
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case...
last = last.next;
last = last.next.last;
public void add(Segment newsegment) { last.next = newsegment; last = last.next; }
public LineSegment(Point2D p1, Point2D p2)
public LineSegment(double x1, double y1, double x2, double y2)
public LineSegment(Point2D p1, Point2D p2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone();
P1 = new Point2D.Double(x1, y1); P2 = new Point2D.Double(x2, y2);
public LineSegment(Point2D p1, Point2D p2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2)
public CubicSegment(double x1, double y1, double c1x, double c1y, double c2x, double c2y, double x2, double y2)
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2;
P1 = new Point2D.Double(x1, y1); P2 = new Point2D.Double(x2, y2); cp1 = new Point2D.Double(c1x, c1y); cp2 = new Point2D.Double(c2x, c2y);
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
first = last;
public void reverseAll() { reverse(); Segment v = next; Segment former = this; next = null; while (v != null) { v.reverse(); v.last = this; Segment oldnext = v.next; v.next = former; former = v; v = oldnext; // move to the next in list } }
double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x0, y0, x1, y1); double[] p2 = normal(x2, y2, x3, y3);
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x...
return new Segment[0];
return new Segment[] { segmentTop, segmentBottom };
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x...
protected void resolve() throws PluginException {
protected void resolve(PluginRegistryModel registry) throws PluginException { registry.registerExtensionPoint(this);
protected void resolve() throws PluginException { // Do nothing }
protected void unresolve() throws PluginException {
protected void unresolve(PluginRegistryModel registry) throws PluginException { registry.unregisterExtensionPoint(this);
protected void unresolve() throws PluginException { // Do nothing }
public DoubleSeqHolder(double[] initial_value)
public DoubleSeqHolder()
public DoubleSeqHolder(double[] initial_value) { value = initial_value; typecode.setLength(value.length); }
value = initial_value; typecode.setLength(value.length);
public DoubleSeqHolder(double[] initial_value) { value = initial_value; typecode.setLength(value.length); }
public void append(PathIterator iter, boolean connect)
public void append(Shape s, boolean connect)
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)) { ...
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; cas...
append(s.getPathIterator(null), connect);
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)) { ...
rb.append ('\n');
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldTyp...
try {
FileFieldDef f; StringBuffer sb = new StringBuffer(); for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } }
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field ...
FileFieldDef f; StringBuffer sb = new StringBuffer(); for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) { }
fout.println (sb.toString().toCharArray());
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field ...
if (animationIndex > (numFrames) / 2)
if (animationIndex > numFrames / 2)
protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; if (r == null) r = new Rectangle(); Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); // Recalculate the metrics only when size of the progressbar has changed. if (...
System.out.println("l1 % l2 =" + NumberUtils.hex(l1 % l2)); System.out.println("l1 & l2 =" + NumberUtils.hex(l1 & l2)); System.out.println("l1 | l2 =" + NumberUtils.hex(l1 | l2)); System.out.println("l1 ^ l2 =" + NumberUtils.hex(l1 ^ l2)); System.out.println("l1 >> 3 =" + NumberUtils.hex(l1 >> 3)); System.out.pri...
public static void main(String[] args) { final int i1 = 0x00450078; final int i2 = 0x45007800; System.out.println("i1 % i2=" + NumberUtils.hex(i1 % i2)); System.out.println("i1 & i2=" + NumberUtils.hex(i1 & i2)); System.out.println("i1 | i2=" + NumberUtils.hex(i1 | i2)); System.out.println("i1 ^ i2=" + Numbe...
public final static VmArrayClass getPrimitiveArrayClass(int type) {
public final static VmType getPrimitiveArrayClass(char type) {
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 4:
case 'Z':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 8:
case 'B':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 5:
case 'C':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 9:
case 'S':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 10:
case 'I':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 6:
case 'F':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 11:
case 'J':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
case 7:
case 'D':
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongAr...
{ super();
{
public NoSuchFieldError() { super(); }
public StackOverflowError() { super();
public StackOverflowError() {
public StackOverflowError() { super(); }
public UnknownError(String s) { super(s);
public UnknownError() {
public UnknownError(String s) { super(s); }
public AddressPcEntry(VmMethod method, int pc, int offset) {
public AddressPcEntry(VmMethod method, int pc, int offset, int inlineDepth) {
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; this.pc = (char)pc; this.offset = offset; }
this.inlineDepth = (byte)inlineDepth;
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; this.pc = (char)pc; this.offset = offset; }