rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (selected && isEnabled()) { super.setArmed(true); super.setSelected(true); if (isShowing()) { fireMenuSelected(); int x = 0; int y = 0; if (menuLocation == null) { if (isTopLevelMenu()) y = this.getHeight(); else x = this.getWidth(); getPopupMenu().show(this, x, y); } else getPopupMenu().show(this, me...
setSelectedHelper(selected, true, false);
public void setSelected(boolean selected) { // If menu is selected and enabled, activates the menu and // displays associated popup. if (selected && isEnabled()) { super.setArmed(true); super.setSelected(true); // FIXME: The reference implementation behaves different here. When // calling setSelec...
public BERReader(InputStream in)
public BERReader(byte[] in)
public BERReader(InputStream in) { super(in); }
public BEREncodingException (String msg)
public BEREncodingException()
public BEREncodingException (String msg) { super (msg); }
super (msg);
super ();
public BEREncodingException (String msg) { super (msg); }
return (data == null) ? "null\n" : dumpString(data, 0, data.length, m);
if (data == null) { return m + "null\n"; } StringBuffer sb = new StringBuffer(length * 3); if (length > 32) { sb.append(m).append("Hexadecimal dump of ").append(length).append( " bytes...\n"); } int end = offset + length; String s; int l = Integer.toString(length).length(); if (l < 4) { l = 4; } for (; offset < end; o...
public static String dumpString(byte[] data, String m) { return (data == null) ? "null\n" : dumpString(data, 0, data.length, m); }
if (DEBUG) debug("SignerInfo: " + val);
log.finest("SignerInfo: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" Version: " + version);
log.finest(" Version: " + version);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" IssuerAndSerialNumber: " + val);
log.finest(" IssuerAndSerialNumber: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" Issuer: " + issuer);
log.finest(" Issuer: " + issuer);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" SerialNumber: " + serialNumber);
log.finest(" SerialNumber: " + serialNumber);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" DigestAlgorithmIdentifier: " + val);
log.finest(" DigestAlgorithmIdentifier: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" OID: " + digestAlgorithmId);
log.finest(" digestAlgorithm OID: " + digestAlgorithmId);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if(DEBUG) debug(" params: " + (digestAlgorithmParams == null ? null : new BigInteger(digestAlgorithmParams).toString(16)));
log.finest(" digestAlgorithm params: "); log.finest(Util.dumpString(digestAlgorithmParams, " digestAlgorithm params: "));
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" AuthenticatedAttributes: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" DigestEncryptionAlgorithmIdentifier: " + val);
log.finest(" DigestEncryptionAlgorithmIdentifier: " + val);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" OID: " + digestEncryptionAlgorithmId);
log.finest(" digestEncryptionAlgorithm OID: " + digestEncryptionAlgorithmId);
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if(DEBUG) debug(" params: " + (digestEncryptionAlgorithmParams == null ? null : new BigInteger(digestEncryptionAlgorithmParams).toString(16)));
log.finest(" digestEncryptionAlgorithm params: "); log.finest(Util.dumpString(digestEncryptionAlgorithmParams, " digestEncryptionAlgorithm params: "));
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
if (DEBUG) debug(" EncryptedDigest: " + new BigInteger(1, encryptedDigest).toString(16));
log.finest(" EncryptedDigest: "); log.finest(Util.dumpString(encryptedDigest, " EncryptedDigest: "));
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
log.finest(" UnauthenticatedAttributes: "); log.finest(Util.dumpString(unauthenticatedAttributes, " UnauthenticatedAttributes: "));
public SignerInfo(BERReader ber) throws IOException { DERValue val = ber.read(); if (DEBUG) debug("SignerInfo: " + val); if (!val.isConstructed()) throw new BEREncodingException("malformed SignerInfo"); val = ber.read(); if (val.getTag() != BER.INTEGER) throw new BEREncodingException("m...
volatile boolean mouseDown = false;
volatile boolean mouseDown;
protected void installNextButtonListeners(Component c) { c.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (! spinner.isEnabled()) return; increment(); timer.setInitialDelay(500); timer.start(); } public void mouseReleased(MouseEvent evt) ...
volatile boolean mouseDown = false;
volatile boolean mouseDown;
protected void installPreviousButtonListeners(Component c) { c.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (! spinner.isEnabled()) return; decrement(); timer.setInitialDelay(500); timer.start(); } public void mouseReleased(MouseEvent evt...
throw new IllegalArgumentException("Wrong key type");
throw new InvalidParameterException("Wrong key type");
public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof GnuRSAPrivateKey)) throw new IllegalArgumentException("Wrong key type"); GnuRSAPrivateKey pk = (GnuRSAPrivateKey) key; BigInteger n = pk.getN(); BigInteger e = pk.getE(); BigInteger d = pk.getPrivateExponent(); BigInteger p...
public ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue)
public ObjectReferenceTemplateHolder()
public ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue) { value = initialValue; }
value = initialValue;
public ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue) { value = initialValue; }
scrollTimer = new Timer(); scrollTimer.setDelay(200);
scrollTimer = new Timer(200, null);
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JSlider) { slider = (JSlider) c; focusRect = new Rectangle(); contentRect = new Rectangle(); thumbRect = new Rectangle(); trackRect = new Rectangle(); tickRect = new Rectangle(); labelRect = new Rectangle(); insetCache = slider.get...
generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s;
GeneralTypeCode g; RecordTypeCode r; RecordTypeCode.Field f; StringTypeCode s;
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
primitiveArrayTypeCode p = new primitiveArrayTypeCode(kind);
ArrayTypeCode p = new ArrayTypeCode(kind);
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
s = new stringTypeCode(kind);
s = new StringTypeCode(kind);
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
fixedTypeCode fx = new fixedTypeCode();
FixedTypeCode fx = new FixedTypeCode();
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
g = new generalTypeCode(kind);
g = new GeneralTypeCode(kind);
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
r = new recordTypeCode(kind);
r = new RecordTypeCode(kind);
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
rt = new primitiveTypeCode(kind);
rt = new PrimitiveTypeCode(kind);
public static TypeCode read(org.omg.CORBA.portable.InputStream in) throws BadKind, Bounds { TCKind kind = TCKind.from_int(in.read_long()); TypeCode rt; generalTypeCode g; recordTypeCode r; recordTypeCode.Field f; stringTypeCode s; int n; switch (kind.value()) { ...
height += (ndim.height + sdim.height + (vgap * 2) + ins.top + ins.bottom);
int addedHeight = height + (ndim.height + sdim.height + (vgap * 2) + ins.top + ins.bottom); if (addedHeight < height) height = Integer.MAX_VALUE; else height = addedHeight;
calcSize(Container target, int what){ synchronized (target.getTreeLock ()) { Insets ins = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Componen...
/*if (stylesheet.debug)
if (stylesheet.debug)
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); String value; if (ret instanceof Collection) { StringBuffer buf = new StringBuf...
}*/
}
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); String value; if (ret instanceof Collection) { StringBuffer buf = new StringBuf...
ColorPaintContext(int c)
ColorPaintContext(int colorRGB)
ColorPaintContext(int c) { color = c; }
color = c;
this(ColorModel.getRGBdefault(), colorRGB);
ColorPaintContext(int c) { color = c; }
return ColorModel.getRGBdefault();
return colorModel;
public ColorModel getColorModel() { return ColorModel.getRGBdefault(); }
public Raster getRaster(int x, int y, int w, int h)
public Raster getRaster(int x, int y, int width, int height)
public Raster getRaster(int x, int y, int w, int h) { // XXX Implement. Sun uses undocumented implementation class // sun.awt.image.IntegerInterleavedRaster. throw new Error("not implemented"); }
throw new Error("not implemented");
if( cachedRaster == null || cachedRaster.getWidth() < width || cachedRaster.getHeight() < height) { cachedRaster = new ColorRaster(colorModel, 0, 0, width, height, color); } return cachedRaster.createChild(0 ,0 ,width ,height ,x ,y , null);
public Raster getRaster(int x, int y, int w, int h) { // XXX Implement. Sun uses undocumented implementation class // sun.awt.image.IntegerInterleavedRaster. throw new Error("not implemented"); }
throw new Error("not implemented");
if (enable) eventMask |= AWTEvent.INPUT_ENABLED_EVENT_MASK; else eventMask &= ~AWTEvent.INPUT_ENABLED_EVENT_MASK;
public void enableInputMethods(boolean enable) { // XXX Implement. throw new Error("not implemented"); }
public void resize(Dimension d)
public void resize(int width, int height)
public void resize(Dimension d) { resize (d.width, d.height); }
resize (d.width, d.height);
setBounds(this.x, this.y, width, height);
public void resize(Dimension d) { resize (d.width, d.height); }
public Event (Object target, long when, int id, int x, int y, int key, int modifiers)
public Event (Object target, int id, Object arg)
public Event (Object target, long when, int id, int x, int y, int key, int modifiers) { this.target = target; this.when = when; this.id = id; this.x = x; this.y = y; this.key = key; this.modifiers = modifiers; }
this.when = when; this.id = id; this.x = x; this.y = y; this.key = key; this.modifiers = modifiers;
this.arg = arg;
public Event (Object target, long when, int id, int x, int y, int key, int modifiers) { this.target = target; this.when = when; this.id = id; this.x = x; this.y = y; this.key = key; this.modifiers = modifiers; }
super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement and key pair generator");
super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 " + "Certificates and CRLs, PKIX certificate path validators, " + "Collection cert stores, Diffie-Hellman key agreement and " + "key pair generator");
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement and key pair generator"); AccessController.doPrivileged (new PrivilegedAction() { public Object run(...
public JdwpPacket (JdwpPacket pkt)
public JdwpPacket ()
public JdwpPacket (JdwpPacket pkt) { _id = pkt.getId (); }
_id = pkt.getId ();
public JdwpPacket (JdwpPacket pkt) { _id = pkt.getId (); }
getDescent() { return(1); }
public int getDescent() { return 1; }
getDescent(){ return(1);}
*/ return stack[3].getClassLoader();
ClassLoader getCallingClassLoader() { Class[] stack = getClassContext(); /* for (int i = 0; i < stack.length; i++) { if (stack[i] != Security.class && stack[i] != ResourceBundle.class) return stack[i].getClassLoader(); } return null; */ return stack[3].getClassLoader(); }
Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); if (defaultPropertyName != null && Aproperties[i].getName().equals(defaultPropertyName)) {
Enumeration enum = properties.elements(); while(enum.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor)enum.nextElement(); if(defaultPropertyName != null && Aproperties[i].getName().equals(defaultPropertyName)) {
public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); if (defaultProp...
EventSetDescriptor[] Aevents = new EventSetDescriptor[events.size()]; i = 0; e = events.elements(); while (e.hasMoreElements()) { Aevents[i] = (EventSetDescriptor) e.nextElement(); if (defaultEventName != null && Aevents[i].getName().equals(defaultEventName)) { defaultEvent = i; } i++; } MethodDescriptor[] Amethods = ...
public BeanInfo getBeanInfo() { int defaultProperty = -1; int defaultEvent = -1; PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; Enumeration e = properties.elements(); while (e.hasMoreElements()) { Aproperties[i] = (PropertyDescriptor) e.nextElement(); if (defaultProp...
public JPasswordField(String text)
public JPasswordField()
public JPasswordField(String text) { this(null, text, 0); }
this(null, text, 0);
this(null, null, 0);
public JPasswordField(String text) { this(null, text, 0); }
throw new AssertionError("This should not happen");
throw new AssertionError(ble);
public String getText() { try { return getDocument().getText(0, getDocument().getLength()); } catch (BadLocationException ble) { throw new AssertionError("This should not happen"); } }
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM);
public BufferedImage(int w, int h, int type) { ColorModel cm = null; boolean alpha = false; boolean premultiplied = false; switch (type) { case TYPE_4BYTE_ABGR_PRE: case TYPE_INT_ARGB_PRE: premultiplied = true; case TYPE_INT_ARGB: case TYPE_4BYTE_ABGR: alpha = true; } ColorSpace cs = ColorSpace.getInstance(ColorSpac...
public BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { init(colormodel, writableraster, premultiplied, properties, TYPE_CUSTOM); // TODO: perhaps try to identify type? }
dest = raster.createCompatibleWritableRaster();
dest = raster.createCompatibleWritableRaster(getMinX(), getMinY(), getWidth(),getHeight());
public WritableRaster copyData(WritableRaster dest) { if (dest == null) dest = raster.createCompatibleWritableRaster(); int x = dest.getMinX(); int y = dest.getMinY(); int w = dest.getWidth(); int h = dest.getHeight(); // create a src child that has the right bounds... WritableRaster src = raster.createWrita...
if (src.getSampleModel () instanceof ComponentSampleModel && dest.getSampleModel () instanceof ComponentSampleModel)
public WritableRaster copyData(WritableRaster dest) { if (dest == null) dest = raster.createCompatibleWritableRaster(); int x = dest.getMinX(); int y = dest.getMinY(); int w = dest.getWidth(); int h = dest.getHeight(); // create a src child that has the right bounds... WritableRaster src = raster.createWrita...
else { int samples[] = src.getPixels (x, y, w, h, (int [])null); dest.setPixels (x, y, w, h, samples); }
public WritableRaster copyData(WritableRaster dest) { if (dest == null) dest = raster.createCompatibleWritableRaster(); int x = dest.getMinX(); int y = dest.getMinY(); int w = dest.getWidth(); int h = dest.getHeight(); // create a src child that has the right bounds... WritableRaster src = raster.createWrita...
public Graphics2D createGraphics() { return VMImageUtils.getAPI().createGraphics(this);
public Graphics2D createGraphics() { GraphicsEnvironment env; env = GraphicsEnvironment.getLocalGraphicsEnvironment (); return env.createGraphics (this);
public Graphics2D createGraphics() { return VMImageUtils.getAPI().createGraphics(this); }
public ImageProducer getSource() { final int w = raster.getWidth(); final int h = raster.getHeight(); final int[] pixels = raster.getPixels(0, 0, w, h, (int[])null); return new MemoryImageSource(w, h, getColorModel(), pixels, 0, w);
public ImageProducer getSource() { throw new UnsupportedOperationException("not implemented");
public ImageProducer getSource() { // TODO This should be faster using direct access to raster.getDataBuffer. final int w = raster.getWidth(); final int h = raster.getHeight(); final int[] pixels = raster.getPixels(0, 0, w, h, (int[])null); return new MemoryImageSource(w, h, getColorModel(), pixels, 0, w); }
else { int samples[] = src.getPixels (x, y, w, h, (int [])null); dest.setPixels (x, y, w, h, samples); }
public void setData(Raster src) { int x = src.getMinX(); int y = src.getMinY(); int w = src.getWidth(); int h = src.getHeight(); // create a dest child that has the right bounds... WritableRaster dest = raster.createWritableChild(x, y, w, h, x, y, null // same bands ); // Refer to ComponentDataBlitOp for optim...
public String toString() { return super.toString(); }
public String toString() { StringBuffer buf; buf = new StringBuffer( 120); buf.append("BufferedImage@"); buf.append(Integer.toHexString(hashCode())); buf.append(": type="); buf.append(type); buf.append(' '); buf.append(colorModel); buf.append(' '); buf.append(raster); return buf.toString(); }
public String toString() { // FIXME: implement: return super.toString(); }
public WritableRaster createCompatibleWritableRaster(int x, int y, int w, int h)
public WritableRaster createCompatibleWritableRaster()
public WritableRaster createCompatibleWritableRaster(int x, int y, int w, int h) { SampleModel sm = getSampleModel().createCompatibleSampleModel(w, h); return new WritableRaster(sm, sm.createDataBuffer(), new Point(x, y)); }
SampleModel sm = getSampleModel().createCompatibleSampleModel(w, h); return new WritableRaster(sm, sm.createDataBuffer(), new Point(x, y));
return new WritableRaster(getSampleModel(), new Point(minX, minY));
public WritableRaster createCompatibleWritableRaster(int x, int y, int w, int h) { SampleModel sm = getSampleModel().createCompatibleSampleModel(w, h); return new WritableRaster(sm, sm.createDataBuffer(), new Point(x, y)); }
ButtonModel model = button.getModel(); model.setArmed(false);
public void focusLost(FocusEvent e) { if (e.getSource() instanceof AbstractButton) { AbstractButton button = (AbstractButton) e.getSource(); ButtonModel model = button.getModel(); model.setArmed(false); if (button.isFocusPainted()) button.repaint(); } }
if (namespaceAware)
if (namespaceAware && !namespaces.isEmpty())
public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba...
if (baseAware)
if (baseAware && !bases.isEmpty())
public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba...
int textIconGap = 4; Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = editingComponent.getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel(((JComponent) editingComponent), fm, ((JTextField) editingComponent).getText(), editingIcon, ...
Rectangle tr = tree.getPathBounds(lastPath); if (tr != null) { Insets i = ((DefaultTextField) editingComponent).getBorder() .getBorderInsets(this); int textIconGap = 3; tr.x -= i.left; if (editingIcon != null) { editingIcon.paintIcon(this, g, tr.x - editingIcon. getIconWidth()/2, tr.y + i.top + i.bottom); tr.x += edi...
public void paint(Graphics g) { int textIconGap = 4; // default value Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = editingComponent.getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel(((...
(new CellRendererPane()).paintComponent(g, editingComponent, this, cr);
public void paint(Graphics g) { int textIconGap = 4; // default value Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = editingComponent.getToolkit().getFontMetrics(getFont()); SwingUtilities.layoutCompoundLabel(((...
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); realEditor = editor; configureEditingComponent(tree, renderer, re...
setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); realEditor = editor; configureEditingComponent(tree, renderer, realEditor); editingContainer = createContainer(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); setFont(defaults.getFont("Tree.font")); setBorderSe...
this(tree, renderer, null);
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); realEditor = editor; configureEditingComponent(tree, renderer, re...
if (tree != null && lastPath != null)
if (lastPath != null && tPath != null && tPath.equals(lastPath)) {
public void actionPerformed(ActionEvent e) { if (tree != null && lastPath != null) tree.startEditingAtPath(lastPath); }
timer.stop(); }
public void actionPerformed(ActionEvent e) { if (tree != null && lastPath != null) tree.startEditingAtPath(lastPath); }
listenerList.add(CellEditorListener.class, listener);
realEditor.addCellEditorListener(listener);
public void addCellEditorListener(CellEditorListener listener) { listenerList.add(CellEditorListener.class, listener); }
if (event == null || (!(event instanceof MouseEvent) && (((MouseEvent) event). getClickCount() > 2 || inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY()))))
if (event == null || !(event instanceof MouseEvent) || (((MouseEvent) event). getClickCount() > 2 && inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY())))
protected boolean canEditImmediately(EventObject event) { if (event == null || (!(event instanceof MouseEvent) && (((MouseEvent) event). getClickCount() > 2 || inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY())))) return true; else if (sho...
else if (shouldStartEditingTimer(event)) startEditingTimer();
protected boolean canEditImmediately(EventObject event) { if (event == null || (!(event instanceof MouseEvent) && (((MouseEvent) event). getClickCount() > 2 || inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY())))) return true; else if (sho...
if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor);
if (editingComponent != null) {
public void cancelCellEditing() { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); timer.stop(); realEditor.cancelCellEditing(); tree.setCellEditor(null); }
tree.setCellEditor(null);
}
public void cancelCellEditing() { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); timer.stop(); realEditor.cancelCellEditing(); tree.setCellEditor(null); }
if (tree != null) { lastPath = tree.getSelectionPath(); if (lastPath != null)
if (tree != null && lastPath != null)
private void configureEditingComponent(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { if (tree != null) { lastPath = tree.getSelectionPath(); if (lastPath != null) { lastR...
lastRow = tree.getRowForPath(lastPath);
private void configureEditingComponent(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { if (tree != null) { lastPath = tree.getSelectionPath(); if (lastPath != null) { lastR...
editingComponent = editor.getTreeCellEditorComponent(tree, val, true, expanded, isLeaf, lastRow); }
if (isLeaf) renderer.setIcon(renderer.getLeafIcon()); else if (expanded) renderer.setIcon(renderer.getOpenIcon()); else renderer.setIcon(renderer.getClosedIcon()); editingIcon = renderer.getIcon(); editingComponent = getTreeCellEditorComponent(tree, val, true, expanded, isLeaf, lastRow);
private void configureEditingComponent(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { if (tree != null) { lastPath = tree.getSelectionPath(); if (lastPath != null) { lastR...
canEdit = true;
protected TreeCellEditor createTreeCellEditor() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( defaults.getBorder("Tree.selectionBorder"))); canEdit = true; return realEditor; }
Component c = realEditor.getTreeCellEditorComponent(tree, value, isSelected,
return realEditor.getTreeCellEditorComponent(tree, value, isSelected,
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) createTreeCellEditor(); Component c = realEditor.getTre...
if (tree != null && editingComponent != null) if (tree.isEditing()) tree.stopEditing(); return c;
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) createTreeCellEditor(); Component c = realEditor.getTre...
Dimension d = editingContainer.getPreferredSize(); int textX = offset;
Rectangle bounds = tree.getPathBounds(lastPath);
protected boolean inHitRegion(int x, int y) { Dimension d = editingContainer.getPreferredSize(); int textX = offset; if (editingIcon != null) textX += editingIcon.getIconWidth() + 4; if ((d.width > textX && x >= textX && x <= d.width) && (y >= 0 && y <= d.height)) return true; ...
if (editingIcon != null) textX += editingIcon.getIconWidth() + 4; if ((d.width > textX && x >= textX && x <= d.width) && (y >= 0 && y <= d.height)) return true; return false;
return bounds.contains(x, y);
protected boolean inHitRegion(int x, int y) { Dimension d = editingContainer.getPreferredSize(); int textX = offset; if (editingIcon != null) textX += editingIcon.getIconWidth() + 4; if ((d.width > textX && x >= textX && x <= d.width) && (y >= 0 && y <= d.height)) return true; ...
if (realEditor.isCellEditable(event))
if (editingComponent != null && realEditor.isCellEditable(event))
public boolean isCellEditable(EventObject event) { // FIXME: add canedit and caneditimmediately to if. if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return ...
if (shouldStartEditingTimer(event)) startEditingTimer();
public boolean isCellEditable(EventObject event) { // FIXME: add canedit and caneditimmediately to if. if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return ...
listenerList.remove(CellEditorListener.class, listener);
realEditor.removeCellEditorListener(listener);
public void removeCellEditorListener(CellEditorListener listener) { listenerList.remove(CellEditorListener.class, listener); }
if (!(event instanceof MouseEvent) && inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY()) && ((MouseEvent) event). getClickCount() == 1)
if ((event instanceof MouseEvent) && ((MouseEvent) event).getClickCount() == 1)
protected boolean shouldStartEditingTimer(EventObject event) { if (!(event instanceof MouseEvent) && inHitRegion(((MouseEvent) event).getX(), ((MouseEvent) event).getY()) && ((MouseEvent) event). getClickCount() == 1) return true; return false; }
if (!timer.isRunning())
protected void startEditingTimer() { if (timer == null) timer = new javax.swing.Timer(1200, this); timer.start(); }
if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (realEditor.stopCellEditing())
if (editingComponent != null && realEditor.stopCellEditing())
public boolean stopCellEditing() { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (realEditor.stopCellEditing()) { timer.stop(); tree.setCellEditor(null); return true; } return false; }
tree.setCellEditor(null);
public boolean stopCellEditing() { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (realEditor.stopCellEditing()) { timer.stop(); tree.setCellEditor(null); return true; } return false; }
TreeSelectionListener[] listeners = tree.getTreeSelectionListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].valueChanged(e);
configureEditingComponent(tree, renderer, realEditor);
public void valueChanged(TreeSelectionEvent e) { lastPath = e.getNewLeadSelectionPath(); lastRow = tree.getRowForPath(lastPath); TreeSelectionListener[] listeners = tree.getTreeSelectionListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].valueChanged(e); }
public abstract boolean isLeaf(Object node);
boolean isLeaf(Object node);
public abstract boolean isLeaf(Object node);
if (!signaturesRead)
if (verify && !signaturesRead)
public synchronized ZipEntry getEntry(String name) { ZipEntry entry = super.getEntry(name); if (entry != null) { JarEntry jarEntry = new JarEntry(entry); Manifest manifest; try { manifest = getManifest(); } catch (IOException ioe) { manifest = null; } if (manifest != null) { jarEntry....
throws NotImplementedException
public RenderableImageProducer(RenderableImage image, RenderContext context) { throw new Error("not implemented"); }
throws NotImplementedException
public void addConsumer(ImageConsumer consumer) { }
throws NotImplementedException
public boolean isConsumer(ImageConsumer consumer) { return false; }