rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
pushInput(new Input(null, reader, null, systemId, null, null, false, true));
pushInput(new Input(in, null, null, systemId, null, null, false, true));
public XMLParser(Reader reader, String systemId, boolean validating, boolean namespaceAware, boolean coalescing, boolean replaceERefs, boolean externalEntities, boolean supportDTD, boolean bas...
private void dumpDebugInfo() {
final void dumpDebugInfo() {
private void dumpDebugInfo() { log.debug("Debug Dump"); log.debug("CSR0 = " + io.getCSR(0)); // stop the device so we can read all registers io.setCSR(0, CSR0_STOP); bufferManager.dumpData(log); int validVMWareLanceRegs[] = { 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14...
ObjectId oid = new ObjectId(); os.writeInt(oid.size()); os.writeInt(oid.size()); os.writeInt(oid.size()); os.writeInt(new ReferenceTypeId((byte) 0x00).size()); os.writeInt(oid.size());
os.writeInt(ObjectId.SIZE); os.writeInt(ObjectId.SIZE); os.writeInt(ObjectId.SIZE); os.writeInt(ReferenceTypeId.SIZE); os.writeInt(VMFrame.SIZE);
private void executeIDsizes(ByteBuffer bb, DataOutputStream os) throws JdwpException, IOException { ObjectId oid = new ObjectId(); os.writeInt(oid.size()); // fieldId os.writeInt(oid.size()); // methodId os.writeInt(oid.size()); // objectId os.writeInt(new ReferenceTypeId((byte) 0x00).size()); // r...
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return DateTimeAtCompleted.class; }
public final String getName()
public String getName()
public final String getName() { return "date-time-at-completed"; }
DomDoctype doctype = (DomDoctype) getDoctype(); if (doctype == null || !doctype.hasIds() || id == null || id.length() == 0)
if (id == null || id.length() == 0)
public Element getElementById(String id) { DomDoctype doctype = (DomDoctype) getDoctype(); if (doctype == null || !doctype.hasIds() || id == null || id.length() == 0) { return null; } // yes, this is linear in size of document. // it'd be easy enough to maintain a hashtabl...
} } String xmlId = element.getAttribute("xml:id"); if (xmlId == null) { xmlId = element.getAttributeNS(XMLConstants.XML_NS_URI, "id"); } if (id.equals(xmlId)) { return element;
public Element getElementById(String id) { DomDoctype doctype = (DomDoctype) getDoctype(); if (doctype == null || !doctype.hasIds() || id == null || id.length() == 0) { return null; } // yes, this is linear in size of document. // it'd be easy enough to maintain a hashtabl...
header = null; tagTable = null;
protected void finalize() { header = null; tagTable = null; }
throw new Error("not implemented");
public ContainerOrderFocusTraversalPolicy() { throw new Error("not implemented"); }
return null;
if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalArgumentException ("root is not a focus cycle root"); Container ancestor = current.getFocusCycleRoot...
public Component getComponentAfter(Container root, Component current) { return null; }
if ((Component) root == current) root = current.getFocusCycleRootAncestor (); if (current instanceof Window) return getFirstComponent ((Container) current); Container parent = current.getParent (); synchronized (parent.getTreeLock ()) { Component[] components = parent.getComponents (); int componentIndex = 0; int...
public Component getComponentAfter(Container root, Component current) { return null; }
return null;
if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalArgumentException ("root is not a focus cycle root"); Container ancestor = current.getFocusCycleRoot...
public Component getComponentBefore(Container root, Component current) { return null; }
} Component result = getComponentBefore (root, parent); return result; } }
public Component getComponentBefore(Container root, Component current) { return null; }
return null;
return getFirstComponent (root);
public Component getDefaultComponent(Container root) { return null; }
if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = 0; i < componentArray.length; i++) { Component component = componentArray [i]; if (accept (compone...
public Component getFirstComponent(Container root) { return null; }
return downCycle;
return implicitDownCycleTraversal;
public boolean getImplicitDownCycleTraversal() { return downCycle; }
if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = componentArray.length - 1; i >= 0; i--) { Component component = componentArray [i]; if (accept (co...
public Component getLastComponent(Container root) { return null; }
downCycle = value;
implicitDownCycleTraversal = value;
public void setImplicitDownCycleTraversal(boolean value) { downCycle = value; }
POA n = parent.create_POA(child_name, null, policySets.rootPoa());
POA n = parent.create_POA(child_name, null, StandardPolicies.rootPoa());
public boolean unknown_adapter(POA parent, String child_name) { try { POA n = parent.create_POA(child_name, null, policySets.rootPoa()); n.the_POAManager().activate(); } catch (Exception ex) { return false; } return true; }
public void set(int index, byte[] src, int srcOffset, int length) {
public void set(int index, int value) {
public void set(int index, byte[] src, int srcOffset, int length) { if (index >= size) { // Index is beyond my data if (next != null) { next.set(index - size, src, srcOffset, length); } else { throw new IndexOutOfBoundsException("at index " + index); } } else if (index + length <= size) { // All byte...
next.set(index - size, src, srcOffset, length);
next.set(index - size, value);
public void set(int index, byte[] src, int srcOffset, int length) { if (index >= size) { // Index is beyond my data if (next != null) { next.set(index - size, src, srcOffset, length); } else { throw new IndexOutOfBoundsException("at index " + index); } } else if (index + length <= size) { // All byte...
} else if (index + length <= size) { System.arraycopy(src, srcOffset, data, start + index, length);
public void set(int index, byte[] src, int srcOffset, int length) { if (index >= size) { // Index is beyond my data if (next != null) { next.set(index - size, src, srcOffset, length); } else { throw new IndexOutOfBoundsException("at index " + index); } } else if (index + length <= size) { // All byte...
if (next != null) { final int myLength = size - index; System.arraycopy(src, srcOffset, data, start + index, myLength); next.set(index - myLength, src, srcOffset + myLength, length - myLength); } else { throw new IndexOutOfBoundsException("at index " + index); }
data[start + index] = (byte) value;
public void set(int index, byte[] src, int srcOffset, int length) { if (index >= size) { // Index is beyond my data if (next != null) { next.set(index - size, src, srcOffset, length); } else { throw new IndexOutOfBoundsException("at index " + index); } } else if (index + length <= size) { // All byte...
{
public static final IRandom getInstance(String prng) { if (prng == null) { return null; } prng = prng.trim(); IRandom result = null; if (prng.equalsIgnoreCase(MD_PRNG)) { result = new MDGenerator(); } return result; }
}
public static final IRandom getInstance(String prng) { if (prng == null) { return null; } prng = prng.trim(); IRandom result = null; if (prng.equalsIgnoreCase(MD_PRNG)) { result = new MDGenerator(); } return result; }
sLoaders.add(iter.next());
sLoaders.add(cl);
public CombinedClassLoader(Collection a_loaders) { ArrayList sLoaders = new ArrayList(a_loaders.size()); Iterator iter = a_loaders.iterator(); Object cl; while (iter.hasNext()) { cl = iter.next(); if (!sLoaders.contains(cl)) sLoaders.add(iter.next()); } loaders...
if (blinkTimer != null) blinkTimer.stop(); blinkTimer = null;
public void deinstall(JTextComponent c) { textComponent.removeFocusListener(this); textComponent.removeMouseListener(this); textComponent.removeMouseMotionListener(this); textComponent.getDocument().removeDocumentListener(documentListener); documentListener = null; textComponent.removePropertyChang...
setVisible(true);
public void focusGained(FocusEvent event) { // TODO: Implement this properly. }
if (event.isTemporary() == false) setVisible(false);
public void focusLost(FocusEvent event) { // TODO: Implement this properly. }
moveCaret(event);
public void mouseDragged(MouseEvent event) { // FIXME: Implement this properly. }
if (!(event.getButton() == MouseEvent.BUTTON1)) return; setDot(textComponent.viewToModel(event.getPoint()));
positionCaret(event);
public void mousePressed(MouseEvent event) { // FIXME: Implement this properly. if (!(event.getButton() == MouseEvent.BUTTON1)) return; setDot(textComponent.viewToModel(event.getPoint())); }
int newDot = getComponent().viewToModel(event.getPoint()); moveDot(newDot);
protected void moveCaret(MouseEvent event) { // FIXME: Implement this properly. }
adjustVisibility(this);
public void moveDot(int dot) { this.dot = dot; handleHighlight(); repaint(); }
if (textComponent == null)
JTextComponent comp = getComponent(); if (comp == null)
public void paint(Graphics g) { if (textComponent == null) return; int dot = getDot(); Rectangle rect = null; try { rect = textComponent.modelToView(dot); } catch (BadLocationException e) { // This should never happen as dot should be always valid. return; } if (rect == nul...
assert false : "Unexpected bad caret location: " + dot;
public void paint(Graphics g) { if (textComponent == null) return; int dot = getDot(); Rectangle rect = null; try { rect = textComponent.modelToView(dot); } catch (BadLocationException e) { // This should never happen as dot should be always valid. return; } if (rect == nul...
if ((x != rect.x) || (y != rect.y)) { repaint(); x = rect.x; y = rect.y; width = 1; height = rect.height; }
public void paint(Graphics g) { if (textComponent == null) return; int dot = getDot(); Rectangle rect = null; try { rect = textComponent.modelToView(dot); } catch (BadLocationException e) { // This should never happen as dot should be always valid. return; } if (rect == nul...
int newDot = getComponent().viewToModel(event.getPoint()); setDot(newDot);
protected void positionCaret(MouseEvent event) { // FIXME: Implement this properly. }
textComponent.repaint(this);
getComponent().repaint(x, y, width, height);
protected final void repaint() { textComponent.repaint(this); }
if (blinkTimer != null) blinkTimer.setDelay(rate);
public void setBlinkRate(int rate) { blinkRate = rate; }
adjustVisibility(this);
public void setDot(int dot) { this.dot = dot; this.mark = dot; handleHighlight(); repaint(); }
repaint();
if (visible) if (textComponent.isEnabled() && textComponent.isEditable()) { if (blinkTimer == null) initBlinkTimer(); blinkTimer.start(); } else { if (blinkTimer != null) blinkTimer.stop(); } Rectangle area = null; try { area = getComponent().modelToView(getDot()); } catch (BadLocationException ex) { assert false: "Une...
public void setVisible(boolean v) { if (v != visible) { visible = v; repaint(); } }
public void serviceAvailable(BeanContextServiceAvailableEvent event);
void serviceAvailable(BeanContextServiceAvailableEvent event);
public void serviceAvailable(BeanContextServiceAvailableEvent event);
private void convertColorModelToDefault(int x, int y, int w, int h, ColorModel model, int pixels[], int offset, int scansize) { int xp, yp; for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[offset + yp * scansize + xp] = makeColorbyDefaultCM(pixels[offset + yp * scansize + xp]);
private int[] convertColorModelToDefault(int x, int y, int w, int h, ColorModel model, byte pixels[], int offset, int scansize) { int intPixels[] = new int[pixels.length]; for (int i = 0; i < pixels.length; i++) intPixels[i] = makeColorbyDefaultCM(model, pixels[i]); return intPixels;
private void convertColorModelToDefault(int x, int y, int w, int h, ColorModel model, int pixels[], int offset, int scansize) { int xp, yp; for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[offset + yp * scansize + xp] = makeColorbyDefaultCM(pixels[offset + yp * scansize + xp]); } ...
} }
private void convertColorModelToDefault(int x, int y, int w, int h, ColorModel model, int pixels[], int offset, int scansize) { int xp, yp; for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[offset + yp * scansize + xp] = makeColorbyDefaultCM(pixels[offset + yp * scansize + xp]); } ...
public void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize) { int xp, yp;
public void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize) { int xp, yp, i;
public void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize) { int xp, yp; for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[off + yp * scansize + xp] = filterRGB(xp, yp, pixels[off + yp * scansize + xp]); } } }
for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[off + yp * scansize + xp] = filterRGB(xp, yp, pixels[off + yp * scansize + xp]); }
i = 0; for( xp = x; xp < ( x + w); xp++ ) for( yp = y; yp < (y + h); yp++ ) { pixels[i] = filterRGB( xp, yp, pixels[i] ); i++;
public void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize) { int xp, yp; for (xp = x; xp < (x + w); xp++) { for (yp = y; yp < (y + h); yp++) { pixels[off + yp * scansize + xp] = filterRGB(xp, yp, pixels[off + yp * scansize + xp]); } } }
private int makeColor(byte a, byte r, byte g, byte b) { return (0xff000000 & (a << 24) | 0xff0000 & (r << 16) | 0xff00 & (b << 8) | 0xff & g);
private int makeColor( byte a, byte r, byte g, byte b ) { return ( 0xff000000 & (a << 24) | 0xff0000 & (r << 16) | 0xff00 & (g << 8) | 0xff & b );
private int makeColor(byte a, byte r, byte g, byte b) { return (0xff000000 & (a << 24) | 0xff0000 & (r << 16) | 0xff00 & (b << 8) | 0xff & g); }
private int makeColorbyDefaultCM(int rgb) { return makeColor(origmodel.getRed(rgb), origmodel.getGreen(rgb), origmodel.getGreen(rgb), origmodel.getBlue(rgb));
private int makeColorbyDefaultCM(ColorModel model, byte rgb) { return makeColor( model.getAlpha( rgb ) * 4, model.getRed( rgb ) * 4, model.getGreen( rgb ) * 4, model.getBlue( rgb ) * 4 );
private int makeColorbyDefaultCM(int rgb) { return makeColor(origmodel.getRed(rgb), origmodel.getGreen(rgb), origmodel.getGreen(rgb), origmodel.getBlue(rgb)); }
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { if (model == origmodel) {
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { if(model == origmodel && (model instanceof IndexColorModel) && canFilterIndexColorModel) {
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { if (model == origmodel) { consumer.setPixels(x, y, w, h, newmodel, pixels, offset, scansize); } else { //FIXME //convert to proper CM int pixelsi[] = new int[pixels.length / 4]; filterRGBPixels(x,...
} else { int pixelsi[] = new int[pixels.length / 4]; filterRGBPixels(x, y, w, h, pixelsi, offset, scansize);
} else { int intPixels[] = convertColorModelToDefault( x, y, w, h, model, pixels, offset, scansize ); filterRGBPixels( x, y, w, h, intPixels, offset, scansize ); consumer.setPixels(x, y, w, h, ColorModel.getRGBdefault(), intPixels, offset, scansize);
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { if (model == origmodel) { consumer.setPixels(x, y, w, h, newmodel, pixels, offset, scansize); } else { //FIXME //convert to proper CM int pixelsi[] = new int[pixels.length / 4]; filterRGBPixels(x,...
return null;
return "CheckBoxMenuItem";
protected String getPropertyPrefix() { return null; }
log.finest("SignerInfo: " + val);
if (Configuration.DEBUG) log.fine("SignerInfo: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" Version: " + version);
log.fine(" Version: " + version);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" IssuerAndSerialNumber: " + val);
if (Configuration.DEBUG) log.fine(" IssuerAndSerialNumber: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" Issuer: " + issuer);
if (Configuration.DEBUG) log.fine(" Issuer: " + issuer);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" SerialNumber: " + serialNumber);
if (Configuration.DEBUG) log.fine(" SerialNumber: " + serialNumber);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" DigestAlgorithmIdentifier: " + val);
if (Configuration.DEBUG) log.fine(" DigestAlgorithmIdentifier: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" digestAlgorithm OID: " + digestAlgorithmId);
if (Configuration.DEBUG) log.fine(" digestAlgorithm OID: " + digestAlgorithmId);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" digestAlgorithm params: "); log.finest(Util.dumpString(digestAlgorithmParams,
if (Configuration.DEBUG) { log.fine(" digestAlgorithm params: "); log.fine(Util.dumpString(digestAlgorithmParams,
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
}
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" AuthenticatedAttributes: "); log.finest(Util.dumpString(authenticatedAttributes,
if (Configuration.DEBUG) { log.fine(" AuthenticatedAttributes: "); log.fine(Util.dumpString(authenticatedAttributes,
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" DigestEncryptionAlgorithmIdentifier: " + val);
if (Configuration.DEBUG) log.fine(" DigestEncryptionAlgorithmIdentifier: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" digestEncryptionAlgorithm OID: " + digestEncryptionAlgorithmId);
if (Configuration.DEBUG) log.fine(" digestEncryptionAlgorithm OID: " + digestEncryptionAlgorithmId);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" digestEncryptionAlgorithm params: "); log.finest(Util.dumpString(digestEncryptionAlgorithmParams,
if (Configuration.DEBUG) { log.fine(" digestEncryptionAlgorithm params: "); log.fine(Util.dumpString(digestEncryptionAlgorithmParams,
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" EncryptedDigest: "); log.finest(Util.dumpString(encryptedDigest, " EncryptedDigest: "));
if (Configuration.DEBUG) { log.fine(" EncryptedDigest: "); log.fine(Util.dumpString(encryptedDigest, " EncryptedDigest: ")); }
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
log.finest(" UnauthenticatedAttributes: "); log.finest(Util.dumpString(unauthenticatedAttributes,
if (Configuration.DEBUG) { log.fine(" UnauthenticatedAttributes: "); log.fine(Util.dumpString(unauthenticatedAttributes,
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); log.finest("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("malformed Ve...
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return Finishings.class; }
public final String getName()
public String getName()
public final String getName() { return "finishings"; }
char c = byteOrder == BIG_ENDIAN ? (char) ((b1 << 8) | b2) : (char) ((b2 << 8) | b1);
char c = (byteOrder == BIG_ENDIAN ? (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF)) : (char) (((b2 & 0xFF) << 8) | (b1 & 0xFF)));
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() int inPos = in.position (); try { while (in.remaining () >= 2) { byte b1 = in.get (); byte b2 = in.get (); // handle byte...
char d = byteOrder == BIG_ENDIAN ? (char) ((b3 << 8) | b4) : (char) ((b4 << 8) | b3);
char d = (byteOrder == BIG_ENDIAN ? (char) (((b3 & 0xFF) << 8) | (b4 & 0xFF)) : (char) (((b4 & 0xFF) << 8) | (b3 & 0xFF)));
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() int inPos = in.position (); try { while (in.remaining () >= 2) { byte b1 = in.get (); byte b2 = in.get (); // handle byte...
consumer.setDimensions(width, height);
srcWidth = width; srcHeight = height; if (destWidth < 0 && destHeight < 0) { destWidth = width; destHeight = height; } else if (destWidth < 0) { destWidth = (int) (width * ((double) destHeight / srcHeight)); } else if (destHeight < 0) { destHeight = (int) (height * ((double) destWidth / srcWidth)); } consumer.setDim...
public void setDimensions(int width, int height) { consumer.setDimensions(width, height); }
consumer.setPixels(x, y, w, h, model, pixels, offset, scansize);
double rx = ((double) srcWidth) / destWidth; double ry = ((double) srcHeight) / destHeight; int destScansize = (int) Math.round(scansize / rx); byte[] destPixels = replicatePixels(x, y, w, h, model, pixels, offset, scansize, rx, ry, destScansize); consumer.setPixels((int) Math.floor(x/rx), (int) Math.floor(y/ry), (i...
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { consumer.setPixels(x, y, w, h, model, pixels, offset, scansize); }
super();
public InvalidDnDOperationException() { }
System.out.println("path: " + path); System.out.println("parents: " + parents);
private int writeParents() throws IOException { int parents; String path = prefs.absolutePath(); int lastslash = path.lastIndexOf("/"); if (lastslash > 0) { path = path.substring(1, lastslash); StringTokenizer st = new StringTokenizer(path); parents = st....
if (components.size() > 0) b.append(" " + components.size() + " extra components.");
public String toString() { StringBuffer b = new StringBuffer(); b.append(host); b.append(":"); b.append(port); b.append(" (v"); b.append(version); b.append(")"); return b.toString(); }
try {
public void _write_no_endian(cdrOutput out) { try { // Write repository id. out.write_string(Id); // Always one profile. out.write_long(1); // It is the Internet profile. out.write_long(Internet_profile.TAG_INTERNET_IOP); // Need to write the Internet profile ...
out.write_long(1);
out.write_long(1 + profiles.size());
public void _write_no_endian(cdrOutput out) { try { // Write repository id. out.write_string(Id); // Always one profile. out.write_long(1); // It is the Internet profile. out.write_long(Internet_profile.TAG_INTERNET_IOP); // Need to write the Internet profile ...
cdrOutput b = out.createEncapsulation();
TaggedProfile tp;
public void _write_no_endian(cdrOutput out) { try { // Write repository id. out.write_string(Id); // Always one profile. out.write_long(1); // It is the Internet profile. out.write_long(Internet_profile.TAG_INTERNET_IOP); // Need to write the Internet profile ...
Internet.version.write(b); b.write_string(Internet.host); b.write_ushort((short) (Internet.port & 0xFFFF)); b.write_long(key.length); b.write(key); b.write_long(1); b.write_long(CodeSets_profile.TAG_CODE_SETS); CodeSets.write(b); b.close(); } catch (IOException ex)
for (int i = 0; i < profiles.size(); i++)
public void _write_no_endian(cdrOutput out) { try { // Write repository id. out.write_string(Id); // Always one profile. out.write_long(1); // It is the Internet profile. out.write_long(Internet_profile.TAG_INTERNET_IOP); // Need to write the Internet profile ...
Unexpected.error(ex);
tp = (TaggedProfile) profiles.get(i); TaggedProfileHelper.write(out, tp);
public void _write_no_endian(cdrOutput out) { try { // Write repository id. out.write_string(Id); // Always one profile. out.write_long(1); // It is the Internet profile. out.write_long(Internet_profile.TAG_INTERNET_IOP); // Need to write the Internet profile ...
b.append(CodeSets);
b.append(Internet.CodeSets);
public String toString() { StringBuffer b = new StringBuffer(); b.append(Id); b.append(" at "); b.append(Internet); if (!Big_Endian) b.append(" (Little endian) "); b.append(" Key "); for (int i = 0; i < key.length; i++) { b.append(Integer.toHexString(key [ i ] & 0xFF)); } ...
return false;
return !comboBox.isEditable() && comboBox.isEnabled();
public boolean isFocusTraversable() { return false; }
Rectangle bounds = getBounds(); int x = (bounds.width - comboIcon.getIconWidth()) / 2; int y = (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, x, y);
iconX = getWidth() / 2 - iconWidth / 2; iconY = getHeight() / 2 - iconHeight / 2;
public void paintComponent(Graphics g) { super.paintComponent(g); if (iconOnly) { Rectangle bounds = getBounds(); int x = (bounds.width - comboIcon.getIconWidth()) / 2; int y = (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, x, y); } ...
Object selected = comboBox.getModel().getSelectedItem(); if (selected == null) selected = ""; Rectangle bounds = comboBox.getBounds(); Rectangle innerArea = SwingUtilities.calculateInnerArea(this, null); Insets insets = comboBox.getInsets(); Rectangle renderArea = new Rectangle(innerArea.x, innerArea.y, innerArea.width...
iconX = x1 + (w - 1) - iconWidth; iconY = y1 + (y2 - y1) / 2 - iconHeight / 2; } comboIcon.paintIcon(this, g, iconX, iconY); if (this.hasFocus())
public void paintComponent(Graphics g) { super.paintComponent(g); if (iconOnly) { Rectangle bounds = getBounds(); int x = (bounds.width - comboIcon.getIconWidth()) / 2; int y = (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, x, y); } ...
g.drawRect(innerArea.x, innerArea.y - 1, innerArea.width - 1, innerArea.height);
g.drawRect(x1 - 1, y1 - 1, w + 3, h + 1); }
public void paintComponent(Graphics g) { super.paintComponent(g); if (iconOnly) { Rectangle bounds = getBounds(); int x = (bounds.width - comboIcon.getIconWidth()) / 2; int y = (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, x, y); } ...
int iconX = bounds.width - insets.right - comboIcon.getIconWidth() - 7; int iconY = insets.top + (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, iconX, iconY);
if (! iconOnly && comboBox != null) { ListCellRenderer renderer = comboBox.getRenderer(); boolean pressed = this.getModel().isPressed(); Component comp= renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); comp.setFont(rendererPane.getFont()); if (model.isArmed() && model.isPres...
public void paintComponent(Graphics g) { super.paintComponent(g); if (iconOnly) { Rectangle bounds = getBounds(); int x = (bounds.width - comboIcon.getIconWidth()) / 2; int y = (bounds.height - comboIcon.getIconHeight()) / 2; comboIcon.paintIcon(comboBox, g, x, y); } ...
if (! this.mimeType.toLowerCase().equals(flavor.mimeType.toLowerCase()))
String primary = getPrimaryType(); if (! primary.equals(flavor.getPrimaryType())) return false; String sub = getSubType(); if (! sub.equals(flavor.getSubType()))
public boolean equals(DataFlavor flavor) { if (flavor == null) return false; if (! this.mimeType.toLowerCase().equals(flavor.mimeType.toLowerCase())) return false; if (! this.representationClass.equals(flavor.representationClass)) return false; return true; }
if (primary.equals("text")) if (! isRepresentationClassCharBuffer() && ! isRepresentationClassReader() && representationClass != java.lang.String.class && ! (representationClass.isArray() && representationClass.getComponentType() == Character.TYPE)) { String charset = getParameter("charset"); String otherset = flavor.g...
public boolean equals(DataFlavor flavor) { if (flavor == null) return false; if (! this.mimeType.toLowerCase().equals(flavor.mimeType.toLowerCase())) return false; if (! this.representationClass.equals(flavor.representationClass)) return false; return true; }
idx = value.indexOf(" ");
idx = value.indexOf(";");
private static String getParameter(String paramName, String mimeString) { int idx = mimeString.indexOf(paramName + "="); if (idx == -1) return(null); String value = mimeString.substring(idx + paramName.length() + 1); idx = value.indexOf(" "); if (idx == -1) return(value); else re...
{ String classname = getParameter("class", mimeString); if (classname != null)
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
return tryToLoadClass(classname, classLoader);
return getRepresentationClassFromMimeThrows(mimeString, classLoader);
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
catch(Exception e)
catch(ClassNotFoundException cnfe)
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
iae.initCause(e);
iae.initCause(cnfe);
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
else return java.io.InputStream.class; }
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
if (mimeType.equals(javaFileListFlavor.mimeType) && representationClass.equals(javaFileListFlavor.representationClass))
if (getPrimaryType().equals(javaFileListFlavor.getPrimaryType()) && getSubType().equals(javaFileListFlavor.getSubType()) && javaFileListFlavor.representationClass .isAssignableFrom(representationClass))
public boolean isFlavorJavaFileListType() { if (mimeType.equals(javaFileListFlavor.mimeType) && representationClass.equals(javaFileListFlavor.representationClass)) return true; return false ; }
return representationClass.getName().equals("java.io.InputStream");
return InputStream.class.isAssignableFrom(representationClass);
public boolean isRepresentationClassInputStream() { return representationClass.getName().equals("java.io.InputStream"); }
Class[] interfaces = representationClass.getInterfaces(); int i = 0; while (i < interfaces.length) { if (interfaces[i].getName().equals("java.io.Serializable")) return true; ++i; } return false;
return Serializable.class.isAssignableFrom(representationClass);
public boolean isRepresentationClassSerializable() { Class[] interfaces = representationClass.getInterfaces(); int i = 0; while (i < interfaces.length) { if (interfaces[i].getName().equals("java.io.Serializable")) return true; ++i; } return false; }
final TreeMap diffPackages = new TreeMap();
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map vmFiles = scanJavaFiles(vmDirs); final Map classpathFiles = scanJavaFiles(classpathDirs); final TreeSet allFiles = new TreeSet(); final TreeM...
public TextLayout (String string, Font font, FontRenderContext frc) { AttributedString as = new AttributedString (string); as.addAttribute (TextAttribute.FONT, font);
public TextLayout (AttributedCharacterIterator text, FontRenderContext frc) { AttributedString as = new AttributedString (text);
public TextLayout (String string, Font font, FontRenderContext frc) { AttributedString as = new AttributedString (string); as.addAttribute (TextAttribute.FONT, font); ClasspathToolkit tk = (ClasspathToolkit)(Toolkit.getDefaultToolkit ()); peer = tk.getClasspathTextLayoutPeer(as, frc); }
else { File f = new File(filechooser.getCurrentDirectory(), getFileName()); if (filechooser.isTraversable(f)) { filechooser.setCurrentDirectory(f); filechooser.rescanCurrentDirectory(); } else { filechooser.setSelectedFile(f); filechooser.approveSelection(); closeDialog(); } }
public void actionPerformed(ActionEvent e) { Object obj = null; if (parentPath != null) obj = new String(parentPath + getFileName()); else obj = filechooser.getSelectedFile(); if (obj != null) { File f = filechooser.getFileSystemView().createFileObject(obj.toStri...