rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
{
|
public int compareTo(Object other) { if (other instanceof ParameterNode) { ParameterNode pn = (ParameterNode) other; boolean r1 = references(pn.name); boolean r2 = pn.references(name); if (r1 && r2) { throw new IllegalArgumentException("circular definitions"); } if (r1) { return 1; } if (r2) { return -1; } } return 0; }
|
|
}
|
public int compareTo(Object other) { if (other instanceof ParameterNode) { ParameterNode pn = (ParameterNode) other; boolean r1 = references(pn.name); boolean r2 = pn.references(name); if (r1 && r2) { throw new IllegalArgumentException("circular definitions"); } if (r1) { return 1; } if (r2) { return -1; } } return 0; }
|
|
{
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { // push the variable context stylesheet.bindings.push(type); // set the variable Object value = getValue(stylesheet, mode, context, pos, len); if (value != null) { stylesheet.bindings.set(name, value, type); if (stylesheet.debug) { System.err.println(this + ": set to " + value); } } // variable and param don't process children as such // all subsequent instructions are processed with that variable context if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } // pop the variable context stylesheet.bindings.pop(type); }
|
|
}
|
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { // push the variable context stylesheet.bindings.push(type); // set the variable Object value = getValue(stylesheet, mode, context, pos, len); if (value != null) { stylesheet.bindings.set(name, value, type); if (stylesheet.debug) { System.err.println(this + ": set to " + value); } } // variable and param don't process children as such // all subsequent instructions are processed with that variable context if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } // pop the variable context stylesheet.bindings.pop(type); }
|
|
{
|
Object getValue(Stylesheet stylesheet, QName mode, Node context, int pos, int len) throws TransformerException { if (select != null) { return select.evaluate(context, pos, len); } else if (children != null) { Document doc = (context instanceof Document) ? (Document) context : context.getOwnerDocument(); DocumentFragment fragment = doc.createDocumentFragment(); children.apply(stylesheet, mode, context, pos, len, fragment, null); return Collections.singleton(fragment); } else { return null; } }
|
|
}
|
Object getValue(Stylesheet stylesheet, QName mode, Node context, int pos, int len) throws TransformerException { if (select != null) { return select.evaluate(context, pos, len); } else if (children != null) { Document doc = (context instanceof Document) ? (Document) context : context.getOwnerDocument(); DocumentFragment fragment = doc.createDocumentFragment(); children.apply(stylesheet, mode, context, pos, len, fragment, null); return Collections.singleton(fragment); } else { return null; } }
|
|
{
|
public boolean references(QName var) { if (select != null && select.references(var)) { return true; } return super.references(var); }
|
|
}
|
public boolean references(QName var) { if (select != null && select.references(var)) { return true; } return super.references(var); }
|
|
StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); if (select != null) { buf.append(",select="); buf.append(select); } buf.append(",type=");
|
StringBuffer buf = new StringBuffer();
|
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); if (select != null) { buf.append(",select="); buf.append(select); } buf.append(",type="); switch (type) { case Bindings.VARIABLE: buf.append("variable"); break; case Bindings.PARAM: buf.append("param"); break; case Bindings.WITH_PARAM: buf.append("with-param"); break; } buf.append(']'); return buf.toString(); }
|
buf.append('['); buf.append("name="); buf.append(name); if (select != null) { buf.append(",select="); buf.append(select); }
|
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); if (select != null) { buf.append(",select="); buf.append(select); } buf.append(",type="); switch (type) { case Bindings.VARIABLE: buf.append("variable"); break; case Bindings.PARAM: buf.append("param"); break; case Bindings.WITH_PARAM: buf.append("with-param"); break; } buf.append(']'); return buf.toString(); }
|
|
String key, message;
|
String message;
|
public String format(LogRecord record) { StringBuffer buf = new StringBuffer(400); Level level = record.getLevel(); long millis = record.getMillis(); Object[] params = record.getParameters(); ResourceBundle bundle = record.getResourceBundle(); String key, message; buf.append("<record>"); buf.append(lineSep); appendTag(buf, 1, "date", iso8601.format(new Date(millis))); appendTag(buf, 1, "millis", record.getMillis()); appendTag(buf, 1, "sequence", record.getSequenceNumber()); appendTag(buf, 1, "logger", record.getLoggerName()); if (level.isStandardLevel()) appendTag(buf, 1, "level", level.toString()); else appendTag(buf, 1, "level", level.intValue()); appendTag(buf, 1, "class", record.getSourceClassName()); appendTag(buf, 1, "method", record.getSourceMethodName()); appendTag(buf, 1, "thread", record.getThreadID()); /* The Sun J2SE 1.4 reference implementation does not emit the * message in localized form. This is in violation of the API * specification. The GNU Classpath implementation intentionally * replicates the buggy behavior of the Sun implementation, as * different log files might be a big nuisance to users. */ try { record.setResourceBundle(null); message = formatMessage(record); } finally { record.setResourceBundle(bundle); } appendTag(buf, 1, "message", message); /* The Sun J2SE 1.4 reference implementation does not * emit key, catalog and param tags. This is in violation * of the API specification. The Classpath implementation * intentionally replicates the buggy behavior of the * Sun implementation, as different log files might be * a big nuisance to users. * * FIXME: File a bug report with Sun. Insert bug number here. * * * key = record.getMessage(); * if (key == null) * key = ""; * * if ((bundle != null) && !key.equals(message)) * { * appendTag(buf, 1, "key", key); * appendTag(buf, 1, "catalog", record.getResourceBundleName()); * } * * if (params != null) * { * for (int i = 0; i < params.length; i++) * appendTag(buf, 1, "param", params[i].toString()); * } */ /* FIXME: We have no way to obtain the stacktrace before free JVMs * support the corresponding method in java.lang.Throwable. Well, * it would be possible to parse the output of printStackTrace, * but this would be pretty kludgy. Instead, we postpose the * implementation until Throwable has made progress. */ Throwable thrown = record.getThrown(); if (thrown != null) { buf.append(" <exception>"); buf.append(lineSep); /* The API specification is not clear about what exactly * goes into the XML record for a thrown exception: It * could be the result of getMessage(), getLocalizedMessage(), * or toString(). Therefore, it was necessary to write a * Mauve testlet and run it with the Sun J2SE 1.4 reference * implementation. It turned out that the we need to call * toString(). * * FIXME: File a bug report with Sun, asking for clearer * specs. */ appendTag(buf, 2, "message", thrown.toString()); /* FIXME: The Logging DTD specifies: * * <!ELEMENT exception (message?, frame+)> * * However, java.lang.Throwable.getStackTrace() is * allowed to return an empty array. So, what frame should * be emitted for an empty stack trace? We probably * should file a bug report with Sun, asking for the DTD * to be changed. */ buf.append(" </exception>"); buf.append(lineSep); } buf.append("</record>"); buf.append(lineSep); return buf.toString(); }
|
XMLParser ret = new XMLParser(reader, null, validating, namespaceAware, coalescing, replacingEntityReferences, externalEntities, supportDTD, baseAware, stringInterning, reporter, resolver); if (xIncludeAware) return new XIncludeFilter(ret, null, namespaceAware, validating, replacingEntityReferences); return ret;
|
return createXMLStreamReader(null, reader);
|
public XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException { /* return new XMLStreamReaderImpl(reader, null, null, resolver, reporter, validating, namespaceAware, coalescing, replacingEntityReferences, externalEntities, supportDTD); */ XMLParser ret = new XMLParser(reader, null, validating, namespaceAware, coalescing, replacingEntityReferences, externalEntities, supportDTD, baseAware, stringInterning, reporter, resolver); if (xIncludeAware) return new XIncludeFilter(ret, null, namespaceAware, validating, replacingEntityReferences); return ret; }
|
Logger.getLogger("global").setUseParentHandlers(true);
|
protected LogManager() { if (logManager != null) throw new IllegalStateException( "there can be only one LogManager; use LogManager.getLogManager()"); logManager = this; loggers = new java.util.HashMap(); rootLogger = new Logger("", null); addLogger(rootLogger); /* Make sure that Logger.global has the rootLogger as its parent. * * Logger.global is set during class initialization of Logger, * which may or may not be before this code is being executed. * For example, on the Sun 1.3.1 and 1.4.0 JVMs, Logger.global * has been set before this code is being executed. In contrast, * Logger.global still is null on GCJ 3.2. Since the LogManager * and Logger classes are mutually dependent, both behaviors are * correct. * * This means that we cannot depend on Logger.global to have its * value when this code executes, although that variable is final. * Since Logger.getLogger will always return the same logger for * the same name, the subsequent line works fine irrespective of * the order in which classes are initialized. */ Logger.getLogger("global").setParent(rootLogger); }
|
|
Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1);
|
int nrows = Math.min(list.getVisibleRowCount(), list.getModel().getSize()); Rectangle bounds = getCellBounds(list, 0, nrows - 1);
|
public Dimension getPreferredSize(JComponent c) { maybeUpdateLayoutState(); if (list.getModel().getSize() == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); return bounds.getSize(); }
|
throw new Error("Not implemented");
|
return new Point(0, convertRowToY(index));
|
public Point indexToLocation(JList list, int index) { throw new Error("Not implemented"); }
|
list.setOpaque(true);
|
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(defaults.getColor("List.selectionBackground")); }
|
|
throw new Error("Not implemented");
|
return convertYToRow(location.y);
|
public int locationToIndex(JList list, Point location) { throw new Error("Not implemented"); }
|
return DefaultActivationSystem.singleton;
|
return DefaultActivationSystem.get();
|
public static ActivationSystem getSystem() throws ActivationException { if (system == null) return DefaultActivationSystem.singleton; else return system; }
|
public ActivationException(String s)
|
public ActivationException()
|
public ActivationException(String s) { this(s, null); }
|
this(s, null);
|
this(null, null);
|
public ActivationException(String s) { this(s, null); }
|
public ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
|
public ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
|
public ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) { throw new Error("Not implemented");}
|
boolean remove(Object o);
|
E remove(int index);
|
boolean remove(Object o);
|
if (thisParts[1].equals (BigInteger.valueOf (0)) == false) while (thisParts[1].mod (BigInteger.valueOf (10)).equals (BigInteger.valueOf (0))) thisParts[1] = thisParts[1].divide (BigInteger.valueOf (10)); if (valParts[1].equals(BigInteger.valueOf (0)) == false) while (valParts[1].mod (BigInteger.valueOf (10)).equals (BigInteger.valueOf (0))) valParts[1] = valParts[1].divide (BigInteger.valueOf (10));
|
if (scale < val.scale) thisParts[1] = thisParts[1].multiply (BigInteger.valueOf (10).pow (val.scale - scale)); else if (scale > val.scale) valParts[1] = valParts[1].multiply (BigInteger.valueOf (10).pow (scale - val.scale));
|
public int compareTo (BigDecimal val) { if (scale == val.scale) return intVal.compareTo (val.intVal); BigInteger thisParts[] = intVal.divideAndRemainder (BigInteger.valueOf (10).pow (scale)); BigInteger valParts[] = val.intVal.divideAndRemainder (BigInteger.valueOf (10).pow (val.scale)); int compare; if ((compare = thisParts[0].compareTo (valParts[0])) != 0) return compare; // quotients are the same, so compare remainders // remove trailing zeros if (thisParts[1].equals (BigInteger.valueOf (0)) == false) while (thisParts[1].mod (BigInteger.valueOf (10)).equals (BigInteger.valueOf (0))) thisParts[1] = thisParts[1].divide (BigInteger.valueOf (10)); // again... if (valParts[1].equals(BigInteger.valueOf (0)) == false) while (valParts[1].mod (BigInteger.valueOf (10)).equals (BigInteger.valueOf (0))) valParts[1] = valParts[1].divide (BigInteger.valueOf (10)); // and compare them return thisParts[1].compareTo (valParts[1]); }
|
public BigInteger abs()
|
private static BigInteger abs(BigInteger x)
|
public BigInteger abs() { return abs(this); }
|
return abs(this);
|
return x.isNegative() ? neg(x) : x;
|
public BigInteger abs() { return abs(this); }
|
public BigInteger negate()
|
private static boolean negate(int[] dest, int[] src, int len)
|
public BigInteger negate() { return neg(this); }
|
return neg(this);
|
long carry = 1; boolean negative = src[len-1] < 0; for (int i = 0; i < len; i++) { carry += ((long) (~src[i]) & 0xffffffffL); dest[i] = (int) carry; carry >>= 32; } return (negative && dest[len-1] < 0);
|
public BigInteger negate() { return neg(this); }
|
public final Class getCategory()
|
public Class getCategory()
|
public final Class getCategory() { return PrinterName.class; }
|
public final String getName()
|
public String getName()
|
public final String getName() { return "printer-name"; }
|
return value.hashCode() + locale.hashCode();
|
return value.hashCode() ^ locale.hashCode();
|
public int hashCode() { return value.hashCode() + locale.hashCode(); }
|
Rectangle b = shape.getBounds(); if (ec != null) preferenceChanged(this, true, true);
|
if (ec != null && shape != null) preferenceChanged(null, true, true); Container c = getContainer(); if (c != null) c.repaint();
|
protected void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape) { Rectangle b = shape.getBounds(); if (ec != null) preferenceChanged(this, true, true); }
|
if (nextChar == 0) { if (! round) pos--; break; }
|
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int currentX = x0; for (pos = p0; pos < s.getEndIndex(); pos++) { char nextChar = s.array[pos]; if (nextChar != '\n') currentX += fm.charWidth(nextChar); else { if (te == null) currentX += fm.charWidth(' '); else currentX = (int) te.nextTabStop(currentX, pos); } if (currentX >= x) { if (! round) pos--; break; } } return pos; }
|
|
throw new Error("Not implemented");
|
Thread currThread = Thread.currentThread(); if (currThread instanceof RMIIncomingThread) { RMIIncomingThread incomingThread = (RMIIncomingThread) currThread; return incomingThread.getClientHost(); } else { throw new ServerNotActiveException( "Unknown client host - current thread not instance of 'RMIIncomingThread'"); }
|
public static String getClientHost() throws ServerNotActiveException { throw new Error("Not implemented");}
|
public ServerNotActiveException(String s)
|
public ServerNotActiveException()
|
public ServerNotActiveException(String s) { super(s); }
|
super(s);
|
public ServerNotActiveException(String s) { super(s); }
|
|
super.setLayout(new BorderLayout(1, 1));
|
super.setLayout(new BorderLayout()); setBackground(UIManager.getDefaults().getColor("control"));
|
protected void frameInit() { super.setLayout(new BorderLayout(1, 1)); enableEvents(AWTEvent.WINDOW_EVENT_MASK); getRootPane(); // will do set/create // Setup the defaultLookAndFeelDecoration if requested. if (isDefaultLookAndFeelDecorated() && UIManager.getLookAndFeel().getSupportsWindowDecorations()) { setUndecorated(true); getRootPane().setWindowDecorationStyle(JRootPane.FRAME); } // We're now done the init stage. setRootPaneCheckingEnabled(true); }
|
Frame(String title)
|
Frame()
|
Frame(String title){ super(); this.title = title; // Top-level frames are initially invisible. visible = false; noteFrame(this);}
|
super(); this.title = title; visible = false;
|
this("");
|
Frame(String title){ super(); this.title = title; // Top-level frames are initially invisible. visible = false; noteFrame(this);}
|
public abstract boolean addMember(Principal user);
|
boolean addMember(Principal user);
|
public abstract boolean addMember(Principal user);
|
public abstract boolean isMember(Principal member);
|
boolean isMember(Principal member);
|
public abstract boolean isMember(Principal member);
|
public abstract Enumeration members();
|
Enumeration members();
|
public abstract Enumeration members();
|
public abstract boolean removeMember(Principal user);
|
boolean removeMember(Principal user);
|
public abstract boolean removeMember(Principal user);
|
public int findColumn(String columnName) {
|
public int findColumn (String columnName) { int count = getColumnCount(); for (int index = 0; index < count; index++) { String name = getColumnName (index); if (name.equals (columnName)) return index; }
|
public int findColumn(String columnName) { // Variables int index; String name; int count; // Process Columns count = getColumnCount(); for (index = 0; index < count; index++) { name = getColumnName(index); if (columnName.equals(name) == true) { return index; } // if } // for // Unable to Locate return -1; } // findColumn()
|
int index; String name; int count; count = getColumnCount(); for (index = 0; index < count; index++) { name = getColumnName(index); if (columnName.equals(name) == true) { return index; } } return -1; }
|
return -1; }
|
public int findColumn(String columnName) { // Variables int index; String name; int count; // Process Columns count = getColumnCount(); for (index = 0; index < count; index++) { name = getColumnName(index); if (columnName.equals(name) == true) { return index; } // if } // for // Unable to Locate return -1; } // findColumn()
|
public void fireTableChanged(TableModelEvent event) { Object[] list; int index; TableModelListener listener;
|
public void fireTableChanged (TableModelEvent event) { int index; TableModelListener listener; Object[] list = listenerList.getListenerList();
|
public void fireTableChanged(TableModelEvent event) { // Variables Object[] list; int index; TableModelListener listener; // Get Listener List list = listenerList.getListenerList(); for (index = 0; index < list.length; index += 2) { // Get Listener listener = (TableModelListener) list[index + 1]; // Notify Listener listener.tableChanged(event); } // for: index } // fireTableChanged()
|
list = listenerList.getListenerList(); for (index = 0; index < list.length; index += 2) { listener = (TableModelListener) list[index + 1]; listener.tableChanged(event); } }
|
for (index = 0; index < list.length; index += 2) { listener = (TableModelListener) list [index + 1]; listener.tableChanged (event); } }
|
public void fireTableChanged(TableModelEvent event) { // Variables Object[] list; int index; TableModelListener listener; // Get Listener List list = listenerList.getListenerList(); for (index = 0; index < list.length; index += 2) { // Get Listener listener = (TableModelListener) list[index + 1]; // Notify Listener listener.tableChanged(event); } // for: index } // fireTableChanged()
|
public String getColumnName(int columnIndex) {
|
public String getColumnName (int columnIndex) { int index = columnIndex + 1; StringBuffer buffer = new StringBuffer();
|
public String getColumnName(int columnIndex) { // Variables int index; int left; int base; int multiplier; StringBuffer buffer; boolean foundFirst; // Ok, this is not the best solution in the world // and it does produce wrong answers starting 1378 // but it's a start. I sure hope there is a more // simple algorithm. I started with a base 10 to // base 26 converter and later found that there // were so many are exceptions that it has morphed // into a pile of goop. // NOTE2: I have a working algorithm which is much // much simplier and works for all values...I'll // be adding it soon... // Process Exponent levels buffer = new StringBuffer(); left = columnIndex; foundFirst = false; for (index = 6; index >= 0; index--) { base = (int) (Math.pow(26, index)); if (index > 1) { base = base + (int) (Math.pow(26, index - 1)); } if (base <= left) { multiplier = left / base; if (foundFirst == false && index > 0) { buffer.append((char) (multiplier + 64)); } else { buffer.append((char) (multiplier + 65)); } left = left - (base * multiplier); foundFirst = true; } else if (foundFirst == true || index == 0) { buffer.append('A'); } } // for // Return Column Name return buffer.toString(); } // getColumnName()
|
int index; int left; int base; int multiplier; StringBuffer buffer; boolean foundFirst; buffer = new StringBuffer(); left = columnIndex; foundFirst = false; for (index = 6; index >= 0; index--) { base = (int) (Math.pow(26, index)); if (index > 1) { base = base + (int) (Math.pow(26, index - 1)); } if (base <= left) { multiplier = left / base; if (foundFirst == false && index > 0) { buffer.append((char) (multiplier + 64)); } else { buffer.append((char) (multiplier + 65)); } left = left - (base * multiplier); foundFirst = true; } else if (foundFirst == true || index == 0) { buffer.append('A'); } } return buffer.toString(); }
|
while (index > 0) { buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; } return buffer.toString(); }
|
public String getColumnName(int columnIndex) { // Variables int index; int left; int base; int multiplier; StringBuffer buffer; boolean foundFirst; // Ok, this is not the best solution in the world // and it does produce wrong answers starting 1378 // but it's a start. I sure hope there is a more // simple algorithm. I started with a base 10 to // base 26 converter and later found that there // were so many are exceptions that it has morphed // into a pile of goop. // NOTE2: I have a working algorithm which is much // much simplier and works for all values...I'll // be adding it soon... // Process Exponent levels buffer = new StringBuffer(); left = columnIndex; foundFirst = false; for (index = 6; index >= 0; index--) { base = (int) (Math.pow(26, index)); if (index > 1) { base = base + (int) (Math.pow(26, index - 1)); } if (base <= left) { multiplier = left / base; if (foundFirst == false && index > 0) { buffer.append((char) (multiplier + 64)); } else { buffer.append((char) (multiplier + 65)); } left = left - (base * multiplier); foundFirst = true; } else if (foundFirst == true || index == 0) { buffer.append('A'); } } // for // Return Column Name return buffer.toString(); } // getColumnName()
|
log.debug("Old DPMS state: " + dpmsState);
|
public synchronized void close() { hwCursor.closeCursor(); final DpmsState dpmsState = getDpms(); //log.debug("Old DPMS state: " + dpmsState); setDpms(DpmsState.OFF); vgaIO.unlock(); oldVgaState.restoreToVGA(vgaIO); setDpms(dpmsState); // For debugging purposes //final NVidiaVgaState debugState = new NVidiaVgaState(); //debugState.saveFromVGA(vgaIO); //log.debug("Restored state: " + debugState); // End of debugging purposes driver.close(this); super.close(); }
|
|
log.debug("End of close");
|
public synchronized void close() { hwCursor.closeCursor(); final DpmsState dpmsState = getDpms(); //log.debug("Old DPMS state: " + dpmsState); setDpms(DpmsState.OFF); vgaIO.unlock(); oldVgaState.restoreToVGA(vgaIO); setDpms(dpmsState); // For debugging purposes //final NVidiaVgaState debugState = new NVidiaVgaState(); //debugState.saveFromVGA(vgaIO); //log.debug("Restored state: " + debugState); // End of debugging purposes driver.close(this); super.close(); }
|
|
createURLStreamHandler(String protocol);
|
URLStreamHandler createURLStreamHandler(String protocol);
|
createURLStreamHandler(String protocol);
|
}
|
header = h; columnIndex = c; }
|
private AccessibleJTableHeaderCell(JTableHeader h, Component comp, int r, int c) { }
|
return null;
|
return this;
|
public AccessibleContext getAccessibleContext() { // TODO Auto-generated method stub return null; }
|
Component renderer = getColumnHeaderRenderer(); if (renderer instanceof Accessible) { Accessible ac = (Accessible) renderer; return ac.getAccessibleContext().getAccessibleRole(); }
|
public AccessibleRole getAccessibleRole() { // TODO Auto-generated method stub return null; }
|
|
return getAccessibleChild(r * getAccessibleColumnCount() + c);
|
TableCellRenderer cellRenderer = getCellRenderer(r, c); Component renderer = cellRenderer.getTableCellRendererComponent( JTable.this, getValueAt(r, c), isCellSelected(r, c), false, r, c); if (renderer instanceof Accessible) return (Accessible) renderer; return null;
|
public Accessible getAccessibleAt(int r, int c) { return getAccessibleChild(r * getAccessibleColumnCount() + c); }
|
public static Border createLineBorder( Color color, int thickness) { return null; }
|
public static Border createLineBorder(Color color) { return null; }
|
public static Border createLineBorder( Color color, int thickness) { /* Creates a line border withe the specified color and width. The width applies to all 4 sides of the border. To specify widths individually for the top, bottom, left, and right, use createMatteBorder(int,int,int,int,Color). Parameters: color - a Color to use for the linethickness - an int specifying the width in pixelsReturns: the Border object createRaisedBevelBorder */ return null; }
|
public void setBorderPainted(boolean b) { if (b != paint_border) { paint_border = b; revalidate(); repaint(); } }
|
public void setBorderPainted(boolean b) { boolean old = paint_border; paint_border = b; if (b != old) { firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } }
|
public void setBorderPainted(boolean b) { if (b != paint_border) { paint_border = b; revalidate(); repaint(); } }
|
getPixel(xx, yy, pixel, data);
|
pixel = getPixel(xx, yy, pixel, data);
|
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) { int size = w*h; int outOffset = 0; int[] pixel = null; if (iArray == null) iArray = new int[w*h*numBands]; for (int yy=y; yy<(y+h); yy++) { for (int xx=x; xx<(x+w); xx++) { getPixel(xx, yy, pixel, data); System.arraycopy(pixel, 0, iArray, outOffset, numBands); outOffset += numBands; } } return iArray; }
|
public int getColumnCount() { return (columnIdentifiers == null ? 0 : columnIdentifiers.size());
|
public int getColumnCount() { return columnIdentifiers == null ? 0 : columnIdentifiers.size();
|
public int getColumnCount() { return (columnIdentifiers == null ? 0 : columnIdentifiers.size()); }
|
checkSize();
|
public String getColumnName(int column) { String result = ""; if (columnIdentifiers == null) result = super.getColumnName(column); else { if (column < getColumnCount()) { Object id = columnIdentifiers.get(column); if (id != null) result = id.toString(); else result = super.getColumnName(column); } else result = super.getColumnName(column); } return result; }
|
|
setColumnCount((columnIdentifiers == null ? 0 : columnIdentifiers.size()));
|
setColumnCount(columnIdentifiers == null ? 0 : columnIdentifiers.size());
|
public void setColumnIdentifiers(Vector columnIdentifiers) { this.columnIdentifiers = columnIdentifiers; setColumnCount((columnIdentifiers == null ? 0 : columnIdentifiers.size())); }
|
for (int i = 0; i < rowsToAdd; i++) { Vector tmp = new Vector(); tmp.setSize(columnIdentifiers.size()); dataVector.add(tmp); } fireTableRowsInserted(existingRowCount,rowCount-1);
|
addExtraRows(rowsToAdd, columnIdentifiers.size()); fireTableRowsInserted(existingRowCount, rowCount - 1);
|
public void setRowCount(int rowCount) { int existingRowCount = dataVector.size(); if (rowCount < existingRowCount) { dataVector.setSize(rowCount); fireTableRowsDeleted(rowCount,existingRowCount-1); } else { int rowsToAdd = rowCount - existingRowCount; for (int i = 0; i < rowsToAdd; i++) { Vector tmp = new Vector(); tmp.setSize(columnIdentifiers.size()); dataVector.add(tmp); } fireTableRowsInserted(existingRowCount,rowCount-1); } }
|
if (value == unset)
|
if (value == UNSET)
|
public Object getValue() throws Exception { if (value == unset) value = doExecute(); return value; }
|
if (value != unset)
|
if (value != UNSET)
|
public String toString() { String result = super.toString(); if (value != unset) return value.getClass().getName() + " " + result; return result; }
|
System.out.println("ptypeslen = " + ptypes.length); System.out.println("ptypes = " + ptypes); System.out.println("ctor = " + ctors[i].getName()); for (int j=0; j < ptypes.length; j++) { System.out.println("param = " + ptypes[i].getName()); }
|
final Object doExecute() throws Exception { Class klazz = (target instanceof Class) ? (Class) target : target.getClass(); Object args[] = (arguments == null) ? new Object[0] : arguments; Class argTypes[] = new Class[args.length]; for (int i = 0; i < args.length; i++) argTypes[i] = args[i].getClass(); if (target.getClass().isArray()) { // FIXME: invoke may have to be used. For now, cast to Number // and hope for the best. If caller didn't behave, we go boom // and throw the exception. if (methodName.equals("get") && argTypes.length == 1) return Array.get(target, ((Number)args[0]).intValue()); if (methodName.equals("set") && argTypes.length == 2) { Object obj = Array.get(target, ((Number)args[0]).intValue()); Array.set(target, ((Number)args[0]).intValue(), args[1]); return obj; } throw new NoSuchMethodException("No matching method for statement " + toString()); } // If we already cached the method, just use it. if (method != null) return method.invoke(target, args); else if (ctor != null) return ctor.newInstance(args); // Find a matching method to call. JDK seems to go through all // this to find the method to call. // if method name or length don't match, skip // Need to go through each arg // If arg is wrapper - check if method arg is matchable builtin // or same type or super // - check that method arg is same or super if (methodName.equals("new") && target instanceof Class) { Constructor ctors[] = klazz.getConstructors(); for (int i = 0; i < ctors.length; i++) { // Skip methods with wrong number of args. Class ptypes[] = ctors[i].getParameterTypes(); System.out.println("ptypeslen = " + ptypes.length); System.out.println("ptypes = " + ptypes); System.out.println("ctor = " + ctors[i].getName()); for (int j=0; j < ptypes.length; j++) { System.out.println("param = " + ptypes[i].getName()); } if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (ctor == null) { ctor = ctors[i]; continue; } Class mptypes[] = ctor.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) ctor = ctors[i]; } if (ctor == null) throw new InstantiationException("No matching constructor for statement " + toString()); return ctor.newInstance(args); } Method methods[] = klazz.getMethods(); for (int i = 0; i < methods.length; i++) { // Skip methods with wrong name or number of args. if (!methods[i].getName().equals(methodName)) continue; Class ptypes[] = methods[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (method == null) { method = methods[i]; continue; } Class mptypes[] = method.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) method = methods[i]; } if (method == null) throw new NoSuchMethodException("No matching method for statement " + toString()); return method.invoke(target, args); }
|
|
String result = target.getClass().getName() + "." + methodName + "(";
|
StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("(");
|
public String toString() { String result = target.getClass().getName() + "." + methodName + "("; String sep = ""; for (int i = 0; i < arguments.length; i++) { result = result + sep + arguments[i].getClass().getName(); sep = ", "; } result = result + ")"; return result; }
|
result = result + sep + arguments[i].getClass().getName();
|
result.append(sep); result.append(arguments[i].getClass().getName());
|
public String toString() { String result = target.getClass().getName() + "." + methodName + "("; String sep = ""; for (int i = 0; i < arguments.length; i++) { result = result + sep + arguments[i].getClass().getName(); sep = ", "; } result = result + ")"; return result; }
|
result = result + ")"; return result;
|
result.append(")"); return result.toString();
|
public String toString() { String result = target.getClass().getName() + "." + methodName + "("; String sep = ""; for (int i = 0; i < arguments.length; i++) { result = result + sep + arguments[i].getClass().getName(); sep = ", "; } result = result + ")"; return result; }
|
public abstract long get ();
|
public LongBuffer get (long[] dst, int offset, int length) { checkArraySize(dst.length, offset, length); checkForUnderflow(length); for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; }
|
public abstract long get ();
|
return super.hashCode ();
|
long hashCode = get(position()) + 31; long multiplier = 1; for (int i = position() + 1; i < limit(); ++i) { multiplier *= 31; hashCode += (get(i) + 30)*multiplier; } return ((int)hashCode);
|
public int hashCode () { // FIXME: Check what SUN calculates here. return super.hashCode (); }
|
public abstract LongBuffer put (long b);
|
public LongBuffer put (LongBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { long[] toPut = new long [src.remaining ()]; src.get (toPut); put (toPut); } return this; }
|
public abstract LongBuffer put (long b);
|
final public static LongBuffer wrap (long[] array, int offset, int length)
|
public static final LongBuffer wrap (long[] array, int offset, int length)
|
final public static LongBuffer wrap (long[] array, int offset, int length) { return new LongBufferImpl (array, 0, array.length, offset + length, offset, -1, false); }
|
public gnuIorInfo(ORB_1_4 an_orb, POA a_poa, IOR an_ior)
|
public gnuIorInfo(ORB_1_4 an_orb, gnuPOA a_poa, IOR an_ior)
|
public gnuIorInfo(ORB_1_4 an_orb, POA a_poa, IOR an_ior) { orb = an_orb; poa = a_poa; ior = an_ior; }
|
short state()
|
public short state()
|
short state() { return (short) poa.the_POAManager().get_state().value(); }
|
UnsupportedLookAndFeelException(String a)
|
public UnsupportedLookAndFeelException(String a)
|
UnsupportedLookAndFeelException(String a) { super(a); }
|
awtEventListeners = new AWTEventListenerProxy[0];
|
public Toolkit() { }
|
|
SecurityManager s = System.getSecurityManager(); if (s != null) s.checkPermission(new AWTPermission("listenToAllAWTEvents")); boolean found = false; for (int i = 0; i < awtEventListeners.length; ++i) { AWTEventListenerProxy proxy = awtEventListeners[i]; if (proxy.getListener() == listener) { found = true; AWTEventListenerProxy newProxy = new AWTEventListenerProxy(proxy.getEventMask() | eventMask, listener); awtEventListeners[i] = newProxy; break;
|
public void addAWTEventListener(AWTEventListener listener, long eventMask) { // SecurityManager s = System.getSecurityManager(); // if (s != null) // s.checkPermission(AWTPermission("listenToAllAWTEvents")); // FIXME }
|
|
} if (! found) { AWTEventListenerProxy proxy = new AWTEventListenerProxy(eventMask, listener); AWTEventListenerProxy[] newArray = new AWTEventListenerProxy[awtEventListeners.length + 1]; System.arraycopy(awtEventListeners, 0, newArray, 0, awtEventListeners.length); newArray[newArray.length - 1] = proxy; awtEventListeners = newArray; } }
|
public void addAWTEventListener(AWTEventListener listener, long eventMask) { // SecurityManager s = System.getSecurityManager(); // if (s != null) // s.checkPermission(AWTPermission("listenToAllAWTEvents")); // FIXME }
|
|
return null;
|
SecurityManager s = System.getSecurityManager(); if (s != null) s.checkPermission(new AWTPermission("listenToAllAWTEvents")); AWTEventListener[] copy = new AWTEventListener[awtEventListeners.length]; System.arraycopy(awtEventListeners, 0, copy, 0, awtEventListeners.length); return copy;
|
public AWTEventListener[] getAWTEventListeners() { return null; }
|
return null;
|
return new Insets(0, 0, 0, 0);
|
public Insets getScreenInsets(GraphicsConfiguration gc) { return null; }
|
SecurityManager s = System.getSecurityManager(); if (s != null) s.checkPermission(new AWTPermission("listenToAllAWTEvents")); int index = -1; for (int i = 0; i < awtEventListeners.length; ++i) { AWTEventListenerProxy proxy = awtEventListeners[i]; if (proxy.getListener() == listener) { index = i; break;
|
public void removeAWTEventListener(AWTEventListener listener) { // FIXME }
|
|
} if (index != -1) { AWTEventListenerProxy[] newArray = new AWTEventListenerProxy[awtEventListeners.length - 1]; if (index > 0) System.arraycopy(awtEventListeners, 0, newArray, 0, index); if (index < awtEventListeners.length - 1) System.arraycopy(awtEventListeners, index + 1, newArray, index, awtEventListeners.length - index - 1); awtEventListeners = newArray; } }
|
public void removeAWTEventListener(AWTEventListener listener) { // FIXME }
|
|
private void damageLayout()
|
void damageLayout()
|
private void damageLayout() { updateLayoutStateNeeded = 1; list.revalidate(); }
|
protected AWTKeyStroke(char keyChar, int keyCode, int modifiers, boolean onKeyRelease)
|
protected AWTKeyStroke()
|
protected AWTKeyStroke(char keyChar, int keyCode, int modifiers, boolean onKeyRelease) { this.keyChar = keyChar; this.keyCode = keyCode; // No need to call extend(), as only trusted code calls this constructor. this.modifiers = modifiers; this.onKeyRelease = onKeyRelease; }
|
this.keyChar = keyChar; this.keyCode = keyCode; this.modifiers = modifiers; this.onKeyRelease = onKeyRelease;
|
keyChar = KeyEvent.CHAR_UNDEFINED;
|
protected AWTKeyStroke(char keyChar, int keyCode, int modifiers, boolean onKeyRelease) { this.keyChar = keyChar; this.keyCode = keyCode; // No need to call extend(), as only trusted code calls this constructor. this.modifiers = modifiers; this.onKeyRelease = onKeyRelease; }
|
window = new JWindow();
|
window = new JWindow(SwingUtilities.getWindowAncestor(owner));
|
public JWindowPopup(Component owner, Component contents, int x, int y) { /* Checks whether contents is null. */ super(owner, contents, x, y); this.contents = contents; window = new JWindow(); window.getContentPane().add(contents); window.setLocation(x, y); window.setFocusableWindowState(false); }
|
this(null);
|
super(null);
|
public JWindow() { this(null); }
|
Container getContentPane()
|
public Container getContentPane()
|
Container getContentPane() { return getRootPane().getContentPane(); }
|
file = new File (getURL().getFile());
|
file = new File (unquote(getURL().getFile()));
|
public void connect() throws IOException { // Call is ignored if already connected. if (connected) return; // If not connected, then file needs to be openned. file = new File (getURL().getFile()); if (! file.isDirectory()) { if (doInput) inputStream = new BufferedInputStream(new FileInputStream(file)); if (doOutput) outputStream = new BufferedOutputStream(new FileOutputStream(file)); } else { if (doInput) { inputStream = new ByteArrayInputStream(getDirectoryListing()); } if (doOutput) throw new ProtocolException ("file: protocol does not support output on directories"); } connected = true; }
|
throws UnsupportedEncodingException
|
throws IOException
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
if (compatibilityMode)
|
encoder.reset(); if (!encoder.canEncode(text))
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
StringBuffer buf = null;
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
|
if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null)
|
if (encoder.canEncode(c))
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
if (buf != null) {
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
|
return text.getBytes(encoding);
|
encoded.flip(); int len = encoded.limit() - encoded.position(); byte[] ret = new byte[len]; encoded.get(ret, 0, len); return ret;
|
final byte[] encodeText(String text) throws UnsupportedEncodingException { if (compatibilityMode) { int len = text.length(); StringBuffer buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c >= 127) { if (buf == null) { buf = new StringBuffer(text.substring(0, i)); } buf.append('&'); buf.append('#'); buf.append((int) c); buf.append(';'); } else if (buf != null) { buf.append(c); } } if (buf != null) { text = buf.toString(); } } return text.getBytes(encoding); }
|
public RegistryImpl(int port, RMIClientSocketFactory cf, RMIServerSocketFactory sf) throws RemoteException { super(new UnicastServerRef(new ObjID(ObjID.REGISTRY_ID), port, sf));
|
public RegistryImpl(int port) throws RemoteException { this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
|
public RegistryImpl(int port, RMIClientSocketFactory cf, RMIServerSocketFactory sf) throws RemoteException { super(new UnicastServerRef(new ObjID(ObjID.REGISTRY_ID), port, sf)); // The following is unnecessary, because UnicastRemoteObject export itself automatically. //((UnicastServerRef)getRef()).exportObject(this);}
|
public UnicastRef(ObjID objid, String host, int port, RMIClientSocketFactory csf) { this(objid); manager = UnicastConnectionManager.getInstance(host, port, csf);
|
public UnicastRef() {
|
public UnicastRef(ObjID objid, String host, int port, RMIClientSocketFactory csf) { this(objid); manager = UnicastConnectionManager.getInstance(host, port, csf);}
|
public IllegalAccessError(String s)
|
public IllegalAccessError()
|
public IllegalAccessError(String s) { super(s); }
|
super(s);
|
public IllegalAccessError(String s) { super(s); }
|
|
}
|
public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException { if (obj instanceof RemoteObject) { UnicastServerRef sref = (UnicastServerRef)((RemoteObject)obj).getRef(); return sref.unexportObject(obj, force); } else //FIX ME ; return true; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.