rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
maxHeight = 0; | public void treeCollapsed(TreeExpansionEvent event) { validCachedPreferredSize = false; treeState.setExpandedState(event.getPath(), false); tree.revalidate(); tree.repaint(); } | |
maxHeight = 0; | public void treeExpanded(TreeExpansionEvent event) { validCachedPreferredSize = false; treeState.setExpandedState(event.getPath(), true); tree.revalidate(); tree.repaint(); } | |
else { if (nullIcon == null) nullIcon = new Icon() { public int getIconHeight() { return 0; } public int getIconWidth() { return 0; } public void paintIcon(Component c, Graphics g, int x, int y) { } }; return nullIcon; } } | Icon getCurrentControlIcon(TreePath path) { if (tree.isExpanded(path)) return expandedIcon; return collapsedIcon; } | |
totalChildIndent = rightChildIndent + leftChildIndent; | protected void installDefaults() { LookAndFeel.installColorsAndFont(tree, "Tree.background", "Tree.foreground", "Tree.font"); tree.setOpaque(true); rightChildIndent = UIManager.getInt("Tree.rightChildIndent"); leftChildIndent = UIManager.getInt("Tree.leftChildIndent");... | |
updateExpandedDescendants(new TreePath(new Object[] { treeModel.getRoot() })); | public void installUI(JComponent c) { tree = (JTree) c; treeModel = tree.getModel(); prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; is... | |
int rows = treeState.getRowCount(); | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; Rectangle clip = g.getClipBounds(); Insets insets = tree.getInsets(); if (clip != null && treeModel != null) { int startIndex = tree.getClosestRowForLocation(clip.x, clip.y); int endIndex = tree.getClosestRowForLocat... | |
Icon icon = getCurrentControlIcon(path); int iconW = icon.getIconWidth(); | protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boo... | |
bounds.x - iconW/2 - gap, bounds.x - gap); | bounds.x - leftChildIndent - gap, bounds.x - gap); | protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boo... |
TreeCellRenderer dtcr = tree.getCellRenderer(); if (dtcr == null) dtcr = createDefaultCellRenderer(); | TreeCellRenderer dtcr = currentCellRenderer; | protected void paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) { boolean selected = tree.isPathSelected(path); boolean hasI... |
{ if (tree.getCellRenderer() == null) { | currentCellRenderer = tree.getCellRenderer(); | protected void updateRenderer() { if (tree != null) { if (tree.getCellRenderer() == null) { if (currentCellRenderer == null) currentCellRenderer = createDefaultCellRenderer(); tree.setCellRenderer(currentCellRenderer); } } } |
tree.setCellRenderer(currentCellRenderer); | protected void updateRenderer() { if (tree != null) { if (tree.getCellRenderer() == null) { if (currentCellRenderer == null) currentCellRenderer = createDefaultCellRenderer(); tree.setCellRenderer(currentCellRenderer); } } } | |
} } | protected void updateRenderer() { if (tree != null) { if (tree.getCellRenderer() == null) { if (currentCellRenderer == null) currentCellRenderer = createDefaultCellRenderer(); tree.setCellRenderer(currentCellRenderer); } } } | |
poa.servant_locator.postinvoke(object.Id, poa, operation(), cookie.value, object.getServant() | { poa.servant_locator.postinvoke(object.Id, poa, operation(), cookie.value, object.getServant() | public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { if (handler == null) handler = object.getHandler(operation(), cookie, false); cdrBufOutput request_part = new cdrBufOutput(); request_part.setOrb(orb()); if (m_args != null && m_args.count() > 0) { write_paramete... |
} | public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { if (handler == null) handler = object.getHandler(operation(), cookie, false); cdrBufOutput request_part = new cdrBufOutput(); request_part.setOrb(orb()); if (m_args != null && m_args.count() > 0) { write_paramete... | |
catch (ForwardRequest fex) { if (s_intercept) { Forwarding: while (true) { s_info.m_reply_header.reply_status = ReplyHeader.LOCATION_FORWARD; s_info.m_forward_reference = fex.forward; try { s_interceptor.send_other(s_info); break Forwarding; } catch (ForwardRequest fex2) { s_info.m_forward_reference = fex2.forward; fe... | public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { if (handler == null) handler = object.getHandler(operation(), cookie, false); cdrBufOutput request_part = new cdrBufOutput(); request_part.setOrb(orb()); if (m_args != null && m_args.count() > 0) { write_paramete... | |
return attributes.copyAttributes(); | NamedStyle copy = new NamedStyle(); copy.attributes = attributes.copyAttributes(); return copy; | public AttributeSet copyAttributes() { return attributes.copyAttributes(); } |
if (changeEvent == null) changeEvent = new ChangeEvent(this); | protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; ++i) { listeners[i].stateChanged(changeEvent); } } | |
String name = null; if (isDefined(StyleConstants.NameAttribute)) name = getAttribute(StyleConstants.NameAttribute).toString(); | public String getName() { return name; } | |
name = n; fireStateChanged(); | if (n != null) addAttribute(StyleConstants.NameAttribute, n); | public void setName(String n) { name = n; fireStateChanged(); } |
{ attributes = StyleContext.this.addAttribute (attributes, ResolveAttribute, parent); } fireStateChanged(); | addAttribute(StyleConstants.ResolveAttribute, parent); else removeAttribute(StyleConstants.ResolveAttribute); | public void setResolveParent(AttributeSet parent) { if (parent != null) { attributes = StyleContext.this.addAttribute (attributes, ResolveAttribute, parent); } fireStateChanged(); } |
{ return ("[NamedStyle: name=" + name + ", attrs=" + attributes.toString() + "]"); } | { return "NamedStyle:" + getName() + " " + attributes; } | public String toString() { return ("[NamedStyle: name=" + name + ", attrs=" + attributes.toString() + "]"); } |
if (a == null) attrs = new Object[0]; else { | public SmallAttributeSet(AttributeSet a) { if (a == null) attrs = new Object[0]; else { int n = a.getAttributeCount(); int i = 0; attrs = new Object[n * 2]; Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { ... | |
attrs[i++] = a.getAttribute(name); } | attrs[i++] = value; | public SmallAttributeSet(AttributeSet a) { if (a == null) attrs = new Object[0]; else { int n = a.getAttributeCount(); int i = 0; attrs = new Object[n * 2]; Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { ... |
return new SmallAttributeSet(this.attrs); | return this; | public Object clone() { return new SmallAttributeSet(this.attrs); } |
for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(name) && attrs[i+1].equals(value)) return true; } return false; | return value.equals(getAttribute(name)); | public boolean containsAttribute(Object name, Object value) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(name) && attrs[i+1].equals(value)) return true; } return false; } |
while (e.hasMoreElements()) | while (e.hasMoreElements() && res) | public boolean containsAttributes(AttributeSet a) { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object name = e.nextElement(); Object val = a.getAttribute(name); if (!containsAttribute(name, val)) return false; } return t... |
Object val = a.getAttribute(name); if (!containsAttribute(name, val)) return false; | res = a.getAttribute(name).equals(getAttribute(name)); | public boolean containsAttributes(AttributeSet a) { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object name = e.nextElement(); Object val = a.getAttribute(name); if (!containsAttribute(name, val)) return false; } return t... |
return true; | return res; | public boolean containsAttributes(AttributeSet a) { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object name = e.nextElement(); Object val = a.getAttribute(name); if (!containsAttribute(name, val)) return false; } return t... |
return (AttributeSet) clone(); | return this; | public AttributeSet copyAttributes() { return (AttributeSet) clone(); } |
return (obj instanceof AttributeSet) && this.isEqual((AttributeSet)obj); | boolean eq = false; if (obj instanceof AttributeSet) { AttributeSet atts = (AttributeSet) obj; eq = getAttributeCount() == atts.getAttributeCount() && containsAttributes(atts); } return eq; | public boolean equals(Object obj) { return (obj instanceof AttributeSet) && this.isEqual((AttributeSet)obj); } |
for (int i = 0; i < attrs.length; i += 2) | Object att = null; if (key == StyleConstants.ResolveAttribute) att = resolveParent; for (int i = 0; i < attrs.length && att == null; i += 2) | public Object getAttribute(Object key) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(key)) return attrs[i+1]; } // Check the resolve parent, unless we're looking for the // ResolveAttribute, which would cause an infinite loop ... |
return attrs[i+1]; | att = attrs[i + 1]; | public Object getAttribute(Object key) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(key)) return attrs[i+1]; } // Check the resolve parent, unless we're looking for the // ResolveAttribute, which would cause an infinite loop ... |
if (!(key.equals(ResolveAttribute))) | if (att == null) | public Object getAttribute(Object key) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(key)) return attrs[i+1]; } // Check the resolve parent, unless we're looking for the // ResolveAttribute, which would cause an infinite loop ... |
Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(key)); | AttributeSet parent = getResolveParent(); if (parent != null) att = parent.getAttribute(key); | public Object getAttribute(Object key) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(key)) return attrs[i+1]; } // Check the resolve parent, unless we're looking for the // ResolveAttribute, which would cause an infinite loop ... |
return null; | return att; | public Object getAttribute(Object key) { for (int i = 0; i < attrs.length; i += 2) { if (attrs[i].equals(key)) return attrs[i+1]; } // Check the resolve parent, unless we're looking for the // ResolveAttribute, which would cause an infinite loop ... |
return (AttributeSet) getAttribute(ResolveAttribute); | return resolveParent; | public AttributeSet getResolveParent() { return (AttributeSet) getAttribute(ResolveAttribute); } |
return getAttributeCount() == attr.getAttributeCount() | boolean eq; if (attr instanceof SmallAttributeSet) eq = attr == this; else eq = getAttributeCount() == attr.getAttributeCount() | public boolean isEqual(AttributeSet attr) { return getAttributeCount() == attr.getAttributeCount() && this.containsAttributes(attr); } |
return eq; | public boolean isEqual(AttributeSet attr) { return getAttributeCount() == attr.getAttributeCount() && this.containsAttributes(attr); } | |
StringBuffer sb = new StringBuffer(); sb.append("[StyleContext.SmallattributeSet:"); for (int i = 0; i < attrs.length - 1; ++i) | StringBuilder sb = new StringBuilder(); sb.append('{'); for (int i = 0; i < attrs.length; i += 2) | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("[StyleContext.SmallattributeSet:"); for (int i = 0; i < attrs.length - 1; ++i) { sb.append(" ("); sb.append(attrs[i].toString()); sb.append("="); sb.append(attrs[i+1].toString());... |
sb.append(" ("); sb.append(attrs[i].toString()); sb.append("="); sb.append(attrs[i+1].toString()); sb.append(")"); | if (attrs[i + 1] instanceof AttributeSet) { sb.append(attrs[i]); sb.append("=AttributeSet,"); } else { sb.append(attrs[i]); sb.append('='); sb.append(attrs[i + 1]); sb.append(','); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("[StyleContext.SmallattributeSet:"); for (int i = 0; i < attrs.length - 1; ++i) { sb.append(" ("); sb.append(attrs[i].toString()); sb.append("="); sb.append(attrs[i+1].toString());... |
sb.append("]"); | } sb.append("}"); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("[StyleContext.SmallattributeSet:"); for (int i = 0; i < attrs.length - 1; ++i) { sb.append(" ("); sb.append(attrs[i].toString()); sb.append("="); sb.append(attrs[i+1].toString());... |
listenerList = new EventListenerList(); styleTable = new Hashtable(); styleTable.put(DEFAULT_STYLE, defaultStyle); | styles = new NamedStyle(null); addStyle(DEFAULT_STYLE, null); | public StyleContext() { listenerList = new EventListenerList(); styleTable = new Hashtable(); styleTable.put(DEFAULT_STYLE, defaultStyle); } |
public AttributeSet addAttribute(AttributeSet old, Object name, Object value) | public synchronized AttributeSet addAttribute(AttributeSet old, Object name, Object value) | public AttributeSet addAttribute(AttributeSet old, Object name, Object value) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttribute(name, value); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.ad... |
if (old instanceof MutableAttributeSet) | AttributeSet ret; if (old.getAttributeCount() + 1 < getCompressionThreshold()) | public AttributeSet addAttribute(AttributeSet old, Object name, Object value) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttribute(name, value); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.ad... |
((MutableAttributeSet)old).addAttribute(name, value); return old; | search.removeAttributes(search); search.addAttributes(old); search.addAttribute(name, value); reclaim(old); ret = searchImmutableSet(); | public AttributeSet addAttribute(AttributeSet old, Object name, Object value) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttribute(name, value); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.ad... |
MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.addAttribute(name, value); if (mutable.getAttributeCount() >= getCompressionThreshold()) return mutable; else { SmallAttributeSet small = createSmallAttributeSet(mutable); if (sharedAttributeSets.containsKey(small)) small = (SmallAttributeSet) sharedAt... | MutableAttributeSet mas = getMutableAttributeSet(old); mas.addAttribute(name, value); ret = mas; | public AttributeSet addAttribute(AttributeSet old, Object name, Object value) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttribute(name, value); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.ad... |
return ret; | public AttributeSet addAttribute(AttributeSet old, Object name, Object value) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttribute(name, value); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.ad... | |
public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) | public synchronized AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) | public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttributes(attributes); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.add... |
if (old instanceof MutableAttributeSet) | AttributeSet ret; if (old.getAttributeCount() + attributes.getAttributeCount() < getCompressionThreshold()) | public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttributes(attributes); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.add... |
((MutableAttributeSet)old).addAttributes(attributes); return old; | search.removeAttributes(search); search.addAttributes(old); search.addAttributes(attributes); reclaim(old); ret = searchImmutableSet(); | public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttributes(attributes); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.add... |
MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.addAttributes(attributes); if (mutable.getAttributeCount() >= getCompressionThreshold()) return mutable; else { SmallAttributeSet small = createSmallAttributeSet(mutable); if (sharedAttributeSets.containsKey(small)) small = (SmallAttributeSet) sharedAt... | MutableAttributeSet mas = getMutableAttributeSet(old); mas.addAttributes(attributes); ret = mas; | public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttributes(attributes); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.add... |
return ret; | public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).addAttributes(attributes); return old; } else { MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.add... | |
listenerList.add(ChangeListener.class, listener); | styles.addChangeListener(listener); | public void addChangeListener(ChangeListener listener) { listenerList.add(ChangeListener.class, listener); } |
styleTable.put(name, newStyle); | styles.addAttribute(name, newStyle); | public Style addStyle(String name, Style parent) { Style newStyle = new NamedStyle(name, parent); if (name != null) styleTable.put(name, newStyle); return newStyle; } |
return (ChangeListener[]) listenerList.getListeners(ChangeListener.class); | return styles.getChangeListeners(); | public ChangeListener[] getChangeListeners() { return (ChangeListener[]) listenerList.getListeners(ChangeListener.class); } |
if (defaultStyleContext == null) defaultStyleContext = new StyleContext(); | public static StyleContext getDefaultStyleContext() { return defaultStyleContext; } | |
AttributeSet e = createSmallAttributeSet(null); if (sharedAttributeSets.containsKey(e)) e = (AttributeSet) sharedAttributeSets.get(e); else sharedAttributeSets.put(e, e); return e; | return SimpleAttributeSet.EMPTY; | public AttributeSet getEmptySet() { AttributeSet e = createSmallAttributeSet(null); if (sharedAttributeSets.containsKey(e)) e = (AttributeSet) sharedAttributeSets.get(e); else sharedAttributeSets.put(e, e); return e; } |
return staticAttributeKeys.get(key); | return readAttributeKeys.get(key); | public static Object getStaticAttribute(Object key) { if (key == null) return null; return staticAttributeKeys.get(key); } |
return (Style) styleTable.get(name); | return (Style) styles.getAttribute(name); | public Style getStyle(String name) { return (Style) styleTable.get(name); } |
return styleTable.keys(); | return styles.getAttributeNames(); | public Enumeration getStyleNames() { return styleTable.keys(); } |
if (in == null || a == null) return; | int count = in.readInt(); for (int i = 0; i < count; i++) { | public static void readAttributeSet(ObjectInputStream in, MutableAttributeSet a) throws ClassNotFoundException, IOException { if (in == null || a == null) return; Object key = in.readObject(); Object val = in.readObject(); while (key != null && val != null) { Object staticKey = st... |
while (key != null && val != null) | if (readAttributeKeys != null) | public static void readAttributeSet(ObjectInputStream in, MutableAttributeSet a) throws ClassNotFoundException, IOException { if (in == null || a == null) return; Object key = in.readObject(); Object val = in.readObject(); while (key != null && val != null) { Object staticKey = st... |
Object staticKey = staticAttributeKeys.get(key); Object staticVal = staticAttributeKeys.get(val); | Object staticKey = readAttributeKeys.get(key); | public static void readAttributeSet(ObjectInputStream in, MutableAttributeSet a) throws ClassNotFoundException, IOException { if (in == null || a == null) return; Object key = in.readObject(); Object val = in.readObject(); while (key != null && val != null) { Object staticKey = st... |
} | public static void readAttributeSet(ObjectInputStream in, MutableAttributeSet a) throws ClassNotFoundException, IOException { if (in == null || a == null) return; Object key = in.readObject(); Object val = in.readObject(); while (key != null && val != null) { Object staticKey = st... | |
key = in.readObject(); val = in.readObject(); | public static void readAttributeSet(ObjectInputStream in, MutableAttributeSet a) throws ClassNotFoundException, IOException { if (in == null || a == null) return; Object key = in.readObject(); Object val = in.readObject(); while (key != null && val != null) { Object staticKey = st... | |
if (sharedAttributeSets.containsKey(attributes)) sharedAttributeSets.remove(attributes); | cleanupPool(); | public void reclaim(AttributeSet attributes) { if (sharedAttributeSets.containsKey(attributes)) sharedAttributeSets.remove(attributes); } |
if (key != null) staticAttributeKeys.put(key.getClass().getName() + "." + key.toString(), key); | String io = key.getClass().getName() + "." + key.toString(); if (writeAttributeKeys == null) writeAttributeKeys = new Hashtable(); if (readAttributeKeys == null) readAttributeKeys = new Hashtable(); writeAttributeKeys.put(key, io); readAttributeKeys.put(io, key); | public static void registerStaticAttributeKey(Object key) { if (key != null) staticAttributeKeys.put(key.getClass().getName() + "." + key.toString(), key); } |
public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) | public synchronized AttributeSet removeAttribute(AttributeSet old, Object name) | public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) { SmallAttributeSet small = createSmallAttributeSet(old);... |
((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) | AttributeSet ret; if (old.getAttributeCount() - 1 <= getCompressionThreshold()) | public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) { SmallAttributeSet small = createSmallAttributeSet(old);... |
SmallAttributeSet small = createSmallAttributeSet(old); if (!sharedAttributeSets.containsKey(small)) sharedAttributeSets.put(small,small); old = (AttributeSet) sharedAttributeSets.get(small); } return old; | search.removeAttributes(search); search.addAttributes(old); search.removeAttribute(name); reclaim(old); ret = searchImmutableSet(); | public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) { SmallAttributeSet small = createSmallAttributeSet(old);... |
MutableAttributeSet mutable = createLargeAttributeSet(old); mutable.removeAttribute(name); SmallAttributeSet small = createSmallAttributeSet(mutable); if (sharedAttributeSets.containsKey(small)) small = (SmallAttributeSet) sharedAttributeSets.get(small); else sharedAttributeSets.put(small,small); return small; | MutableAttributeSet mas = getMutableAttributeSet(old); mas.removeAttribute(name); ret = mas; | public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) { SmallAttributeSet small = createSmallAttributeSet(old);... |
return ret; | public AttributeSet removeAttribute(AttributeSet old, Object name) { if (old instanceof MutableAttributeSet) { ((MutableAttributeSet)old).removeAttribute(name); if (old.getAttributeCount() < getCompressionThreshold()) { SmallAttributeSet small = createSmallAttributeSet(old);... | |
public AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes) | public synchronized AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes) | public AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes) { return removeAttributes(old, attributes.getAttributeNames()); } |
return removeAttributes(old, attributes.getAttributeNames()); | AttributeSet ret; if (old.getAttributeCount() <= getCompressionThreshold()) { search.removeAttributes(search); search.addAttributes(old); search.removeAttributes(attributes); reclaim(old); ret = searchImmutableSet(); | public AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes) { return removeAttributes(old, attributes.getAttributeNames()); } |
else { MutableAttributeSet mas = getMutableAttributeSet(old); mas.removeAttributes(attributes); ret = mas; } return ret; } | public AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes) { return removeAttributes(old, attributes.getAttributeNames()); } | |
listenerList.remove(ChangeListener.class, listener); | styles.removeChangeListener(listener); | public void removeChangeListener(ChangeListener listener) { listenerList.remove(ChangeListener.class, listener); } |
styleTable.remove(name); | styles.removeAttribute(name); | public void removeStyle(String name) { styleTable.remove(name); } |
Object oldKey = e.nextElement(); Object newKey = getStaticAttribute(oldKey); Object key = (newKey == null) ? oldKey : newKey; | Object key = e.nextElement(); if (key instanceof Serializable) | public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a) throws IOException { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object oldKey = e.nextElement(); Object newKey = getStaticAttribute(oldKey); Object key = (newKey == null) ? oldKey... |
out.writeObject(a.getAttribute(oldKey)); | else { Object io = writeAttributeKeys.get(key); if (io == null) throw new NotSerializableException(key.getClass().getName() + ", key: " + key); out.writeObject(io); } Object val = a.getAttribute(key); Object io = writeAttributeKeys.get(val); if (val instanceof Serializable) out.writeObject(io != null ? io : val); else... | public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a) throws IOException { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object oldKey = e.nextElement(); Object newKey = getStaticAttribute(oldKey); Object key = (newKey == null) ? oldKey... |
out.writeObject(null); out.writeObject(null); | public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a) throws IOException { Enumeration e = a.getAttributeNames(); while (e.hasMoreElements()) { Object oldKey = e.nextElement(); Object newKey = getStaticAttribute(oldKey); Object key = (newKey == null) ? oldKey... | |
if (out != null) | if (out != null && created) | void writeStreamResult(Node node, StreamResult sr, int outputMethod, String encoding) throws IOException { OutputStream out = null; try { out = sr.getOutputStream(); if (out == null) { Writer writer = sr.getWriter(); if (writer != nul... |
private int current = (maxx >= minx && maxy >= miny) ? 6 : 0; | private int current = (maxx <= minx && maxy <= miny) ? 6 : 0; | public PathIterator getPathIterator(final AffineTransform at) { final double minx = getX(); final double miny = getY(); final double maxx = minx + getWidth(); final double maxy = miny + getHeight(); return new PathIterator() { /** Current coordinate. */ private int current = (maxx >= minx... |
return WIND_EVEN_ODD; | return WIND_NON_ZERO; | public PathIterator getPathIterator(final AffineTransform at) { final double minx = getX(); final double miny = getY(); final double maxx = minx + getWidth(); final double maxy = miny + getHeight(); return new PathIterator() { /** Current coordinate. */ private int current = (maxx >= minx... |
return WIND_EVEN_ODD; | return WIND_NON_ZERO; | public int getWindingRule() { return WIND_EVEN_ODD; } |
byte[] result; DERReader der = new DERReader(input); try { DERValue derSignature = der.read(); if (! (derSignature.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong signature field"); result = ((BitString) derSignature.getValue()).toByteArray(); } catch (IOException x) { InvalidParameterExce... | return input; | public Object decodeSignature(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); byte[] result; DERReader der = new DERReader(input); try { DERValue derSignature = der.read(); if (! (derSignature.getValue() instanceof BitString)... |
byte[] sBytes = (byte[]) signature; DERValue derSignature = new DERValue(DER.BIT_STRING, new BitString(sBytes)); byte[] result; ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { DERWriter.write(baos, derSignature); result = baos.toByteArray(); } catch (IOException x) { InvalidParameterException y = new In... | byte[] result = (byte[]) signature; | public byte[] encodeSignature(Object signature) { byte[] sBytes = (byte[]) signature; DERValue derSignature = new DERValue(DER.BIT_STRING, new BitString(sBytes)); byte[] result; ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { DERWrite... |
public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] != null) { refs[1] = refs[1].simplify(); if (refs[1] instanceof Variable) { Variable v = (... | public void doPass2() { refs[0] = refs[0].simplify(); if (refs.length > 1 && refs[1] != null) { refs[1] = refs[1].simplify(); } } | public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] != null) { ref... |
" goto " + getTargetAddress(); | " goto " + getTargetBlock(); | public String toString() { if (condition >= IF_ICMPEQ) { return getAddress() + ": if " + refs[0].toString() + " " + CONDITION_MAP[condition] + " " + refs[1].toString() + " goto " + getTargetAddress(); } else { return getAddress() + ": if " + ... |
CONDITION_MAP[condition] + " goto " + getTargetAddress(); | CONDITION_MAP[condition] + " goto " + getTargetBlock(); | public String toString() { if (condition >= IF_ICMPEQ) { return getAddress() + ": if " + refs[0].toString() + " " + CONDITION_MAP[condition] + " " + refs[1].toString() + " goto " + getTargetAddress(); } else { return getAddress() + ": if " + ... |
rootLogger.setLevel(Level.INFO); | protected LogManager() { if (logManager != null) throw new IllegalStateException("there can be only one LogManager; use LogManager.getLogManager()"); logManager = this; loggers = new java.util.HashMap(); rootLogger = new Logger("", null); addLogger(rootLogger); /* Make sure that Logger.glo... | |
SocketChannelImpl (SelectorProvider provider) throws IOException | public SocketChannelImpl(boolean create) throws IOException | SocketChannelImpl (SelectorProvider provider) throws IOException { super (provider); impl = new PlainSocketImpl(); socket = new NIOSocket (impl, this); configureBlocking(true); } |
super (provider); impl = new PlainSocketImpl(); socket = new NIOSocket (impl, this); configureBlocking(true); | this(new SelectorProviderImpl(), create); | SocketChannelImpl (SelectorProvider provider) throws IOException { super (provider); impl = new PlainSocketImpl(); socket = new NIOSocket (impl, this); configureBlocking(true); } |
if (!isOpen()) throw new ClosedChannelException(); if (isConnected()) throw new AlreadyConnectedException(); if (connectionPending) throw new ConnectionPendingException(); if (!(remote instanceof InetSocketAddress)) throw new UnsupportedAddressTypeException(); if (((InetSocketAddress) remote).isUnresolved()) throw ... | return connect(remote, 0); | public boolean connect (SocketAddress remote) throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (isConnected()) throw new AlreadyConnectedException(); if (connectionPending) throw new ConnectionPendingException(); if (!(remote instanceof InetSocketAddress)) ... |
try { socket.connect (remote, NIOConstants.DEFAULT_TIMEOUT); return true; } catch (SocketTimeoutException e) { connectionPending = true; return false; } } finally { socket.getPlainSocketImpl().setInChannelOperation(false); } } | public boolean connect (SocketAddress remote) throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (isConnected()) throw new AlreadyConnectedException(); if (connectionPending) throw new ConnectionPendingException(); if (!(remote instanceof InetSocketAddress)) ... | |
if (!isConnected() && !connectionPending) | if (!connectionPending) | public boolean finishConnect () throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (!isConnected() && !connectionPending) throw new NoConnectionPendingException(); if (isConnected()) return true; // FIXME: Handle blocking/non-blocking mode. Selector se... |
if (isConnected()) return true; Selector selector = provider().openSelector(); register(selector, SelectionKey.OP_CONNECT); if (isBlocking()) { selector.select(); connectionPending = false; return true; } int ready = selector.selectNow(); if (ready == 1) { connectionPending = false; return true; } | public boolean finishConnect () throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (!isConnected() && !connectionPending) throw new NoConnectionPendingException(); if (isConnected()) return true; // FIXME: Handle blocking/non-blocking mode. Selector se... | |
{ socket.setSoTimeout (blocking ? 0 : NIOConstants.DEFAULT_TIMEOUT); } | { channel.setBlocking(blocking); } | protected void implConfigureBlocking (boolean blocking) throws IOException { socket.setSoTimeout (blocking ? 0 : NIOConstants.DEFAULT_TIMEOUT); } |
return socket.isConnected(); | if (connectionPending) return false; try { InetSocketAddress remote = channel.getPeerAddress(); return remote != null; } catch (IOException ioe) { ioe.printStackTrace(System.out); return false; } | public boolean isConnected () { return socket.isConnected(); } |
byte[] data; int offset = 0; InputStream input = socket.getInputStream(); int available = input.available(); int len = dst.remaining(); if ((! isBlocking()) && available == 0) return 0; | public int read(ByteBuffer dst) throws IOException { if (!isConnected()) throw new NotYetConnectedException(); byte[] data; int offset = 0; InputStream input = socket.getInputStream(); int available = input.available(); int len = dst.remaining(); if ((! isBlocking()) && available == 0) ... | |
if (dst.hasArray()) { offset = dst.arrayOffset() + dst.position(); data = dst.array(); } else { data = new byte [len]; | return channel.read(dst); | public int read(ByteBuffer dst) throws IOException { if (!isConnected()) throw new NotYetConnectedException(); byte[] data; int offset = 0; InputStream input = socket.getInputStream(); int available = input.available(); int len = dst.remaining(); if ((! isBlocking()) && available == 0) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.