rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
{
public static byte[] toBytesFromString(String s) { int limit = s.length(); byte[] result = new byte[((limit + 1) / 2)]; int i = 0, j = 0; if ((limit % 2) == 1) { result[j++] = (byte) fromDigit(s.charAt(i++)); } while (i < limit) { result[j] = (byte) (fromDigit(s.charAt(i++...
}
public static byte[] toBytesFromString(String s) { int limit = s.length(); byte[] result = new byte[((limit + 1) / 2)]; int i = 0, j = 0; if ((limit % 2) == 1) { result[j++] = (byte) fromDigit(s.charAt(i++)); } while (i < limit) { result[j] = (byte) (fromDigit(s.charAt(i++...
{
public static byte[] toReversedBytesFromString(String s) { int limit = s.length(); byte[] result = new byte[((limit + 1) / 2)]; int i = 0; if ((limit % 2) == 1) { result[i++] = (byte) fromDigit(s.charAt(--limit)); } while (limit > 0) { result[i] = (byte) fromDigit(s.charAt...
}
public static byte[] toReversedBytesFromString(String s) { int limit = s.length(); byte[] result = new byte[((limit + 1) / 2)]; int i = 0; if ((limit % 2) == 1) { result[i++] = (byte) fromDigit(s.charAt(--limit)); } while (limit > 0) { result[i] = (byte) fromDigit(s.charAt...
{
public static final byte[] trim(BigInteger n) { byte[] in = n.toByteArray(); if (in.length == 0 || in[0] != 0) { return in; } int len = in.length; int i = 1; while (in[i] == 0 && i < len) { ++i; } byte[] result = new byte[len - i]; System.arraycopy(in, i, result...
}
public static final byte[] trim(BigInteger n) { byte[] in = n.toByteArray(); if (in.length == 0 || in[0] != 0) { return in; } int len = in.length; int i = 1; while (in[i] == 0 && i < len) { ++i; } byte[] result = new byte[len - i]; System.arraycopy(in, i, result...
public NumberFormatException(String s) { super(s);
public NumberFormatException() {
public NumberFormatException(String s) { super(s); }
throw new Error("not implemented");
int hash = Float.floatToIntBits(width); hash ^= cap; hash ^= join; hash ^= Float.floatToIntBits(limit); for (int i = 0; i < dash.length; i++) hash ^= Float.floatToIntBits(dash[i]); hash ^= Float.floatToIntBits(phase); return hash;
public int hashCode() { throw new Error("not implemented"); }
void setRangeProperties(int value, int extent, int min, int max, boolean adjusting);
void setRangeProperties(int value, int extent, int minimum, int maximum, boolean adjusting);
void setRangeProperties(int value, int extent, int min, int max, boolean adjusting);
&& e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0))
&& e.id >= ItemEvent.ITEM_FIRST) { ItemEvent ie = (ItemEvent) e; int itemState = ie.getStateChange(); setState(itemState == ItemEvent.SELECTED ? true : false); if (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)
dispatchEventImpl(AWTEvent e){ if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e);}
}
dispatchEventImpl(AWTEvent e){ if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e);}
}
setState(boolean state){ this.state = state; if (peer != null) { CheckboxPeer cp = (CheckboxPeer) peer; cp.setState (state); }}
public void update(byte[] buf, int off, int len) {
public void update (int bval) {
public void update(byte[] buf, int off, int len) { int c = ~crc; while (--len >= 0) c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8); crc = ~c; }
while (--len >= 0) c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8);
c = crc_table[(c ^ bval) & 0xff] ^ (c >>> 8);
public void update(byte[] buf, int off, int len) { int c = ~crc; while (--len >= 0) c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8); crc = ~c; }
if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".equals(name)) { return; }
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } Entity entity = popEntity(); // TODO resolve external entities to ensure that entity has content if (expandEntityReferenc...
if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".equals(name)) { return; }
public void startEntity(String name) throws SAXException { DocumentType doctype = doc.getDoctype(); if (doctype == null) { throw new SAXException("SAX parser error: " + "reference to entity in undeclared doctype"); } if ("[dtd]".equals(name) || name.charAt(0...
public AnySeqHolder(Any [] a_value)
public AnySeqHolder()
public AnySeqHolder(Any [] a_value) { value = a_value; }
value = a_value;
public AnySeqHolder(Any [] a_value) { value = a_value; }
StreamHandler( OutputStream out, String propertyPrefix, Level defaultLevel, Formatter formatter, Class defaultFormatterClass)
public StreamHandler()
StreamHandler( OutputStream out, String propertyPrefix, Level defaultLevel, Formatter formatter, Class defaultFormatterClass) { this.level = LogManager.getLevelProperty(propertyPrefix + ".level", defaultLevel); this.filter = (Filter) LogManager.getInstanceProperty( propertyPrefix + "....
this.level = LogManager.getLevelProperty(propertyPrefix + ".level", defaultLevel); this.filter = (Filter) LogManager.getInstanceProperty( propertyPrefix + ".filter", Filter.class, null); if (formatter != null) this.formatter = formatter; else this.formatter = (Formatter) LogManager.getInstanceProperty( prope...
this(null, null);
StreamHandler( OutputStream out, String propertyPrefix, Level defaultLevel, Formatter formatter, Class defaultFormatterClass) { this.level = LogManager.getLevelProperty(propertyPrefix + ".level", defaultLevel); this.filter = (Filter) LogManager.getInstanceProperty( propertyPrefix + "....
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return PrinterMakeAndModel.class; }
public final String getName()
public String getName()
public final String getName() { return "printer-make-and-model"; }
}
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
setAnchorSelectionIndex(index0); leadSelectionIndex = index1;
public void removeSelectionInterval(int index0, int index1) { int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.clear(lo, hi+1); fireValueChanged(lo, hi, valueIsAdjusting); }
{
public void setLeadSelectionIndex(int leadIndex) { int oldLeadIndex = leadSelectionIndex; leadSelectionIndex = leadIndex; if (anchorSelectionIndex == -1) return; int R1 = Math.min(anchorSelectionIndex, oldLeadIndex); int R2 = Math.max(anchorSelectionIndex, oldLeadIndex); int S1 = Math.min(anch...
}
public void setLeadSelectionIndex(int leadIndex) { int oldLeadIndex = leadSelectionIndex; leadSelectionIndex = leadIndex; if (anchorSelectionIndex == -1) return; int R1 = Math.min(anchorSelectionIndex, oldLeadIndex); int R2 = Math.max(anchorSelectionIndex, oldLeadIndex); int S1 = Math.min(anch...
setAnchorSelectionIndex(index0); leadSelectionIndex=index1;
public void setSelectionInterval(int index0, int index1) { sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); fireValueChanged(lo, hi, valueIsAdjusting); }
public void set(int from, int to)
public void set(int pos)
public void set(int from, int to) { if (from < 0 || from > to) throw new IndexOutOfBoundsException(); if (from == to) return; int lo_offset = from >>> 6; int hi_offset = to >>> 6; ensure(hi_offset); if (lo_offset == hi_offset) { bits[hi_offset] |= (-1L << from) & ((1L << to) -...
if (from < 0 || from > to) throw new IndexOutOfBoundsException(); if (from == to) return; int lo_offset = from >>> 6; int hi_offset = to >>> 6; ensure(hi_offset); if (lo_offset == hi_offset) { bits[hi_offset] |= (-1L << from) & ((1L << to) - 1); return; } bits[lo_offset] |= -1L << from; bits[hi_offset] |= (1L << to) -...
int offset = pos >> 6; ensure(offset); bits[offset] |= 1L << pos;
public void set(int from, int to) { if (from < 0 || from > to) throw new IndexOutOfBoundsException(); if (from == to) return; int lo_offset = from >>> 6; int hi_offset = to >>> 6; ensure(hi_offset); if (lo_offset == hi_offset) { bits[hi_offset] |= (-1L << from) & ((1L << to) -...
public BitSet get(int from, int to)
public boolean get(int pos)
public BitSet get(int from, int to) { if (from < 0 || from > to) throw new IndexOutOfBoundsException(); BitSet bs = new BitSet(to - from); int lo_offset = from >>> 6; if (lo_offset >= bits.length) return bs; int lo_bit = from & LONG_MASK; int hi_offset = to >>> 6; if (lo_bit == 0) ...
if (from < 0 || from > to) throw new IndexOutOfBoundsException(); BitSet bs = new BitSet(to - from); int lo_offset = from >>> 6; if (lo_offset >= bits.length) return bs; int lo_bit = from & LONG_MASK; int hi_offset = to >>> 6; if (lo_bit == 0) { int len = Math.min(hi_offset - lo_offset + 1, bits.length - lo_offset); S...
int offset = pos >> 6; if (offset >= bits.length) return false; return (bits[offset] & (1L << pos)) != 0;
public BitSet get(int from, int to) { if (from < 0 || from > to) throw new IndexOutOfBoundsException(); BitSet bs = new BitSet(to - from); int lo_offset = from >>> 6; if (lo_offset >= bits.length) return bs; int lo_bit = from & LONG_MASK; int hi_offset = to >>> 6; if (lo_bit == 0) ...
public static Registry getRegistry(int port) throws RemoteException { return (getRegistry("localhost", port));
public static Registry getRegistry() throws RemoteException { return (getRegistry("localhost", Registry.REGISTRY_PORT));
public static Registry getRegistry(int port) throws RemoteException { return (getRegistry("localhost", port));}
public ULongLongSeqHolder(long[] initial_value)
public ULongLongSeqHolder()
public ULongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); }
value = initial_value; typecode.setLength(value.length);
public ULongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); }
notifyInterceptors(state.value());
public void activate() throws AdapterInactive { if (state != State.INACTIVE) state = State.ACTIVE; else throw new AdapterInactive(); }
notifyInterceptors(state.value());
public void deactivate(boolean etherealize_objects, boolean wait_for_completion ) throws AdapterInactive { if (state == State.INACTIVE) throw new AdapterInactive("Repetetive inactivation"); state = State.INACTIVE; if (wait_for_completion) ...
notifyInterceptors(state.value());
public void discard_requests(boolean wait_for_completion) throws AdapterInactive { if (state != State.INACTIVE) state = State.DISCARDING; else throw new AdapterInactive(); if (wait_for_completion) waitForIdle(); }
notifyInterceptors(state.value());
public void hold_requests(boolean wait_for_completion) throws AdapterInactive { if (state != State.INACTIVE) state = State.HOLDING; else throw new AdapterInactive(); if (wait_for_completion) waitForIdle(); }
gnuPOA poa = (gnuPOA) iter.next();
poa = (gnuPOA) iter.next();
public void waitForIdle() { if (state == State.ACTIVE) throw new BAD_INV_ORDER("The state is active"); Iterator iter = POAs.iterator(); while (iter.hasNext()) { gnuPOA poa = (gnuPOA) iter.next(); poa.waitWhileRunning(); } }
public double distance(Point2D p)
public static double distance(double x1, double y1, double x2, double y2)
public double distance(Point2D p) { return distance(getX(), p.getX(), getY(), p.getY()); }
return distance(getX(), p.getX(), getY(), p.getY());
return Math.sqrt(distanceSq(x1, y1, x2, y2));
public double distance(Point2D p) { return distance(getX(), p.getX(), getY(), p.getY()); }
boolean contains(Point2D p);
boolean contains(double x, double y);
boolean contains(Point2D p);
if ((! (view instanceof Scrollable) || ((Scrollable) view).getScrollableTracksViewportHeight()) && viewPref.height < portBounds.height)
if ((! (view instanceof Scrollable) && viewPref.height < portBounds.height || (view instanceof Scrollable && ((Scrollable) view).getScrollableTracksViewportHeight())))
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
if ((! (view instanceof Scrollable) || ((Scrollable) view).getScrollableTracksViewportWidth()) && viewPref.width < portBounds.width)
if ((! (view instanceof Scrollable) && viewPref.width < portBounds.width || (view instanceof Scrollable && ((Scrollable) view).getScrollableTracksViewportWidth())))
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0;
public BoxLayout(Container container, int way) { int width = 0; int height = 0; ComponentOrientation orientation = container.getComponentOrientation();
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0; this.way = way; if (way == X_AXIS) { width = 1; } else { height = 1; } gridbag = new GridLayout(width, height); }
this.way = way;
this.container = container; this.way = way;
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0; this.way = way; if (way == X_AXIS) { width = 1; } else { height = 1; } gridbag = new GridLayout(width, height); }
if (way == X_AXIS) { width = 1; }
switch (way) { case X_AXIS: width = 1; break; case Y_AXIS: height = 1; break; case LINE_AXIS: if (orientation.isHorizontal()) height = 1;
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0; this.way = way; if (way == X_AXIS) { width = 1; } else { height = 1; } gridbag = new GridLayout(width, height); }
{ height = 1; }
width = 1; break; case PAGE_AXIS: if (!orientation.isHorizontal()) height = 1; else width = 1; break; default: throw new AWTError("Invalid value for way"); }
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0; this.way = way; if (way == X_AXIS) { width = 1; } else { height = 1; } gridbag = new GridLayout(width, height); }
gridbag = new GridLayout(width, height); }
grid = new GridLayout(width, height); }
public BoxLayout(JComponent p, int way) { int width = 0; int height = 0; this.way = way; if (way == X_AXIS) { width = 1; } else { height = 1; } gridbag = new GridLayout(width, height); }
public void addLayoutComponent(String name, Component comp) { if (way == X_AXIS) { gridbag.setColumns( gridbag.getColumns() + 1); } else { gridbag.setRows( gridbag.getRows() + 1); } }
public void addLayoutComponent(String name, Component component) { if (way == X_AXIS || (way == LINE_AXIS && component.getComponentOrientation().isHorizontal()) || (way == PAGE_AXIS && !component.getComponentOrientation().isHorizontal())) grid.setColumns(grid.getColumns() + 1); else grid.setRows(grid.getRows() + 1); }
public void addLayoutComponent(String name, Component comp) { if (way == X_AXIS) { gridbag.setColumns( gridbag.getColumns() + 1); } else { gridbag.setRows( gridbag.getRows() + 1); } }
public float getLayoutAlignmentX ( Container parent ) { return 0; }
public float getLayoutAlignmentX(Container parent) { if (parent != container) throw new AWTError("invalid parent"); return 0; }
public float getLayoutAlignmentX ( Container parent ) { return 0; }
public float getLayoutAlignmentY ( Container parent ) { return 0; }
public float getLayoutAlignmentY(Container parent) { if (parent != container) throw new AWTError("invalid parent"); return 0; }
public float getLayoutAlignmentY ( Container parent ) { return 0; }
public void invalidateLayout ( Container parent ) { }
public void invalidateLayout(Container parent) { if (parent != container) throw new AWTError("invalid parent"); }
public void invalidateLayout ( Container parent ) { }
{ gridbag.layoutContainer(parent); }
{ if (parent != container) throw new AWTError("invalid parent"); grid.layoutContainer(parent); }
public void layoutContainer(Container parent) { gridbag.layoutContainer(parent); }
public Dimension maximumLayoutSize ( Container parent ) { return preferredLayoutSize(parent); }
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); return preferredLayoutSize(parent); }
public Dimension maximumLayoutSize ( Container parent ) { return preferredLayoutSize(parent); }
{ return gridbag.minimumLayoutSize(parent); }
{ if (parent != container) throw new AWTError("invalid parent"); return grid.minimumLayoutSize(parent); }
public Dimension minimumLayoutSize(Container parent) { return gridbag.minimumLayoutSize(parent); }
{ return gridbag.preferredLayoutSize(parent); }
{ if (parent != container) throw new AWTError("invalid parent"); return grid.preferredLayoutSize(parent); }
public Dimension preferredLayoutSize(Container parent) { return gridbag.preferredLayoutSize(parent); }
public void removeLayoutComponent(Component comp) { gridbag.removeLayoutComponent(comp); if (way == X_AXIS) { gridbag.setColumns( gridbag.getColumns() - 1); } else { gridbag.setRows( gridbag.getRows() - 1); } }
public void removeLayoutComponent(Component component) { grid.removeLayoutComponent(component); if (way == X_AXIS || (way == LINE_AXIS && component.getComponentOrientation().isHorizontal()) || (way == PAGE_AXIS && !component.getComponentOrientation().isHorizontal())) grid.setColumns(grid.getColumns() - 1); else grid.s...
public void removeLayoutComponent(Component comp) { gridbag.removeLayoutComponent(comp); if (way == X_AXIS) { gridbag.setColumns( gridbag.getColumns() - 1); } else { gridbag.setRows( gridbag.getRows() - 1); } }
public GridLayout (int rows, int cols)
public GridLayout ()
public GridLayout (int rows, int cols) { this (rows, cols, 0, 0); }
this (rows, cols, 0, 0);
this (1, 0, 0, 0);
public GridLayout (int rows, int cols) { this (rows, cols, 0, 0); }
int x = insets.left + insets.right; int y = insets.bottom + insets.top;
int x = 0; int y = 0;
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = parent.getComponents(); if (isHorizonta...
x += insets.left + insets.right;
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = parent.getComponents(); if (isHorizonta...
private static void makeModal(JDialog dialog)
static void makeModal(JDialog dialog)
private static void makeModal(JDialog dialog) { try { synchronized (dialog) { while (dialog.isVisible()) dialog.wait(); } } catch (InterruptedException e) { } }
JDialog(Frame owner, String s) { this(owner, s, true); }
JDialog(Frame owner) { this(owner, "dialog"); }
JDialog(Frame owner, String s) { this(owner, s, true); }
public DefaultColorSelectionModel() { }
public DefaultColorSelectionModel() { this (Color.white); }
public DefaultColorSelectionModel() { // TODO } // DefaultColorSelectionModel()
public abstract Color getSelectedColor();
Color getSelectedColor();
public abstract Color getSelectedColor();
public abstract void setSelectedColor(Color color);
void setSelectedColor(Color color);
public abstract void setSelectedColor(Color color);
Window() { setVisible(false); setLayout((LayoutManager) new BorderLayout()); }
Window() { visible = false; setLayout(new BorderLayout()); }
Window() { setVisible(false); setLayout((LayoutManager) new BorderLayout()); }
public void applyResourceBundle(ResourceBundle rb) { }
public void applyResourceBundle(ResourceBundle rb) { throw new Error ("Not implemented"); }
public void applyResourceBundle(ResourceBundle rb) { // FIXME }
void dispatchEventImpl(AWTEvent e) { if (e.id <= WindowEvent.WINDOW_LAST && e.id >= WindowEvent.WINDOW_FIRST && (windowListener != null || (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e); }
void dispatchEventImpl(AWTEvent e) { if (e.id <= WindowEvent.WINDOW_LAST && e.id >= WindowEvent.WINDOW_FIRST && (windowListener != null || windowFocusListener != null || windowStateListener != null || (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e); }
void dispatchEventImpl(AWTEvent e) { // Make use of event id's in order to avoid multiple instanceof tests. if (e.id <= WindowEvent.WINDOW_LAST && e.id >= WindowEvent.WINDOW_FIRST && (windowListener != null || (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e); }
Window[] list = getOwnedWindows(); for (int i = 0; i < list.length; i++) list[i].dispose();
synchronized (getTreeLock ()) { Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) w.dispose(); else e.remove(); }
public void dispose() { hide(); Window[] list = getOwnedWindows(); for (int i = 0; i < list.length; i++) list[i].dispose(); for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); this.removeNotify(); }
for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); this.removeNotify(); }
for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); this.removeNotify(); WindowEvent we = new WindowEvent(this, WindowEvent.WINDOW_CLOSED); getToolkit().getSystemEventQueue().postEvent(we); } }
public void dispose() { hide(); Window[] list = getOwnedWindows(); for (int i = 0; i < list.length; i++) list[i].dispose(); for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); this.removeNotify(); }
public Window[] getOwnedWindows() { return new Window[0]; }
public Window[] getOwnedWindows() { Window [] trimmedList; synchronized (getTreeLock ()) { Window [] validList = new Window [ownedWindows.size()]; Iterator e = ownedWindows.iterator(); int numValid = 0; while (e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) validList[numValid++] = w; ...
public Window[] getOwnedWindows() { // FIXME: return array containing all the windows this window currently // owns. return new Window[0]; }
public final String getWarningString() { boolean secure = true; if (!secure) { if (warningString != null) return warningString; else { String warning = System.getProperty("awt.appletWarning"); return warning; } } return null; }
public final String getWarningString() { return warningString; }
public final String getWarningString() { boolean secure = true; /* boolean secure = SecurityManager.checkTopLevelWindow(...) */ if (!secure) { if (warningString != null) return warningString; else { String warning = System.getProperty("awt.appletWarning"); return warning; } } return null; }
public void hide() { super.hide(); }
public void hide() { synchronized (getTreeLock ()) { Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) { if (w.isVisible() && w.getPeer() != null) w.getPeer().setVisible(false); } else e.remove(); } } super.hide(); }
public void hide() { // FIXME: call hide() on any "owned" children here. super.hide(); }
protected void processWindowEvent(WindowEvent evt) { if (windowListener != null) { switch (evt.getID()) { case WindowEvent.WINDOW_ACTIVATED : windowListener.windowActivated(evt); break; case WindowEvent.WINDOW_CLOSED : windowListener.windowClosed(evt); break; case WindowEvent.WINDOW_CLOSING : windowListener.windowClosi...
protected void processWindowEvent(WindowEvent evt) { int id = evt.getID(); if (id == WindowEvent.WINDOW_GAINED_FOCUS || id == WindowEvent.WINDOW_LOST_FOCUS) processWindowFocusEvent (evt); else if (id == WindowEvent.WINDOW_STATE_CHANGED) processWindowStateEvent (evt); else { if (windowListener != null) { switch (evt.ge...
protected void processWindowEvent(WindowEvent evt) { if (windowListener != null) { switch (evt.getID()) { case WindowEvent.WINDOW_ACTIVATED : windowListener.windowActivated(evt); break; case WindowEvent.WINDOW_CLOSED : windowListener.windowClosed(evt); break; case WindowEvent.WINDOW_CLOSING...
validate(); super.show(); toFront(); }
synchronized (getTreeLock()) { Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) { if (w.isVisible()) w.getPeer().setVisible(true); } else e.remove(); } } validate(); super.show(); toFront(); }
public void show() { if (parent != null && !parent.isDisplayable()) parent.addNotify(); if (peer == null) addNotify(); validate(); super.show(); toFront(); }
if (dispatcher != null && dispatcher.handleEvent (e)) return;
boolean dispatched = LightweightDispatcher.getInstance().dispatchEvent(e); if (! dispatched) {
void dispatchEventImpl(AWTEvent e) { // Give lightweight dispatcher a chance to handle it. if (dispatcher != null && dispatcher.handleEvent (e)) return; if ((e.id <= ContainerEvent.CONTAINER_LAST && e.id >= ContainerEvent.CONTAINER_FIRST) && (containerListener != null || (...
}
void dispatchEventImpl(AWTEvent e) { // Give lightweight dispatcher a chance to handle it. if (dispatcher != null && dispatcher.handleEvent (e)) return; if ((e.id <= ContainerEvent.CONTAINER_LAST && e.id >= ContainerEvent.CONTAINER_FIRST) && (containerListener != null || (...
public WindowEvent(Window source, int id)
public WindowEvent(Window source, int id, Window opposite, int oldState, int newState)
public WindowEvent(Window source, int id) { this(source, id, null, 0, 0); }
this(source, id, null, 0, 0);
super(source, id); this.opposite = opposite; this.oldState = oldState; this.newState = newState;
public WindowEvent(Window source, int id) { this(source, id, null, 0, 0); }
if (accessibleContext != null) { AccessibleJScrollPane asp = (AccessibleJScrollPane) accessibleContext; asp.resetViewPort(); }
public void setViewport(JViewport v) { if (viewport == v) return; JViewport old = viewport; removeNonNull(old); viewport = v; addNonNull(v, JScrollPane.VIEWPORT); revalidate(); repaint(); firePropertyChange("viewport", old, v); sync(); }
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalProgressBarUI instance; if (o == null) { instance = new MetalProgressBarUI(); instances.put(component, instance); } else instance = (MetalProgressBarUI) o; return instance;
return new MetalProgressBarUI();
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalProgressBarUI instance; if (o == null) { instance = new MetalProgressBarUI(); instances.put(component, instance); } else ...
boolean addAll(Collection<? extends E> c);
boolean addAll(int index, Collection<? extends E> c);
boolean addAll(Collection<? extends E> c);
if (!isSerializable() || isExternalizable())
if (!isSerializable() || isExternalizable() || isEnum())
private void setFields(Class cl) { SetAccessibleAction setAccessible = new SetAccessibleAction(); if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { final Field f = cl.getDeclaredField("serialPersistentFields"); setAccessible.setMember(f); AccessController.do...
ObjectStreamField[] fieldsName = new ObjectStreamField[fields.length]; System.arraycopy(fields, 0, fieldsName, 0, fields.length); Arrays.sort (fieldsName, new Comparator() { public int compare(Object o1, Object o2) { ObjectStreamField f1 = (ObjectStreamField)o1; ObjectStreamField f2 = (ObjectStreamField)o2; return f1...
private void setFields(Class cl) { SetAccessibleAction setAccessible = new SetAccessibleAction(); if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { final Field f = cl.getDeclaredField("serialPersistentFields"); setAccessible.setMember(f); AccessController.do...
if (cl.isEnum() || cl == Enum.class) flags |= ObjectStreamConstants.SC_ENUM;
private void setFlags(Class cl) { if ((java.io.Externalizable.class).isAssignableFrom(cl)) flags |= ObjectStreamConstants.SC_EXTERNALIZABLE; else if ((java.io.Serializable.class).isAssignableFrom(cl)) // only set this bit if CL is NOT Externalizable flags |= ObjectStreamConstants.SC_SERIALIZABLE...
put("Alg.Alias.MessageDigest.SHA-160", "SHA");
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class nam...
public static <T> void sort(T[] a, Comparator<? super T> c)
public static void sort(byte[] a)
public static <T> void sort(T[] a, Comparator<? super T> c) { sort(a, 0, a.length, c); }
sort(a, 0, a.length, c);
qsort(a, 0, a.length);
public static <T> void sort(T[] a, Comparator<? super T> c) { sort(a, 0, a.length, c); }
public void setRolloverEnabled(boolean b) { getModel().setRollover(b); }
public void setRolloverEnabled(boolean r) { boolean old = getModel().isRollover(); getModel().setRollover(r); if (old != getModel().isRollover()) { firePropertyChange(ROLLOVER_ENABLED_CHANGED_PROPERTY, old, r); revalidate(); repaint(); } }
public void setRolloverEnabled(boolean b) { getModel().setRollover(b); }
return cachedRaster.createChild(0 ,0 ,width ,height ,x ,y , null);
return cachedRaster.createChild(0 ,0 ,width ,height ,0 ,0 , null);
public Raster getRaster(int x, int y, int width, int height) { if( cachedRaster == null || cachedRaster.getWidth() < width || cachedRaster.getHeight() < height) { cachedRaster = new ColorRaster(colorModel, 0, 0, width, height, color); } return cachedRaster.createChild(0 ,0 ,width ,height ,x...
this.arguments = arguments;
this.arguments = (arguments != null) ? arguments : new Object[0]; storeTargetName(target);
public Statement(Object target, String methodName, Object[] arguments) { this.target = target; this.methodName = methodName; this.arguments = arguments; }
public Enumeration children() { return Collections.enumeration(tree_children); }
public abstract Enumeration children();
public Enumeration children() { return Collections.enumeration(tree_children); }
public boolean getAllowsChildren() { return true; }
public abstract boolean getAllowsChildren();
public boolean getAllowsChildren() { return true; }
public Element getElement(int index) { return (Element) element_children.get(index); }
public abstract Element getElement(int index);
public Element getElement(int index) { return (Element) element_children.get(index); }
return children.elements();
if (children.length == 0) return null; Vector tmp = new Vector(); for (int index = 0; index < children.length; ++index) tmp.add(children[index]); return tmp.elements();
public Enumeration children() { return children.elements(); }
if (index < 0 || index >= children.size())
if (index < 0 || index >= children.length)
public Element getElement(int index) { if (index < 0 || index >= children.size()) return null; return (Element) children.get(index); }
return (Element) children.get(index);
return children[index];
public Element getElement(int index) { if (index < 0 || index >= children.size()) return null; return (Element) children.get(index); }
return children.size();
return children.length;
public int getElementCount() { return children.size(); }