bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); // Update the positions between newGapEnd and (old) gapEnd. The marks // must be shifted by (gapEnd - newGapEnd). int index1 = Collections.binarySearch(positions, new GapContentPosition(gapEnd)); int index2 = Collections.binarySearch(positions, new GapContentPosition(newGapEnd)); if (index1 > 0 && index2 > 0) { int i1 = Math.min(index1, index2); int i2 = Math.max(index1, index2); for (ListIterator i = positions.listIterator(i1); i.hasNext();) { if (i.nextIndex() > i2) break; GapContentPosition p = (GapContentPosition) i.next(); p.mark += gapEnd - newGapEnd; } } if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = newGapStart; gapEnd = newGapEnd; } else { System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart); gapStart = newGapStart; gapEnd = newGapEnd; } }
|
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); // Update the positions between newGapEnd and (old) gapEnd. The marks // must be shifted by (gapEnd - newGapEnd). int index1 = Collections.binarySearch(positions, new GapContentPosition(gapEnd)); int index2 = Collections.binarySearch(positions, new GapContentPosition(newGapEnd)); if (index1 > 0 && index2 > 0) { int i1 = Math.min(index1, index2); int i2 = Math.max(index1, index2); for (ListIterator i = positions.listIterator(i1); i.hasNext();) { if (i.nextIndex() > i2) break; GapContentPosition p = (GapContentPosition) i.next(); p.mark += gapEnd - newGapEnd; } } if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = newGapStart; gapEnd = newGapEnd; } else { System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart); gapStart = newGapStart; gapEnd = newGapEnd; } }
| 899
|
public byte[] encode(final byte[] M) { // a. Generate an octet string PS of length k - mLen - 3 consisting // of pseudo-randomly generated nonzero octets. The length of PS // will be at least eight octets. final byte[] PS = new byte[k - M.length - 3]; // FIXME. This should be configurable, somehow. SecureRandom rnd = new SecureRandom (); rnd.nextBytes(PS); int i = 0; for (; i < PS.length; i++) { if (PS[i] == 0) PS[i] = 1; } // b. Concatenate PS, the message M, and other padding to form an // encoded message EM of length k octets as // // EM = 0x00 || 0x02 || PS || 0x00 || M. return assembleEM(PS, M); }
|
public byte[] encode(final byte[] M) { // a. Generate an octet string PS of length k - mLen - 3 consisting // of pseudo-randomly generated nonzero octets. The length of PS // will be at least eight octets. final byte[] PS = new byte[k - M.length - 3]; // FIXME. This should be configurable, somehow. SecureRandom rnd = new SecureRandom (); rnd.nextBytes(PS); int i = 0; for (; i < PS.length; i++) { if (PS[i] == 0) PS[i] = 1; } // b. Concatenate PS, the message M, and other padding to form an // encoded message EM of length k octets as // // EM = 0x00 || 0x02 || PS || 0x00 || M. return assembleEM(PS, M); }
| 900
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
| 901
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); else { new SecureRandom ().nextBytes(buffer);
| 902
|
public BigInteger add(BigInteger val) { return add(this, val, 1); }
|
private static BigInteger add(int x, int y) { return add(this, val, 1); }
| 903
|
public BigInteger add(BigInteger val) { return add(this, val, 1); }
|
public BigInteger add(BigInteger val) { return valueOf((long) x + (long) y); }
| 904
|
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
|
private static void divide(long x, long y, BigInteger quotient, BigInteger remainder, int rounding_mode) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
| 905
|
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
|
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
| 906
|
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
|
public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); }
| 907
|
public TransformerException(String msg, Throwable cause) { this(msg, null, cause); }
|
public TransformerException(String msg) { this(msg, null, cause); }
| 908
|
public TransformerException(String msg, Throwable cause) { this(msg, null, cause); }
|
public TransformerException(String msg, Throwable cause) { this(msg, null, cause); }
| 909
|
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
| 910
|
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
| 911
|
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
|
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
| 912
|
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getTiledSizeRequirements(childReqs); }
|
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getTiledSizeRequirements(childReqs); }
| 913
|
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
|
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs); }
| 914
|
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { if (! isLayoutValid(axis)) requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); align = requirements[axis].alignment; } return align; }
|
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { if (! isLayoutValid(axis)) requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); align = requirements[axis].alignment; } return align; }
| 915
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
| 916
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
| 917
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
|
public float getMaximumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; }
| 918
|
public float getMinimumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].minimum; }
|
public float getMinimumSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].minimum; }
| 919
|
public float getPreferredSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].preferred; }
|
public float getPreferredSpan(int axis) { if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].preferred; }
| 920
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
| 921
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
| 922
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
| 923
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
|
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { requirements[minorAxis] = calculateMinorAxisRequirements(minorAxis, requirements[minorAxis]); layoutMinorAxis(newSpan[minorAxis], minorAxis, offsets[minorAxis], spans[minorAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[minorAxis] = true; } // Update major axis as appropriate. if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { requirements[myAxis] = calculateMajorAxisRequirements(myAxis, requirements[myAxis]); layoutMajorAxis(newSpan[myAxis], myAxis, offsets[myAxis], spans[myAxis]); span[myAxis] = newSpan[myAxis]; // Update the child view's sizes. for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXIS][i]); } layoutValid[myAxis] = true; } assert layoutValid[myAxis] == true : "Major axis layout must be valid after layout"; assert layoutValid[minorAxis] == true : "Minor axis layout must be valid after layout"; }
| 924
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs, offsets, spans); layoutValid[axis] = true; }
| 925
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, requirements[axis], childReqs[axis], offsets, spans); layoutValid[axis] = true; }
| 926
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targetSpan, null, childReqs, offsets, spans); }
| 927
|
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
| 928
|
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
|
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; }
| 929
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 930
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 931
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 932
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents Color grid = table.getGridColor(); for (int r = r0; r <= rn; ++r) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); Color grid = table.getGridColor(); for (int r = r0; r <= rn; ++r) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 933
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 934
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 935
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 936
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 937
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents int x = left; for (int c = c0; c <= cn; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); int x = left; for (int c = c0; c <= cn; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 938
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 939
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 940
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; int y = top; for (int r = r0; r <= rn; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); int y = top; for (int r = r0; r <= rn; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
| 941
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); } gfx.setColor(save); } }
|
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight() + table.getRowMargin(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; Rectangle bounds = new Rectangle(); // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int halfGapWidth = gap.width / 2; int halfGapHeight = gap.height / 2; for (int r = 0; r < nrows && y < ymax; ++r) { bounds.x = x + halfGapWidth; bounds.y = y + halfGapHeight + 1; bounds.width = width - gap.width + 1; bounds.height = height - gap.height; if (bounds.intersects(clip)) { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c)); } y += height; } x += width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); for (int r = 0; r < nrows && y < ymax; ++r) { y += height; } gfx.setColor(save); } }
| 942
|
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) { x += columnModel.getColumn(i).getWidth(); x += x_gap; } if (includeSpacing) return new Rectangle(x, y, width, height); else return new Rectangle(x, y, width - x_gap, height - y_gap); }
|
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) { x += columnModel.getColumn(i).getWidth(); x += x_gap; } if (includeSpacing) return new Rectangle(x, y, width, height); else return new Rectangle(x, y, width - x_gap, height - y_gap); }
| 943
|
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
|
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { throw new RuntimeException("Unresolved object " + object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
| 945
|
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
|
public int addressOf32(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final int offset = (int) os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
| 946
|
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
|
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { throw new RuntimeException("Unresolved object " + object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
| 947
|
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
|
public long addressOf64(Object object) { final NativeStream.ObjectRef ref = os.getObjectRef(object); try { if (!ref.isResolved()) { builder.emitObject(os, object); } final long offset = os.getBaseAddr() + ref.getOffset(); return offset; } catch (ClassNotFoundException ex) { throw new RuntimeException("Unresolved object ref", ex); } catch (UnresolvedObjectRefException ex) { throw new RuntimeException("Unresolved object ref", ex); } }
| 948
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY)) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { list.setModel((ComboBoxModel) e.getNewValue()); revalidate(); repaint(); } }
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { list.setModel((ComboBoxModel) e.getNewValue()); revalidate(); repaint(); } }
| 949
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY)) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { list.setModel((ComboBoxModel) e.getNewValue()); revalidate(); repaint(); } }
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY)) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue()); revalidate(); repaint(); } }
| 950
|
public void setPopupSize(int width, int height) { super.setSize(width, height); }
|
public void setPopupSize(Dimension size) { super.setSize(width, height); }
| 951
|
public void setPopupSize(int width, int height) { super.setSize(width, height); }
|
public void setPopupSize(int width, int height) { super.setSize(size); }
| 952
|
protected void installKeyboardActions() throws NotImplementedException { // FIXME: implement }
|
protected void installKeyboardActions() { // FIXME: implement }
| 953
|
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: implement. }
|
protected void uninstallKeyboardActions() { // FIXME: implement. }
| 955
|
public AbstractAction(String name) { this(name, null); // TODO: default icon?? }
|
public AbstractAction() { this(name, null); // TODO: default icon?? }
| 957
|
public AbstractAction(String name) { this(name, null); // TODO: default icon?? }
|
public AbstractAction(String name) { this(""); // TODO: default icon?? }
| 958
|
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of seconds pass. The 'delay' property of this menu indicates // this amount of seconds. 'delay' property is 0 by default. if (this.isShowing()) { fireMenuSelected(); int x = 0; int y = 0; if (menuLocation == null) { // Calculate correct position of the popup. Note that location of the popup // passed to show() should be relative to the popup's invoker if (isTopLevelMenu()) y = this.getHeight(); else x = this.getWidth(); getPopupMenu().show(this, x, y); } else getPopupMenu().show(this, menuLocation.x, menuLocation.y); } } else { super.setSelected(false); super.setArmed(false); fireMenuDeselected(); popupMenu.setVisible(false); } }
|
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected && isEnabled()) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of seconds pass. The 'delay' property of this menu indicates // this amount of seconds. 'delay' property is 0 by default. if (this.isShowing()) { fireMenuSelected(); int x = 0; int y = 0; if (menuLocation == null) { // Calculate correct position of the popup. Note that location of the popup // passed to show() should be relative to the popup's invoker if (isTopLevelMenu()) y = this.getHeight(); else x = this.getWidth(); getPopupMenu().show(this, x, y); } else getPopupMenu().show(this, menuLocation.x, menuLocation.y); } } else { super.setSelected(false); super.setArmed(false); fireMenuDeselected(); popupMenu.setVisible(false); } }
| 959
|
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of seconds pass. The 'delay' property of this menu indicates // this amount of seconds. 'delay' property is 0 by default. if (this.isShowing()) { fireMenuSelected(); int x = 0; int y = 0; if (menuLocation == null) { // Calculate correct position of the popup. Note that location of the popup // passed to show() should be relative to the popup's invoker if (isTopLevelMenu()) y = this.getHeight(); else x = this.getWidth(); getPopupMenu().show(this, x, y); } else getPopupMenu().show(this, menuLocation.x, menuLocation.y); } } else { super.setSelected(false); super.setArmed(false); fireMenuDeselected(); popupMenu.setVisible(false); } }
|
public void setSelected(boolean selected) { // if this menu selection is true, then activate this menu and // display popup associated with this menu if (selected) { super.setArmed(true); super.setSelected(true); // FIXME: The popup menu should be shown on the screen after certain // number of seconds pass. The 'delay' property of this menu indicates // this amount of seconds. 'delay' property is 0 by default. if (isShowing()) { fireMenuSelected(); int x = 0; int y = 0; if (menuLocation == null) { // Calculate correct position of the popup. Note that location of the popup // passed to show() should be relative to the popup's invoker if (isTopLevelMenu()) y = this.getHeight(); else x = this.getWidth(); getPopupMenu().show(this, x, y); } else getPopupMenu().show(this, menuLocation.x, menuLocation.y); } } else { super.setSelected(false); super.setArmed(false); fireMenuDeselected(); popupMenu.setVisible(false); } }
| 960
|
public WindowBar() { this.list = new JList(); this.model = new DefaultListModel(); this.wrappers = new HashMap<JInternalFrame, FrameWrapper>(); list.setModel(model); add(list, BorderLayout.CENTER); }
|
public WindowBar() { this.list = new JList(); this.model = new DefaultListModel(); this.wrappers = new HashMap<JInternalFrame, FrameWrapper>(); list.setModel(model); setLayout(new GridLayout(1, 1)); list.setBorder(new BevelBorder(BevelBorder.LOWERED)); add(list); }
| 961
|
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) { prototypeDisplayValue = newPrototypeDisplayValue; }
|
public void setPrototypeDisplayValue(Object value) { prototypeDisplayValue = newPrototypeDisplayValue; }
| 962
|
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) { prototypeDisplayValue = newPrototypeDisplayValue; }
|
public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) { Object oldValue = prototypeDisplayValue; prototypeDisplayValue = value; firePropertyChange("prototypeDisplayValue", oldValue, value); }
| 963
|
public DefaultComboBoxModel(Object[] items) { list = new Vector(Arrays.asList(items)); }
|
public DefaultComboBoxModel() { list = new Vector(Arrays.asList(items)); }
| 964
|
public DefaultComboBoxModel(Object[] items) { list = new Vector(Arrays.asList(items)); }
|
public DefaultComboBoxModel(Object[] items) { list = new Vector(); }
| 965
|
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { if (changeSupport != null) changeSupport.firePropertyChange(propertyName, new Boolean(oldValue), new Boolean(newValue)); }
|
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { if (changeSupport != null) changeSupport.firePropertyChange(propertyName, new Boolean(oldValue), new Boolean(newValue)); }
| 966
|
public SwingPropertyChangeSupport(Object source) { super(source); this.source = source; this.listeners = new EventListenerList(); this.propertyListeners = new Hashtable(); }
|
public SwingPropertyChangeSupport(Object source) { super(source); this.source = source; this.listeners = new EventListenerList(); this.propertyListeners = new HashMap(); }
| 967
|
public void setRect(double x, double y, double width, double height) { this.x = (int) x; this.y = (int) y; this.width = (int) width; this.height = (int) height; }
|
public void setRect(double x, double y, double width, double height) { this.x = (int) x; this.y = (int) y; this.width = (int) width; this.height = (int) height; }
| 968
|
public PropertyChangeListener[] getPropertyChangeListeners(String property) { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(property); }
|
public PropertyChangeListener[] getPropertyChangeListeners() { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(property); }
| 969
|
public PropertyChangeListener[] getPropertyChangeListeners(String property) { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(property); }
|
public PropertyChangeListener[] getPropertyChangeListeners(String property) { return changeSupport == null ? new PropertyChangeListener[0] : changeSupport.getPropertyChangeListeners(); }
| 970
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
| 971
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
| 972
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
| 973
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
|
public synchronized PropertyChangeListener[] getPropertyChangeListeners( String propertyName) { EventListenerList list = (EventListenerList) propertyListeners.get(propertyName); if (list == null) return getPropertyChangeListeners(); int size = listeners.getListenerCount() + list.getListenerCount(); PropertyChangeListener[] result = new PropertyChangeListener[size]; // copy in the general listeners int index = 0; for (int i = 0; i < listeners.listenerList.length; i += 2) { result[index++] = (PropertyChangeListener) listeners.listenerList[i + 1]; } // copy in the specific listeners Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; } return result; }
| 974
|
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); Rectangle clip = g.getClipBounds(); g.fillRect(clip.x, clip.y, clip.width, clip.height); } paint(g, c); }
|
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); Rectangle clip = g.getClipBounds(); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } paint(g, c); }
| 975
|
public FileArgument(String name, String description) { super(name, description, SINGLE); }
|
public FileArgument(String name, String description) { super(name, description, SINGLE); }
| 976
|
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
|
public void setIndeterminate(boolean flag) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
| 977
|
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
|
public void setIndeterminate(boolean newValue) { if (indeterminate != flag) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
| 978
|
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
|
public void setIndeterminate(boolean newValue) { if (indeterminate != newValue) { boolean olddeter = indeterminate; indeterminate = newValue; firePropertyChange("indeterminate", olddeter, indeterminate); } }
| 979
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
| 980
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
| 981
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
|
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.height = fontHeight; calcRect.height += insets.top + insets.bottom; return calcRect.height; }
| 982
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
| 983
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
| 984
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
|
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); calcRect = tr.union(ir); } else calcRect.width = metrics.stringWidth(tabPane.getTitleAt(tabIndex)); calcRect.width += insets.left + insets.right; return calcRect.width; }
| 985
|
protected Rectangle getTabBounds(int tabIndex, Rectangle dest) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
|
public Rectangle getTabBounds(JTabbedPane pane, int i) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
| 986
|
protected Rectangle getTabBounds(int tabIndex, Rectangle dest) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
|
protected Rectangle getTabBounds(int tabIndex, Rectangle dest) { dest.setBounds(getTabBounds(tabPane, tabIndex)); return dest; }
| 987
|
public Dimension getPreferredSize() { Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h); }
|
public Dimension getPreferredSize() { Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h); }
| 988
|
public void expandPath(TreePath path) { // Don't expand if last path component is a leaf node. if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent()))) return; try { fireTreeWillExpand(path); } catch (ExpandVetoException ev) { // We do nothing if attempt has been vetoed. } setExpandedState(path, true); fireTreeExpanded(path); }
|
public void expandPath(TreePath path) { // Don't expand if last path component is a leaf node. if (path == null) return; try { fireTreeWillExpand(path); } catch (ExpandVetoException ev) { // We do nothing if attempt has been vetoed. } setExpandedState(path, true); fireTreeExpanded(path); }
| 989
|
public void scrollPathToVisible(TreePath path) { if (path == null) return; Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByAddingChild(oPath[i++]); else { stop = true; break; } makeVisible(temp); } Rectangle rect = getPathBounds(path); scrollRectToVisible(rect); setSelectionPath(temp); }
|
public void scrollPathToVisible(TreePath path) { if (path == null) return; Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByAddingChild(oPath[i++]); else { stop = true; break; } makeVisible(temp); } Rectangle rect = getPathBounds(path); scrollRectToVisible(rect); revalidate(); repaint(); }
| 990
|
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) { setRoot(root); this.asksAllowsChildren = asksAllowsChildren; }
|
public DefaultTreeModel(TreeNode root) { setRoot(root); this.asksAllowsChildren = asksAllowsChildren; }
| 991
|
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) { setRoot(root); this.asksAllowsChildren = asksAllowsChildren; }
|
public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) { setRoot(root); }
| 992
|
protected URLConnection(URL url) { // Set up all our instance variables this.url = url; allowUserInteraction = def_allow_user_inter; useCaches = def_use_caches; req_props = new Hashtable(def_req_props); }
|
protected URLConnection(URL url) { // Set up all our instance variables this.url = url; allowUserInteraction = def_allow_user_inter; useCaches = def_use_caches; req_props = new Hashtable(def_req_props); }
| 993
|
public boolean getAllowUserInteraction() { return (allowUserInteraction); }
|
public boolean getAllowUserInteraction() { return (allowUserInteraction); }
| 994
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
| 995
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
| 996
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
| 997
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
|
public Object getContent() throws IOException { // connect(); String type = getContentType(); // First try the factory ContentHandler ch = null; if (factory != null) ch = factory.createContentHandler(type); if (ch != null) return (ch.getContent(this)); // Then try our default class try { Class cls = Class.forName("gnu.java.net.content." + type.replace('/', '.')); Object obj = cls.newInstance(); if (!(obj instanceof ContentHandler)) throw new UnknownServiceException(type); ch = (ContentHandler) obj; return (ch.getContent(this)); } catch (ClassNotFoundException e) { // Do nothing } catch (InstantiationException e) { // Do nothing } catch (IllegalAccessException e) { // Do nothing } throw new UnknownServiceException(type); }
| 998
|
public String getContentEncoding() { return (getHeaderField("content-encoding")); }
|
public String getContentEncoding() { return (getHeaderField("content-encoding")); }
| 999
|
public int getContentLength() { return (getHeaderFieldInt("content-length", -1)); }
|
public int getContentLength() { return (getHeaderFieldInt("content-length", -1)); }
| 1,000
|
public String getContentType() { String type = getHeaderField("content-type"); if (type == null) type = guessContentTypeFromName(getURL().getFile()); return (type); }
|
public String getContentType() { String type = getHeaderField("content-type"); if (type == null) type = guessContentTypeFromName(getURL().getFile()); return (type); }
| 1,001
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.