rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
int ord1 = cei1.next(); int ord2 = cei2.next(); | int ord1; int ord2; | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); | if (advance_block_1) { ord1block = cs.nextBlock(); if (ord1block != null && ord1block.ignore) continue; } if (advance_block_2) { ord2block = ct.nextBlock(); if (ord2block != null && ord2block.ignore) { advance_block_1 = false; continue; } } else advance_block_2 = true; if (!advance_block_1) advance_block_1 = true; i... | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); | { if (ord2block == null) return 0; return -1; } if (ord2block == null) return 1; ord2 = ord2block.getValue(); | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
return(-1); | return -1; | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
return(1); | return 1; | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
int tert2 = CollationElementIterator.tertiaryOrder(ord1); | int tert2 = CollationElementIterator.tertiaryOrder(ord2); | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
return(1); | return 1; else if (getStrength() == TERTIARY) continue; return ord1block.key.compareTo(ord2block.key); | compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER... |
equals(Object obj) { if (obj == this) return(true); else return(false); } | public boolean equals(Object obj) { if (obj == this) return true; else return false; } | equals(Object obj){ if (obj == this) return(true); else return(false);} |
getCollationElementIterator(String str) { return(new CollationElementIterator(this, str)); } | public CollationElementIterator getCollationElementIterator(String source) { return new CollationElementIterator(this, source); } | getCollationElementIterator(String str){ return(new CollationElementIterator(this, str));} |
getCollationKey(String str) { CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); | public CollationKey getCollationKey(String source) { CollationElementIterator cei = getCollationElementIterator(source); ArrayList vect = new ArrayList(); | getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder... |
ord = CollationElementIterator.secondaryOrder(ord); | ord = CollationElementIterator.primaryOrder(ord) << 8; ord |= CollationElementIterator.secondaryOrder(ord); | getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder... |
for (int i = 0; i < key.length; i++) | for (int i = 0; i < objarr.length; i++) | getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder... |
int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); | int j = ((Integer) objarr[i]).intValue(); key [i * 4] = (byte) ((j & 0xFF000000) >> 24); key [i * 4 + 1] = (byte) ((j & 0x00FF0000) >> 16); key [i * 4 + 2] = (byte) ((j & 0x0000FF00) >> 8); key [i * 4 + 3] = (byte) (j & 0x000000FF); | getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder... |
return(new CollationKey(this, str, key)); } | return new CollationKey(this, source, key); } | getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder... |
getRules() { return(rules); } | public String getRules() { return rules; } | getRules(){ return(rules);} |
hashCode() { return(System.identityHashCode(this)); } | public int hashCode() { return System.identityHashCode(this); } | hashCode(){ return(System.identityHashCode(this));} |
CollationElementIterator(RuleBasedCollator rbc, String str) { this.rbc = rbc; this.str = str; } | CollationElementIterator(RuleBasedCollator collator, String text) { this.collator = collator; setText (text); } | CollationElementIterator(RuleBasedCollator rbc, String str){ this.rbc = rbc; this.str = str;} |
next() { ++pos; if (pos >= str.length()) return(NULLORDER); | public int next() { RuleBasedCollator.CollationElement e = nextBlock(); | next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));} |
String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s)); } | if (e == null) return NULLORDER; return e.getValue(); } | next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));} |
reset() { pos = 0; } | public void reset() { index = 0; textIndex = 0; } | reset(){ pos = 0;} |
CollationKey(Collator collator, String str, byte[] key) { | CollationKey (Collator collator, String originalText, byte[] key) { | CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;} |
this.str = str; | this.originalText = originalText; | CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;} |
ActionMap createActionMap() | private ActionMap createActionMap() | ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return ... |
ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) | for (int i = actions.length - 1; i >= 0; i--) | ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return ... |
String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); | Action action = actions[i]; am.put(action.getValue(Action.NAME), action); | ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return ... |
Action copyAction = TransferHandler.getCopyAction(); am.put(copyAction.getValue(Action.NAME), copyAction); Action cutAction = TransferHandler.getCutAction(); am.put(cutAction.getValue(Action.NAME), cutAction); Action pasteAction = TransferHandler.getPasteAction(); am.put(pasteAction.getValue(Action.NAME), pasteAction); | ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return ... | |
InputMap getInputMap(int condition) | private InputMap getInputMap() | InputMap getInputMap(int condition) { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANC... |
switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".... | InputMap shared = (InputMap) SharedUIDefaults.get(prefix + ".focusInputMap"); if (shared != null) im.setParent(shared); return im; | InputMap getInputMap(int condition) { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANC... |
getInputMap(JComponent.WHEN_FOCUSED)); SwingUtilities.replaceUIActionMap(textComponent, createActionMap()); ActionMap parentActionMap = new ActionMapUIResource(); Action[] actions = textComponent.getActions(); for (int j = 0; j < actions.length; j++) { Action currAction = actions[j]; parentActionMap.put(currAction.get... | getInputMap()); SwingUtilities.replaceUIActionMap(textComponent, getActionMap()); | protected void installKeyboardActions() { // This is only there for backwards compatibility. textComponent.setKeymap(createKeymap()); // load any bindings for the newer InputMap / ActionMap interface SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, ... |
public void repaint(Rectangle r) | public void repaint(long tm, int x, int y, int width, int height) | public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); } |
repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); | Rectangle dirty = new Rectangle(x, y, width, height); Rectangle vis = getVisibleRect(); dirty = dirty.intersection(vis); RepaintManager.currentManager(this).addDirtyRegion(this, dirty.x, dirty.y, dirty.width, dirty.height); | public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); } |
out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); | out.println("Memory size: " + NumberUtils.size(rt.totalMemory())); out.println("Free memory: " + NumberUtils.size(rt.freeMemory())); | public void execute( CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) throws Exception { final Runtime rt = Runtime.getRuntime(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Starting gc..."); long start = System.curr... |
protected AccessibleAbstractButton(AbstractButton component) { super(component); } | protected AccessibleAbstractButton(JComponent c) { super(c); } | protected AccessibleAbstractButton(AbstractButton component) { super(component); // TODO } // AccessibleAbstractButton() |
protected void configurePropertiesFromAction(Action a) { } | protected void configurePropertiesFromAction(Action a) { if (a == null) { setText(null); setIcon(null); setEnabled(true); setToolTipText(null); } else { setText((String)(a.getValue(Action.NAME))); setIcon((Icon)(a.getValue(Action.SMALL_ICON))); setEnabled(a.isEnabled()); setToolTipText((String)(a.getValue(Action.SHORT... | protected void configurePropertiesFromAction(Action a) { //Factory method which sets the ActionEvent source's properties according to values from the Action instance. } |
protected PropertyChangeListener createActionPropertyChangeListener(Action a) { return null; } | protected PropertyChangeListener createActionPropertyChangeListener(Action a) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { Action act = (Action)(e.getSource()); AbstractButton.this.configurePropertiesFromAction(act); } }; } | protected PropertyChangeListener createActionPropertyChangeListener(Action a) { //Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. return null; } |
public abstract Component getComponent(); | Component getComponent(); | public abstract Component getComponent(); |
public abstract MenuElement[] getSubElements(); | MenuElement[] getSubElements(); | public abstract MenuElement[] getSubElements(); |
public abstract void menuSelectionChanged(boolean included); | void menuSelectionChanged(boolean included); | public abstract void menuSelectionChanged(boolean included); |
public abstract void processKeyEvent(KeyEvent event, | void processKeyEvent(KeyEvent event, | public abstract void processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager); |
public void processMouseEvent(MouseEvent event, | void processMouseEvent(MouseEvent event, | public void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); |
public GetDelegateInstanceException(String msg, Throwable next) | public GetDelegateInstanceException(String msg) | public GetDelegateInstanceException(String msg, Throwable next) { super(msg, next); } |
super(msg, next); | super(msg); | public GetDelegateInstanceException(String msg, Throwable next) { super(msg, next); } |
public Text createTextNode(char[] buf, int off, int len) | public Text createTextNode(String value) | public Text createTextNode(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomText(this, buf, off, len); } |
checkChar(buf, off, len, "1.1".equals(version)); | checkChar(value, "1.1".equals(version)); | public Text createTextNode(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomText(this, buf, off, len); } |
return new DomText(this, buf, off, len); | return new DomText(this, value); | public Text createTextNode(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomText(this, buf, off, len); } |
Object val = (arg == null) ? null : arg.evaluate(context, pos, len); | Object val = (arg == null) ? Collections.singleton(context) : arg.evaluate(context, pos, len); | public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? null : arg.evaluate(context, pos, len); return _name(context, (Collection) val); } |
public boolean isSelected(); | boolean isSelected(); | public boolean isSelected(); |
public void setSelectedIndex(int index); | void setSelectedIndex(int index); | public void setSelectedIndex(int index); |
Name add(int posn, String comp) throws InvalidNameException; | Name add(String comp) throws InvalidNameException; | Name add(int posn, String comp) throws InvalidNameException; |
Name addAll(int posn, Name n) throws InvalidNameException; | Name addAll(Name suffix) throws InvalidNameException; | Name addAll(int posn, Name n) throws InvalidNameException; |
invalidate(); | comp.invalidate(); | protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this)... |
repaint(); | protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this)... | |
if (! this.isLightweight()) { if (dispatcher == null) | if (!this.isLightweight() && dispatcher == null) | private void addNotifyContainerChildren() { synchronized (getTreeLock ()) { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight ()) { // If we're not lightweight, and we just got a lightweight ... |
} | private void addNotifyContainerChildren() { synchronized (getTreeLock ()) { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight ()) { // If we're not lightweight, and we just got a lightweight ... | |
if (dispatcher != null) dispatcher.enableEvents(component[i].eventMask); | private void addNotifyContainerChildren() { synchronized (getTreeLock ()) { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight ()) { // If we're not lightweight, and we just got a lightweight ... | |
if (eventTypeEnabled (e.id) && dispatcher != null && dispatcher.handleEvent (e)) | if (dispatcher != null && dispatcher.handleEvent (e)) | void dispatchEventImpl(AWTEvent e) { // Give lightweight dispatcher a chance to handle it. if (eventTypeEnabled (e.id) && dispatcher != null && dispatcher.handleEvent (e)) return; if ((e.id <= ContainerEvent.CONTAINER_LAST && e.id >= ContainerEvent.CONTAINER_FIRST) && ... |
if (layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.getLayoutAlignmentX(this); } else | public float getAlignmentX() { if (layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.getLayoutAlignmentX(this); } else return super.getAlignmentX(); } | |
if (layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.getLayoutAlignmentY(this); } else | public float getAlignmentY() { if (layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.getLayoutAlignmentY(this); } else return super.getAlignmentY(); } | |
if (layoutMgr != null && layoutMgr instanceof LayoutManager2) | if (valid && maxSize != null) return new Dimension(maxSize); LayoutManager layout = getLayout(); if (layout != null && layout instanceof LayoutManager2) | public Dimension getMaximumSize() { if (layoutMgr != null && layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.maximumLayoutSize(this); } else return super.getMaximumSize(); } |
LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.maximumLayoutSize(this); | LayoutManager2 lm2 = (LayoutManager2) layout; maxSize = lm2.maximumLayoutSize(this); return maxSize; | public Dimension getMaximumSize() { if (layoutMgr != null && layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; return lm2.maximumLayoutSize(this); } else return super.getMaximumSize(); } |
if (layoutMgr != null && layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; lm2.invalidateLayout(this); } | public void invalidate() { super.invalidate(); } | |
if (layoutMgr != null && layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; lm2.invalidateLayout(this); } | void invalidateTree() { for (int i = 0; i < ncomponents; i++) { Component comp = component[i]; comp.invalidate(); if (comp instanceof Container) ((Container) comp).invalidateTree(); } } | |
if (layoutMgr != null) return layoutMgr.minimumLayoutSize (this); | if(valid && minSize != null) return new Dimension(minSize); LayoutManager layout = getLayout(); if (layout != null) { minSize = layout.minimumLayoutSize (this); return minSize; } | public Dimension minimumSize() { if (layoutMgr != null) return layoutMgr.minimumLayoutSize (this); else return super.minimumSize (); } |
super.paint(g); | public void paint(Graphics g) { if (!isShowing()) return; // Paint self first. super.paint(g); // Visit heavyweights as well, in case they were // erased when we cleared the background for this container. visitChildren(g, GfxPaintVisitor.INSTANCE, false); } | |
if (layoutMgr != null) return layoutMgr.preferredLayoutSize (this); | synchronized(treeLock) { if(valid && prefSize != null) return new Dimension(prefSize); LayoutManager layout = getLayout(); if (layout != null) { Dimension layoutSize = layout.preferredLayoutSize(this); if(valid) prefSize = layoutSize; return new Dimension(layoutSize); } | public Dimension preferredSize() { if (layoutMgr != null) return layoutMgr.preferredLayoutSize (this); else return super.preferredSize (); } |
} | public Dimension preferredSize() { if (layoutMgr != null) return layoutMgr.preferredLayoutSize (this); else return super.preferredSize (); } | |
repaint(); | public void remove(int index) { synchronized (getTreeLock ()) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); ... | |
focusTraversalKeys = new Set[3]; | focusTraversalKeys = new Set[4]; | public void setFocusTraversalKeys(int id, Set keystrokes) { if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS && id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS && id != KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS && id != KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS) throw new... |
} | public void setFont(Font f) { super.setFont(f); // FIXME: Although it might make more sense to invalidate only // those children whose font == null, Sun invalidates all children. // So we'll do the same. invalidateTree(); } | |
super.update(g); | ComponentPeer p = peer; if (p != null && !(p instanceof LightweightPeer)) g.clearRect(0, 0, getWidth(), getHeight()); paint(g); | public void update(Graphics g) { super.update(g); } |
&& (comp.isLightweight() || !lightweightOnly && ! (comp instanceof Container)); | && (comp.isLightweight() || !lightweightOnly); | private void visitChildren(Graphics gfx, GfxVisitor visitor, boolean lightweightOnly) { synchronized (getTreeLock ()) { for (int i = ncomponents - 1; i >= 0; --i) { Component comp = component[i]; // If we're visiting heavyweights as well, ... |
void acquireComponentForMouseEvent(MouseEvent me) | Component acquireComponentForMouseEvent(MouseEvent me) | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
SwingUtilities.getDeepestComponentAt(parent, p.x, p.y); | getDeepestComponentForMouseEventAt(parent, p.x, p.y); | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
p = SwingUtilities.convertPoint(parent, p.x, p.y, parent.parent); | p = AWTUtilities.convertPoint(parent, p.x, p.y, parent.parent); | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
if (SwingUtilities.isDescendingFrom(lastComponentEntered, nativeContainer)) | if (AWTUtilities.isDescendingFrom(lastComponentEntered, nativeContainer)) | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
Point tp = SwingUtilities.convertPoint(nativeContainer, | Point tp = AWTUtilities.convertPoint(nativeContainer, | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
tempComponent = lastComponentEntered; lastComponentEntered = null; tempComponent.dispatchEvent(exited); | lastComponentEntered.dispatchEvent (exited); | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
Point cp = SwingUtilities.convertPoint(nativeContainer, | Point cp = AWTUtilities.convertPoint(nativeContainer, | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
|| me.getID() == MouseEvent.MOUSE_PRESSED && pressCount > 0 | || me.getID() == MouseEvent.MOUSE_PRESSED && modifiers > 0 | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
if (SwingUtilities.isDescendingFrom(pressedComponent, nativeContainer)) | if (AWTUtilities.isDescendingFrom(pressedComponent, nativeContainer)) | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... |
return mouseEventTarget; | void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX (); int y = me.getY (); // Find the candidate which should receive this event. Component parent = nativeContainer; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { ... | |
acquireComponentForMouseEvent(me); | Component mouseEventTarget = acquireComponentForMouseEvent(me); | boolean handleEvent(AWTEvent e) { if (e instanceof MouseEvent) { MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent(me); // Avoid dispatching ENTERED and EXITED events twice. if (mouseEventTarget != null && mouseEventTarget.isShowing() && e.getID()... |
MouseEvent newEvt = SwingUtilities.convertMouseEvent(nativeContainer, me, mouseEventTarget); mouseEventTarget.dispatchEvent(newEvt); | boolean handleEvent(AWTEvent e) { if (e instanceof MouseEvent) { MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent(me); // Avoid dispatching ENTERED and EXITED events twice. if (mouseEventTarget != null && mouseEventTarget.isShowing() && e.getID()... | |
MouseEvent newEvt = AWTUtilities.convertMouseEvent(nativeContainer, me, mouseEventTarget); mouseEventTarget.dispatchEvent(newEvt); | boolean handleEvent(AWTEvent e) { if (e instanceof MouseEvent) { MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent(me); // Avoid dispatching ENTERED and EXITED events twice. if (mouseEventTarget != null && mouseEventTarget.isShowing() && e.getID()... | |
catch (Exception ignored) {} | catch (Exception e) { } | static Policy getCurrentPolicy() { // FIXME: The class name of the Policy provider should really be sourced // from the "java.security" configuration file. For now, just hard-code // a stub implementation. if (currentPolicy == null) { String pp = System.getProperty ("policy.provider"); ... |
public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { | public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("PermissionCollection is read only"); if (perm instanceof AllPermission) { if (allPermission == null) { | public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { allPermission = perm.ne... |
perms.put(permClass, allPermission); | perms.put(perm.getClass(), allPermission); } | public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { allPermission = perm.ne... |
} else { PermissionCollection pc = (PermissionCollection) perms .get(permClass); if (pc == null) { | else { PermissionCollection pc = (PermissionCollection) perms.get(perm.getClass()); if (pc == null) { | public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { allPermission = perm.ne... |
if (pc == null) { | if (pc == null) | public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { allPermission = perm.ne... |
} perms.put(permClass, pc); | perms.put(perm.getClass(), pc); | public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) { allPermission = perm.ne... |
throw new IOException("BlockDeviceAPI not found on device", ex); | final IOException ioe = new IOException("BlockDeviceAPI not found on device"); ioe.initCause(ex); throw ioe; | public void createImage() throws IOException, DriverException, FileSystemException { final FileDevice newFd = new FileDevice(destFile, "rw"); try { newFd.setLength(getDeviceLength()); formatDevice(newFd); final Device sysDev = getSystemDevice(newFd); ... |
throw new IOException("Cannot find BlockDeviceAPI", ex); | final IOException ioe = new IOException("BlockDeviceAPI not found on device"); ioe.initCause(ex); throw ioe; | protected void formatDevice(Device dev) throws IOException { GrubFatFormatter ff = createFormatter(); try { ff.format((BlockDeviceAPI) dev.getAPI(BlockDeviceAPI.class)); } catch (ApiNotFoundException ex) { throw new IOException("Cannot find BlockDeviceAPI", ex); } ... |
public static String dumpString(byte[] data, String m) | public static String dumpString(byte[] data, int offset, int length, String m) | public static String dumpString(byte[] data, String m) { return (data == null) ? "null\n" : dumpString(data, 0, data.length, m); } |
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; offset += 32)... | public static String dumpString(byte[] data, String m) { return (data == null) ? "null\n" : dumpString(data, 0, data.length, m); } |
{ | public static final byte[] fromBase64(String str) { int len = str.length(); if (len == 0) { throw new NumberFormatException("Empty string"); } byte[] a = new byte[len + 1]; int i, j; for (i = 0; i < len; i++) { try { a[i] = (byte) BASE64_CHARS.indexOf(s... | |
} | public static final byte[] fromBase64(String str) { int len = str.length(); if (len == 0) { throw new NumberFormatException("Empty string"); } byte[] a = new byte[len + 1]; int i, j; for (i = 0; i < len; i++) { try { a[i] = (byte) BASE64_CHARS.indexOf(s... | |
{ | public static int fromDigit(char c) { if (c >= '0' && c <= '9') { return c - '0'; } else if (c >= 'A' && c <= 'F') { return c - 'A' + 10; } else if (c >= 'a' && c <= 'f') { return c - 'a' + 10; } else throw new IllegalArgumentException("Invalid hexa... | |
} | public static int fromDigit(char c) { if (c >= '0' && c <= '9') { return c - '0'; } else if (c >= 'A' && c <= 'F') { return c - 'A' + 10; } else if (c >= 'a' && c <= 'f') { return c - 'a' + 10; } else throw new IllegalArgumentException("Invalid hexa... | |
{ | public static final String toBase64(byte[] buffer) { int len = buffer.length, pos = len % 3; byte b0 = 0, b1 = 0, b2 = 0; switch (pos) { case 1: b2 = buffer[0]; break; case 2: b1 = buffer[0]; b2 = buffer[1]; break; } StringBuffer sb = new StringBuffe... | |
} | public static final String toBase64(byte[] buffer) { int len = buffer.length, pos = len % 3; byte b0 = 0, b1 = 0, b2 = 0; switch (pos) { case 1: b2 = buffer[0]; break; case 2: b1 = buffer[0]; b2 = buffer[1]; break; } StringBuffer sb = new StringBuffe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.