rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public Object getValue() { return val; }
public Object getValue() { return value; }
public Object getValue() { return val; }
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) {
public void setAsText(String s) throws IllegalArgumentException { if (s.equals("null"))
public void setAsText(String s) throws IllegalArgumentException { if(s.equals("null")) { setValue(null); } else { throw new IllegalArgumentException(); } }
} else {
else
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(); } }
public void setValue(Object val) { Object oldVal = val; this.val = val; if(!oldVal.equals(val)) { pSupport.firePropertyChange(null,oldVal,val); } }
public void setValue(Object newValue) { value = newValue; pSupport.firePropertyChange(null, null, null); }
public void setValue(Object val) { Object oldVal = val; this.val = val; if(!oldVal.equals(val)) { pSupport.firePropertyChange(null,oldVal,val); } }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); size = defaults.getDimension("ToolBar.separatorSize");
size = UIManager.getDimension("ToolBar.separatorSize");
protected void installDefaults(JSeparator s) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); size = defaults.getDimension("ToolBar.separatorSize"); }
int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1)
Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1)
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(row); }
BasicListUI.this.list.setSelectedIndex(row);
BasicListUI.this.list.setSelectedIndex(index);
public void mousePressed(MouseEvent event) { int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1) return; BasicListUI.this.list.setSelectedIndex(row); }
rendererPane = new CellRendererPane();
public BasicListUI() { focusListener = new FocusHandler(); listDataListener = new ListDataHandler(); listSelectionListener = new ListSelectionHandler(); mouseInputListener = new MouseInputHandler(); propertyChangeListener = new PropertyChangeHandler(); updateLayoutStateNeeded = 1; }
int convertRowToY(int row)
protected int convertRowToY(int row)
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; }
int convertYToRow(int y0)
protected int convertYToRow(int y0)
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; }
void damageLayout()
private void damageLayout()
void damageLayout() { updateLayoutStateNeeded = 1; list.revalidate(); }
int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, getRowHeight(lo)); Rectangle hibounds = new Rectangle(0, convertRowToY(hi), cellWidth, getRowHeight(hi));
int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); Rectangle bounds = new Rectangle(loc.x, loc.y, cellWidth, getRowHeight(minIndex));
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, ...
return lobounds.union(hibounds);
for (int i = minIndex + 1; i <= maxIndex; i++) { Point hiLoc = indexToLocation(list, i); Rectangle hibounds = new Rectangle(hiLoc.x, hiLoc.y, cellWidth, getRowHeight(i)); bounds = bounds.union(hibounds); } return bounds;
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, ...
if (list.getModel().getSize() == 0)
int size = list.getModel().getSize(); if (size == 0)
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(); }
return bounds.getSize();
Dimension retVal = bounds.getSize(); Component parent = list.getParent(); if ((visibleRows == -1) && (parent instanceof JViewport)) { JViewport viewport = (JViewport) parent; if (layoutOrientation == JList.HORIZONTAL_WRAP) { int h = viewport.getSize().height; int cellsPerCol = h / cellHeight; int w = size / cellsPerCo...
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(); }
int getRowHeight(int row)
protected int getRowHeight(int row)
int getRowHeight(int row) { if (row < 0 || row >= cellHeights.length) return -1; else if (cellHeight != -1) return cellHeight; else return cellHeights[row]; }
return new Point(0, convertRowToY(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 numberOfCellsPerRow = -1; if (visibleRows <= 0) { Dimension listDim = li...
public Point indexToLocation(JList list, int index) { return new Point(0, convertRowToY(index)); }
void installDefaults()
protected void installDefaults()
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...
void installKeyboardActions()
protected void installKeyboardActions()
void installKeyboardActions() { }
void installListeners()
protected void installListeners()
void installListeners() { list.addFocusListener(focusListener); list.getModel().addListDataListener(listDataListener); list.addListSelectionListener(listSelectionListener); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); list.addPropertyChangeListener(pro...
list.addComponentListener(componentListener);
void installListeners() { list.addFocusListener(focusListener); list.getModel().addListDataListener(listDataListener); list.addListSelectionListener(listSelectionListener); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); list.addPropertyChangeListener(pro...
return convertYToRow(location.y);
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; int numberOfItems = list.getModel().getSize(); Dimension listDi...
public int locationToIndex(JList list, Point location) { return convertYToRow(location.y); }
void maybeUpdateLayoutState()
protected void maybeUpdateLayoutState()
void maybeUpdateLayoutState() { if (updateLayoutStateNeeded != 0) { updateLayoutState(); updateLayoutStateNeeded = 0; } }
public void paintBackground(Graphics g, JComponent c)
private void paintBackground(Graphics g, JComponent c)
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); }
void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead)
protected void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead)
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, ...
g.translate(bounds.x, bounds.y); comp.setBounds(new Rectangle(0, 0, bounds.width, bounds.height)); comp.paint(g); g.translate(-bounds.x, -bounds.y);
rendererPane.paintComponent(g, comp, list, bounds);
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 uninstallDefaults()
protected void uninstallDefaults()
void uninstallDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(null); list.setBackground(null); list.setSelectionForeground(null); list.setSelectionBackground(null); }
void uninstallKeyboardActions()
protected void uninstallKeyboardActions()
void uninstallKeyboardActions() { }
void uninstallListeners()
protected void uninstallListeners()
void uninstallListeners() { list.removeFocusListener(focusListener); list.getModel().removeListDataListener(listDataListener); list.removeListSelectionListener(listSelectionListener); list.removeMouseListener(mouseInputListener); list.removeMouseMotionListener(mouseInputListener); list.removeProper...
void updateLayoutState()
protected void updateLayoutState()
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...
if (list.getLayoutOrientation() == JList.VERTICAL) cellWidth = Math.max(cellWidth, list.getSize().width);
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...
else if (p.y + d.height > c.getHeight())
if (p.y + d.height > c.getHeight())
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; }
JLayeredPane pane = ((JRootPane) SwingUtilities. getAncestorOfClass(JRootPane.class, currentComponent)). getLayeredPane();
JLayeredPane pane = null; JRootPane r = ((JRootPane) SwingUtilities. getAncestorOfClass(JRootPane.class, currentComponent)); if (r != null) pane = r.getLayeredPane();
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
SAXParser parser = new SAXParser(); InputSource input = new InputSource(args[0]); parser.parse(input, new org.xml.sax.helpers.DefaultHandler());
boolean validating = false; boolean namespaceAware = false; boolean xIncludeAware = false; boolean expectCallbackClass = false; String callbackClass = null; int pos = 0; while (pos < args.length && (args[pos].startsWith("-") || expectCallbackClass)) { if ("-x".equals(args[pos])) xIncludeAware = true; else if ("-v".equa...
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()); }
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")); if (fore == null || fore instanceof UIResource) comboBox.se...
LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background", "ComboBox.foreground", "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")); ...
shadow = defaults.getColor("ComboBox.buttonShadow"); darkShadow = defaults.getColor("ComboBox.buttonDarkShadow"); highlight = defaults.getColor("ComboBox.buttonHighlight");
shadow = UIManager.getColor("ComboBox.buttonShadow"); darkShadow = UIManager.getColor("ComboBox.buttonDarkShadow"); highlight = UIManager.getColor("ComboBox.buttonHighlight");
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 JComponent createContentPane() {
protected Container createContentPane() {
protected JComponent createContentPane() { return new SwingFrameContentPane(); }
paintBorder(g);
Rectangle clip = g.getClipBounds(); if (clip.x == 0 && clip.y == 0 && clip.width == getWidth() && clip.height == getHeight()) RepaintManager.currentManager(this).markCompletelyClean(this);
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 ...
Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle());
Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache);
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) ...
Rectangle bounds = children[i].getBounds();
Rectangle bounds = children[i].getBounds(rectCache);
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) ...
Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty())
if (!g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height))
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) ...
g.setClip(clip.x, clip.y, clip.width, clip.height);
g.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
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) ...
synchronized (paintLock) {
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...
if (oldX != getX() || oldY != getY()) fireAncestorEvent(this, AncestorEvent.ANCESTOR_MOVED);
public void reshape(int x, int y, int w, int h) { super.reshape(x, y, w, h); }
repaint();
public void setBackground(Color bg) { super.setBackground(bg); }
Border oldBorder = border;
Border oldBorder = getBorder(); if (oldBorder == newBorder) return;
public void setBorder(Border newBorder) { Border oldBorder = border; border = newBorder; firePropertyChange("border", oldBorder, newBorder); }
repaint();
public void setBorder(Border newBorder) { Border oldBorder = border; border = newBorder; firePropertyChange("border", oldBorder, newBorder); }
boolean oldEnabled = isEnabled();
if (enable == isEnabled()) return;
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabled", oldEnabled, enable); }
firePropertyChange("enabled", oldEnabled, enable);
firePropertyChange("enabled", !enable, enable); repaint();
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabled", oldEnabled, enable); }
revalidate(); repaint();
public void setFont(Font f) { super.setFont(f); }
repaint();
public void setForeground(Color fg) { super.setForeground(fg); }
revalidate(); repaint();
protected void setUI(ComponentUI newUI) { if (ui != null) ui.uninstallUI(this); ComponentUI oldUI = ui; ui = newUI; if (ui != null) ui.installUI(this); firePropertyChange("UI", oldUI, newUI); }
if (isVisible() == v) return;
public void setVisible(boolean v) { super.setVisible(v); Container parent = getParent(); if (parent != null) parent.repaint(getX(), getY(), getWidth(), getHeight()); revalidate(); }
xform.concatenate(post);
concetenateTransform (post);
public void concatenateTransform(AffineTransform post) { xform.concatenate(post); }
concatenateTransform(post);
xform.concatenate (post);
public void concetenateTransform(AffineTransform post) { concatenateTransform(post); }
xform.preConcatenate(pre);
preConcetenateTransform (pre);
public void preConcatenateTransform(AffineTransform pre) { xform.preConcatenate(pre); }
preConcetenateTransform(pre);
xform.preConcatenate (pre);
public void preConcetenateTransform(AffineTransform pre) { preConcetenateTransform(pre); }
setIcon(getLeafIcon());
setLeafIcon(getLeafIcon());
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
setIcon(getOpenIcon());
setOpenIcon(getOpenIcon());
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
setIcon(getClosedIcon());
setClosedIcon(getClosedIcon());
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
setEnabled(true); setFont(getFont()); if (selected) { super.setBackground(getBackgroundSelectionColor()); super.setForeground(getTextSelectionColor()); } else { super.setBackground((tree.getParent()).getBackground()); super.setForeground(getTextNonSelectionColor()); }
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, ...
if (attribs[i].begin_index > getEndIndex() || attribs[i].end_index <= getBeginIndex()) continue;
getAllAttributeKeys(){ HashSet s = new HashSet(); if (attribs == null) return(s); for (int i = 0; i < attribs.length; i++) { Set key_set = attribs[i].attribs.keySet(); Iterator iter = key_set.iterator(); while (iter.hasNext()) { s.add(iter.next()); } } return(s);}
(ci.getIndex() <= attribs[i].end_index))
(ci.getIndex() < attribs[i].end_index))
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...
(ci.getIndex() <= attribs[i].end_index))
(ci.getIndex() < attribs[i].end_index))
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);}
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() { name = "main"; parent = null; maxpri = Thread.MAX_PRIORITY; }
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); }
public int activeCount() { return allThreadsCount();
public int activeCount() { int total = 0; if (groups == null) return total; int i = threads.size(); while (--i >= 0) if (((Thread) threads.get(i)).isAlive()) total++; i = groups.size(); while (--i >= 0) total += ((ThreadGroup) groups.get(i)).activeCount(); return total;
public int activeCount() { return allThreadsCount(); }
public int activeGroupCount() { return allGroupsCount();
public int activeGroupCount() { if (groups == null) return 0; int total = groups.size(); int i = total; while (--i >= 0) total += ((ThreadGroup) groups.get(i)).activeGroupCount(); return total;
public int activeGroupCount() { return allGroupsCount(); }
public boolean allowThreadSuspension(boolean b) { return true; }
public boolean allowThreadSuspension(boolean allow) { return false; }
public boolean allowThreadSuspension(boolean b) { // Ignore return true; }
public final void checkAccess() { SecurityManager sm = System.getSecurityManager();
public final void checkAccess() { SecurityManager sm = SecurityManager.current;
public final void checkAccess() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccess(this); }
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()) { ThreadGroup...
public final synchronized void destroy() { checkAccess(); if (! threads.isEmpty() || groups == null) throw new IllegalThreadStateException(); int i = groups.size(); while (--i >= 0) ((ThreadGroup) groups.get(i)).destroy(); groups = null; if (parent != null) parent.removeGroup(this);
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 int enumerate(Thread[] list) { return enumerate(list, false);
public int enumerate(Thread[] array) { return enumerate(array, 0, true);
public int enumerate(Thread[] list) { return enumerate(list, false); }
public final int getMaxPriority() { return maxPriority;
public final int getMaxPriority() { return maxpri;
public final int getMaxPriority() { return maxPriority; }
public final ThreadGroup getParent() { return parent; }
public final ThreadGroup getParent() { if (parent != null) parent.checkAccess(); return parent; }
public final ThreadGroup getParent() { return parent; }
public final boolean isDaemon() { return daemon; }
public final boolean isDaemon() { return daemon_flag; }
public final boolean isDaemon() { return daemon; }
public boolean isDestroyed() { return destroyed;
public synchronized boolean isDestroyed() { return groups == null;
public boolean isDestroyed() { return destroyed; }
public final boolean parentOf(ThreadGroup g) { return (this == g) || parentOf(g.getParent());
public final boolean parentOf(ThreadGroup group) { while (group != null) { if (group == this) return true; group = group.parent; } return false;
public final boolean parentOf(ThreadGroup g) { return (this == g) || parentOf(g.getParent()); }
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 synchronized void resume() { checkAccess(); if (groups == null) return; int i = threads.size(); while (--i >= 0) ((Thread) threads.get(i)).resume(); i = groups.size(); while (--i >= 0) ((ThreadGroup) groups.get(i)).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(); } }
public final void setDaemon(boolean daemon) { checkAccess(); this.daemon = daemon; }
public final void setDaemon(boolean daemon) { checkAccess(); daemon_flag = daemon; }
public final void setDaemon(boolean daemon) { checkAccess(); this.daemon = daemon; }
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.hasMoreEle...
public final synchronized void setMaxPriority(int maxpri) { checkAccess(); if (maxpri < Thread.MIN_PRIORITY || maxpri > Thread.MAX_PRIORITY) return; if (parent != null && maxpri > parent.maxpri) maxpri = parent.maxpri; this.maxpri = maxpri; if (groups == null) return; int i = groups.size(); while (--i >= 0) ((ThreadGro...
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 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 synchronized void stop() { checkAccess(); if (groups == null) return; int i = threads.size(); while (--i >= 0) ((Thread) threads.get(i)).stop(); i = groups.size(); while (--i >= 0) ((ThreadGroup) groups.get(i)).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(); } }
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 synchronized void suspend() { checkAccess(); if (groups == null) return; int i = threads.size(); while (--i >= 0) ((Thread) threads.get(i)).suspend(); i = groups.size(); while (--i >= 0) ((ThreadGroup) groups.get(i)).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(); } }
public String toString() { return getClass().getName() + "[name=" + name + ",maxpri=" + maxPriority + "]";
public String toString() { return getClass().getName() + "[name=" + name + ",maxpri=" + maxpri + ']';
public String toString() { return getClass().getName() + "[name=" + name + ",maxpri=" + maxPriority + "]"; }
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 thread, Throwable t) { if (parent != null) parent.uncaughtException(thread, t); else if (! (t instanceof ThreadDeath)) { if (t == null) throw new NullPointerException(); had_uncaught_exception = true; try { if (thread != null) System.err.print("Exception in thread \"" + thread.name ...
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(); }
JDesktopPane toUse = getDesktopPaneForComponent(parentComponent);
JLayeredPane toUse = getDesktopPaneForComponent(parentComponent);
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
throw new RuntimeException("parentComponent does not have a valid parent");
toUse = JLayeredPane.getLayeredPaneAbove(parentComponent); if (toUse == null) throw new RuntimeException ("parentComponent does not have a valid parent");
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
frame.pack(); frame.setVisible(true);
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { JDesktopPane toUse = getDesktopPaneForComponent(parentComponent); if (toUse == null) throw new RuntimeException("par...
startModal(frame, pane);
startModal(frame);
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...
startModal(frame, pane);
startModal(frame);
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); ...
startModal(frame, pane);
startModal(frame);
public static void showInternalMessageDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message); JInternalFrame frame = pane.createInternalFrame(parentComponent, null); startModal(frame, pane); }
startModal(frame, pane);
startModal(frame);
public static int showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, ...
private static void startModal(JInternalFrame f, JOptionPane pane)
private static void startModal(JInternalFrame f)
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...
f.getContentPane().add(pane); f.pack(); f.show(); Dimension pref = f.getPreferredSize(); f.setBounds(0, 0, pref.width, pref.height);
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...
if (cs != null) { ProtectionDomain protectionDomain = new ProtectionDomain(cs, getPermissions(cs));
if (cs != null) { ProtectionDomain protectionDomain = new ProtectionDomain(cs, getPermissions(cs), this, null);
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 PermissionCollection getPermissions(CodeSource cs) { Policy policy = Policy.getPolicy();
protected PermissionCollection getPermissions(CodeSource cs) { Policy policy = Policy.getCurrentPolicy();
protected PermissionCollection getPermissions(CodeSource cs) { Policy policy = Policy.getPolicy(); return policy.getPermissions(cs); }
public ProtectionDomain(CodeSource code_source, PermissionCollection perms) { this.code_source = code_source; this.perms = perms; if (perms != null) perms.setReadOnly(); }
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions) { this(codesource, permissions, null, null, true); }
public ProtectionDomain(CodeSource code_source, PermissionCollection perms) { this.code_source = code_source; this.perms = perms; if (perms != null) perms.setReadOnly(); }
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 IndexOutOfBoundsException(); } if (protDomain == null) { protDomain = (...
protected final Class defineClass(byte[] data, int offset, int length) { return defineClass(null, data, offset, length, null);
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...
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.COMPONENT_EVENT_MASK) != 0 && event instanceof ComponentEvent && (id >= ComponentEvent.COM...
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...