bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,483
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,484
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,485
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,486
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,487
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
public Object invoke(Object proxy, Method method, Object[] arguments) throws Exception { // Do we actually need the proxy? if (method == null) throw new RuntimeException("Invoking null method"); // Listener methods that weren't specified are ignored. If listenerMethod // is null, then all listen...
12,488
public String getDescription(File f) { return getInternalFileView().getDescription(f); }
public String getDescription(File f) { return getFileView().getDescription(f); }
12,491
public Icon getIcon(File f) { return getInternalFileView().getIcon(f); }
public Icon getIcon(File f) { return getFileView().getIcon(f); }
12,494
public String getName(File f) { return getInternalFileView().getName(f); }
public String getName(File f) { return getFileView().getName(f); }
12,495
public String getTypeDescription(File f) { return getInternalFileView().getTypeDescription(f); }
public String getTypeDescription(File f) { return getFileView().getTypeDescription(f); }
12,496
protected PropertyEditorSupport() { this.eventSource = this; this.pSupport = new PropertyChangeSupport(this); }
protected PropertyEditorSupport() { this.eventSource = this; this.pSupport = new PropertyChangeSupport(this); }
12,497
public void firePropertyChange() { pSupport.firePropertyChange(null,null,val); }
public void firePropertyChange() { pSupport.firePropertyChange(null,null,val); }
12,498
public String getAsText() { return val != null ? val.toString() : "null"; }
public String getAsText() { return val != null ? val.toString() : "null"; }
12,499
public Object getValue() { return val; }
public Object getValue() { return val; }
12,500
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); } else { throw new IllegalArgumentException(); } }
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); } else { throw new IllegalArgumentException(); } }
12,501
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); } else { throw new IllegalArgumentException(); } }
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); else throw new IllegalArgumentException(); } }
12,502
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); } else { throw new IllegalArgumentException(); } }
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); else { throw new IllegalArgumentException();
12,503
public void setValue(Object val) { Object oldVal = val; this.val = val; if(!oldVal.equals(val)) { pSupport.firePropertyChange(null,oldVal,val); } }
public void setValue(Object val) { Object oldVal = val; this.val = val; if(!oldVal.equals(val)) { pSupport.firePropertyChange(null,oldVal,val); } }
12,504
protected void installDefaults(JSeparator s) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); size = defaults.getDimension("ToolBar.separatorSize"); }
protected void installDefaults(JSeparator s) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); size = defaults.getDimension("ToolBar.separatorSize"); }
12,505
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(row); }
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(row); }
12,506
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(row); }
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(index); }
12,507
int convertRowToY(int row) { int y = 0; for (int i = 0; i < row; ++i) { int h = getRowHeight(i); if (h == -1) return -1; y += h; } return y; }
protected int convertRowToY(int row) { int y = 0; for (int i = 0; i < row; ++i) { int h = getRowHeight(i); if (h == -1) return -1; y += h; } return y; }
12,509
int convertYToRow(int y0) { for (int row = 0; row < cellHeights.length; ++row) { int h = getRowHeight(row); if (y0 < h) return row; y0 -= h; } return -1; }
protected int convertYToRow(int y0) { for (int row = 0; row < cellHeights.length; ++row) { int h = getRowHeight(row); if (y0 < h) return row; y0 -= h; } return -1; }
12,510
void damageLayout() { updateLayoutStateNeeded = 1; list.revalidate(); }
private void damageLayout() { updateLayoutStateNeeded = 1; list.revalidate(); }
12,511
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, ...
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, ...
12,512
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, ...
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, ...
12,513
public Dimension getPreferredSize(JComponent c) { if (list.getModel().getSize() == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); return bounds.getSize(); }
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); return bounds.getSize(); }
12,514
public Dimension getPreferredSize(JComponent c) { if (list.getModel().getSize() == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); return bounds.getSize(); }
public Dimension getPreferredSize(JComponent c) { if (list.getModel().getSize() == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); Dimension retVal = bounds.getSize(); Component parent = list.getParent(); if ((visibleRows == -1) && (parent instan...
12,515
int getRowHeight(int row) { if (row < 0 || row >= cellHeights.length) return -1; else if (cellHeight != -1) return cellHeight; else return cellHeights[row]; }
protected int getRowHeight(int row) { if (row < 0 || row >= cellHeights.length) return -1; else if (cellHeight != -1) return cellHeight; else return cellHeights[row]; }
12,516
public Point indexToLocation(JList list, int index) { return new Point(0, convertRowToY(index)); }
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: int visibleRows = list.getVisibleRowCount(); int numberOfCell...
12,517
void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(defaults.getColor("List.foreground")); list.setBackground(defaults.getColor("List.background")); list.setSelectionForeground(defaults.getColor("List.selectionForeground")); list.setSelectionBackground...
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(defaults.getColor("List.foreground")); list.setBackground(defaults.getColor("List.background")); list.setSelectionForeground(defaults.getColor("List.selectionForeground")); list.setSelection...
12,518
void installKeyboardActions() { }
protected void installKeyboardActions() { }
12,519
void installListeners() { list.addFocusListener(focusListener); list.getModel().addListDataListener(listDataListener); list.addListSelectionListener(listSelectionListener); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); list.addPropertyChangeListener(pro...
protected void installListeners() { list.addFocusListener(focusListener); list.getModel().addListDataListener(listDataListener); list.addListSelectionListener(listSelectionListener); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); list.addPropertyChangeLi...
12,520
public int locationToIndex(JList list, Point location) { return convertYToRow(location.y); }
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: int visibleRows = list.getVisibleRowCount(); int cellsPerRow = -1; ...
12,522
void maybeUpdateLayoutState() { if (updateLayoutStateNeeded != 0) { updateLayoutState(); updateLayoutStateNeeded = 0; } }
protected void maybeUpdateLayoutState() { if (updateLayoutStateNeeded != 0) { updateLayoutState(); updateLayoutStateNeeded = 0; } }
12,523
public void paintBackground(Graphics g, JComponent c) { Dimension size = getPreferredSize(c); Color save = g.getColor(); g.setColor(c.getBackground()); g.fillRect(0, 0, size.width, size.height); g.setColor(save); }
private void paintBackground(Graphics g, JComponent c) { Dimension size = getPreferredSize(c); Color save = g.getColor(); g.setColor(c.getBackground()); g.fillRect(0, 0, size.width, size.height); g.setColor(save); }
12,524
void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
12,525
void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean is_sel = list.isSelectedIndex(row); boolean has_focus = false; Component comp = rend.getListCellRendererComponent(list, ...
12,526
void uninstallDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(null); list.setBackground(null); list.setSelectionForeground(null); list.setSelectionBackground(null); }
protected void uninstallDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(null); list.setBackground(null); list.setSelectionForeground(null); list.setSelectionBackground(null); }
12,527
void uninstallKeyboardActions() { }
protected void uninstallKeyboardActions() { }
12,528
void uninstallListeners() { list.removeFocusListener(focusListener); list.getModel().removeListDataListener(listDataListener); list.removeListSelectionListener(listSelectionListener); list.removeMouseListener(mouseInputListener); list.removeMouseMotionListener(mouseInputListener); list.removeProper...
protected void uninstallListeners() { list.removeFocusListener(focusListener); list.getModel().removeListDataListener(listDataListener); list.removeListSelectionListener(listSelectionListener); list.removeMouseListener(mouseInputListener); list.removeMouseMotionListener(mouseInputListener); list.re...
12,529
void updateLayoutState() { int nrows = list.getModel().getSize(); cellHeight = -1; cellWidth = -1; if (cellHeights == null || cellHeights.length != nrows) cellHeights = new int[nrows]; if (list.getFixedCellHeight() == -1 || list.getFixedCellWidth() == -1) { ListCellRenderer rend = lis...
protected void updateLayoutState() { int nrows = list.getModel().getSize(); cellHeight = -1; cellWidth = -1; if (cellHeights == null || cellHeights.length != nrows) cellHeights = new int[nrows]; if (list.getFixedCellHeight() == -1 || list.getFixedCellWidth() == -1) { ListCellRenderer ...
12,530
private Point adjustLocation(Point p, Component c, Dimension d) { if (p.x + d.width > c.getWidth()) p.x -= d.width; if (p.x < 0) p.x = 0; if (p.y + d.height < c.getHeight()) p.y += d.height; else if (p.y + d.height > c.getHeight()) p.y -= d.height*2; return p; }
private Point adjustLocation(Point p, Component c, Dimension d) { if (p.x + d.width > c.getWidth()) p.x -= d.width; if (p.x < 0) p.x = 0; if (p.y + d.height < c.getHeight()) p.y += d.height; if (p.y + d.height > c.getHeight()) p.y -= d.height*2; return p; }
12,532
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
12,533
public static void main(String[] args) throws Exception { SAXParser parser = new SAXParser(); InputSource input = new InputSource(args[0]); parser.parse(input, new org.xml.sax.helpers.DefaultHandler()); }
public static void main(String[] args) throws Exception { SAXParser parser = new SAXParser(); InputSource input = new InputSource(args[0]); parser.parse(input, new org.xml.sax.helpers.DefaultHandler()); }
12,534
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Font f = comboBox.getFont(); Color fore = comboBox.getForeground(); Color back = comboBox.getBackground(); if (f == null || f instanceof UIResource) comboBox.setFont(defaults.getFont("ComboBox.font")); ...
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Font f = comboBox.getFont(); Color fore = comboBox.getForeground(); Color back = comboBox.getBackground(); if (f == null || f instanceof UIResource) comboBox.setFont(defaults.getFont("ComboBox.font")); ...
12,535
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Font f = comboBox.getFont(); Color fore = comboBox.getForeground(); Color back = comboBox.getBackground(); if (f == null || f instanceof UIResource) comboBox.setFont(defaults.getFont("ComboBox.font")); ...
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Font f = comboBox.getFont(); Color fore = comboBox.getForeground(); Color back = comboBox.getBackground(); if (f == null || f instanceof UIResource) comboBox.setFont(defaults.getFont("ComboBox.font")); ...
12,536
protected JComponent createContentPane() { return new SwingFrameContentPane(); }
protected Container createContentPane() { return new SwingFrameContentPane(); }
12,537
public void paint(Graphics g) { RepaintManager rm = RepaintManager.currentManager(this); // We do a little stunt act here to switch on double buffering if it's // not already on. If we are not already doublebuffered, then we jump // into the method paintDoubleBuffered, which turns on the double buffer ...
public void paint(Graphics g) { RepaintManager rm = RepaintManager.currentManager(this); // We do a little stunt act here to switch on double buffering if it's // not already on. If we are not already doublebuffered, then we jump // into the method paintDoubleBuffered, which turns on the double buffer ...
12,538
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) { ...
12,539
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
12,540
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
12,541
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); for (int i = children.length - 1; i >= 0; --i) ...
12,542
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. synchronized (paintLock) { Image buffer = rm.getOffsc...
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. synchronized (paintLock) { Image buffer = rm.getOffsc...
12,543
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. synchronized (paintLock) { Image buffer = rm.getOffsc...
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. synchronized (paintLock) { Image buffer = rm.getOffsc...
12,544
public void setBorder(Border newBorder) { Border oldBorder = border; border = newBorder; firePropertyChange("border", oldBorder, newBorder); }
public void setBorder(Border newBorder) { Border oldBorder = getBorder(); if (oldBorder == newBorder) return; border = newBorder; firePropertyChange("border", oldBorder, newBorder); }
12,547
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabled", oldEnabled, enable); }
public void setEnabled(boolean enable) { if (enable == isEnabled()) return; super.setEnabled(enable); firePropertyChange("enabled", oldEnabled, enable); }
12,549
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabled", oldEnabled, enable); }
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabled", !enable, enable); repaint(); }
12,550
public void concatenateTransform(AffineTransform post) { xform.concatenate(post); }
public void concatenateTransform(AffineTransform post) { concetenateTransform (post); }
12,555
public void concetenateTransform(AffineTransform post) { concatenateTransform(post); }
public void concetenateTransform(AffineTransform post) { xform.concatenate (post); }
12,556
public void preConcatenateTransform(AffineTransform pre) { xform.preConcatenate(pre); }
public void preConcatenateTransform(AffineTransform pre) { preConcetenateTransform (pre); }
12,557
public void preConcetenateTransform(AffineTransform pre) { preConcetenateTransform(pre); }
public void preConcetenateTransform(AffineTransform pre) { xform.preConcatenate (pre); }
12,558
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
12,559
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
12,560
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
12,561
getAttribute(AttributedCharacterIterator.Attribute attrib){ if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.next(); // C...
getAttribute(AttributedCharacterIterator.Attribute attrib){ if (attribs == null) return(null); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { Object obj = iter.next(); // C...
12,564
getAttributes(){ HashMap m = new HashMap(); if (attribs == null) return(m); for (int i = 0; i < attribs.length; i++) { if ((ci.getIndex() >= attribs[i].begin_index) && (ci.getIndex() <= attribs[i].end_index)) m.putAll(attribs[i].attribs); } return(m);}
getAttributes(){ HashMap m = new HashMap(); if (attribs == null) return(m); for (int i = 0; i < attribs.length; i++) { if ((ci.getIndex() >= attribs[i].begin_index) && (ci.getIndex() < attribs[i].end_index)) m.putAll(attribs[i].attribs); } return(m);}
12,565
private ThreadGroup() { this.parent = null; this.name = "Root Thread Group"; this.maxPriority = java.lang.Thread.MAX_PRIORITY; this.daemon = false; this.process = VmProcess.getRootProcess(this); }
private ThreadGroup() { this.parent = null; this.name = "Root Thread Group"; this.maxPriority = java.lang.Thread.MAX_PRIORITY; this.daemon = false; this.process = VmProcess.getRootProcess(this); }
12,566
public int activeCount() { return allThreadsCount(); }
public int activeCount() { return allThreadsCount(); }
12,567
public int activeGroupCount() { return allGroupsCount(); }
public int activeGroupCount() { return allGroupsCount(); }
12,568
public boolean allowThreadSuspension(boolean b) { // Ignore return true; }
public boolean allowThreadSuspension(boolean b) { // Ignore return true; }
12,569
public final void checkAccess() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccess(this); }
public final void checkAccess() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccess(this); }
12,570
public final void destroy() { checkAccess(); if (destroyed) throw new IllegalThreadStateException("ThreadGroup has already been destroyed"); if (threads.size() > 0) throw new IllegalThreadStateException("ThreadGroup has Threads remaining"); Enumeration e = groups.elements(); while (e.hasMoreElements()) { Th...
public final void destroy() { checkAccess(); if (destroyed) throw new IllegalThreadStateException("ThreadGroup has already been destroyed"); if (threads.size() > 0) throw new IllegalThreadStateException("ThreadGroup has Threads remaining"); Enumeration e = groups.elements(); while (e.hasMoreElements()) { Th...
12,571
public int enumerate(Thread[] list) { return enumerate(list, false); }
public int enumerate(Thread[] list) { return enumerate(list, false); }
12,572
public final int getMaxPriority() { return maxPriority; }
public final int getMaxPriority() { return maxPriority; }
12,573
public final ThreadGroup getParent() { return parent; }
public final ThreadGroup getParent() { return parent; }
12,574
public final boolean isDaemon() { return daemon; }
public final boolean isDaemon() { return daemon; }
12,575
public boolean isDestroyed() { return destroyed; }
public boolean isDestroyed() { return destroyed; }
12,576
public final boolean parentOf(ThreadGroup g) { return (this == g) || parentOf(g.getParent()); }
public final boolean parentOf(ThreadGroup g) { return (this == g) || parentOf(g.getParent()); }
12,577
public final void resume() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.resume(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) et.nextElement(); g.resume(); } }
public final void resume() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.resume(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) et.nextElement(); g.resume(); } }
12,578
public final void setDaemon(boolean daemon) { checkAccess(); this.daemon = daemon; }
public final void setDaemon(boolean daemon) { checkAccess(); this.daemon = daemon; }
12,579
public final void setMaxPriority(int n) { checkAccess(); if (n < Thread.MIN_PRIORITY || n > Thread.MAX_PRIORITY) throw new IllegalArgumentException("Invalid priority: " + n); if (parent != null && n > parent.maxPriority) n = parent.maxPriority; maxPriority = n; Enumeration e = groups.elements(); while (e.has...
public final void setMaxPriority(int n) { checkAccess(); if (n < Thread.MIN_PRIORITY || n > Thread.MAX_PRIORITY) throw new IllegalArgumentException("Invalid priority: " + n); if (parent != null && n > parent.maxPriority) n = parent.maxPriority; maxPriority = n; Enumeration e = groups.elements(); while (e.has...
12,580
public final void stop() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.stop(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) eg.nextElement(); g.stop(); } }
public final void stop() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.stop(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) eg.nextElement(); g.stop(); } }
12,581
public final void suspend() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.suspend(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) eg.nextElement(); g.suspend(); } }
public final void suspend() { checkAccess(); Enumeration et = threads.elements(); while (et.hasMoreElements()) { Thread t = (Thread) et.nextElement(); t.suspend(); } Enumeration eg = groups.elements(); while (eg.hasMoreElements()) { ThreadGroup g = (ThreadGroup) eg.nextElement(); g.suspend(); } }
12,582
public String toString() { return getClass().getName() + "[name=" + name + ",maxpri=" + maxPriority + "]"; }
public String toString() { return getClass().getName() + "[name=" + name + ",maxpri=" + maxPriority + "]"; }
12,583
public void uncaughtException(Thread t, Throwable e) { if (parent != null) parent.uncaughtException(t, e); else if (!(e instanceof ThreadDeath)) e.printStackTrace(); }
public void uncaughtException(Thread t, Throwable e) { if (parent != null) parent.uncaughtException(t, e); else if (!(e instanceof ThreadDeath)) e.printStackTrace(); }
12,584
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JLayeredPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
12,586
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) toUse = JLayeredPane.getLayered...
12,587
public static int showInternalConfirmDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame, pane); return ((Integer) pane.getVal...
public static int showInternalConfirmDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame); return ((Integer) pane.getValue())....
12,589
public static String showInternalInputDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); pane.setWantsInput(true); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame, pane); ...
public static String showInternalInputDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); pane.setWantsInput(true); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame); retu...
12,590
public static void showInternalMessageDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame, pane); }
public static void showInternalMessageDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame); }
12,591
public static int showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, ...
public static int showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, ...
12,592
private static void startModal(JInternalFrame f, JOptionPane pane) { f.getContentPane().add(pane); f.pack(); f.show(); Dimension pref = f.getPreferredSize(); f.setBounds(0, 0, pref.width, pref.height); synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(n...
private static void startModal(JInternalFrame f) { f.getContentPane().add(pane); f.pack(); f.show(); Dimension pref = f.getPreferredSize(); f.setBounds(0, 0, pref.width, pref.height); synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAd...
12,593
private static void startModal(JInternalFrame f, JOptionPane pane) { f.getContentPane().add(pane); f.pack(); f.show(); Dimension pref = f.getPreferredSize(); f.setBounds(0, 0, pref.width, pref.height); synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(n...
private static void startModal(JInternalFrame f, JOptionPane pane) { f.getContentPane().add(pane); f.pack(); f.show(); Dimension pref = f.getPreferredSize(); f.setBounds(0, 0, pref.width, pref.height); synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(n...
12,594
protected final Class defineClass( String name, byte[] b, int off, int len, CodeSource cs) { // FIXME: Need to cache ProtectionDomains according to 1.3 docs. if (cs != null) { ProtectionDomain protectionDomain = new ProtectionDomain(cs, getPermissions(cs)); return super.defineClass(name, b, off, len, pro...
protected final Class defineClass( String name, byte[] b, int off, int len, CodeSource cs) { // FIXME: Need to cache ProtectionDomains according to 1.3 docs. if (cs != null) { ProtectionDomain protectionDomain = new ProtectionDomain(cs, getPermissions(cs)); return super.defineClass(name, b, off, len, pro...
12,595
protected PermissionCollection getPermissions(CodeSource cs) { Policy policy = Policy.getPolicy(); return policy.getPermissions(cs); }
protected PermissionCollection getPermissions(CodeSource cs) { Policy policy = Policy.getPolicy(); return policy.getPermissions(cs); }
12,596
public ProtectionDomain(CodeSource code_source, PermissionCollection perms) { this.code_source = code_source; this.perms = perms; if (perms != null) perms.setReadOnly(); }
public ProtectionDomain(CodeSource code_source, PermissionCollection perms) { this.code_source = code_source; this.perms = perms; if (perms != null) perms.setReadOnly(); }
12,597
protected final Class defineClass(String name, byte[] data, int offset, int length, ProtectionDomain protDomain) { if (data == null) { throw new NullPointerException(); } if (offset < 0 || length < 0 || (offset + length) > data.length) { throw new IndexOutOfBoun...
protected final Class defineClass(String name, byte[] data, int offset, int length, ProtectionDomain protDomain) { if (data == null) { throw new NullPointerException(); } if (offset < 0 || length < 0 || (offset + length) > data.length) { throw new IndexOutOfBoun...
12,598
public void eventDispatched(AWTEvent event) { int id = event == null ? 0 : event.getID(); if (((mask & AWTEvent.ACTION_EVENT_MASK) != 0 && event instanceof ActionEvent) || ((mask & AWTEvent.ADJUSTMENT_EVENT_MASK) != 0 && event instanceof AdjustmentEvent) || ((mask & AWTEvent.CO...
public void eventDispatched(AWTEvent event) { int id = event == null ? 0 : event.getID(); if (((mask & AWTEvent.ACTION_EVENT_MASK) != 0 && event instanceof ActionEvent) || ((mask & AWTEvent.ADJUSTMENT_EVENT_MASK) != 0 && event instanceof AdjustmentEvent) || ((mask & AWTEvent.CO...
12,599
public void installDefaults(JPanel p) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setBackground(defaults.getColor("Panel.background")); p.setOpaque(true); }
public void installDefaults(JPanel p) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setBackground(defaults.getColor("Panel.background")); p.setOpaque(true); }
12,606