rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public DataFlavor(String mimeType) throws ClassNotFoundException | public DataFlavor() | public DataFlavor(String mimeType) throws ClassNotFoundException { this(mimeType, null); } |
this(mimeType, null); | mimeType = null; representationClass = null; humanPresentableName = null; | public DataFlavor(String mimeType) throws ClassNotFoundException { this(mimeType, null); } |
public String getParameter(String paramName) | private static String getParameter(String paramName, String mimeString) | public String getParameter(String paramName) { if ("humanPresentableName".equals(paramName)) return getHumanPresentableName(); return getParameter(paramName, mimeType); } |
if ("humanPresentableName".equals(paramName)) return getHumanPresentableName(); return getParameter(paramName, mimeType); | int idx = mimeString.indexOf(paramName + "="); if (idx == -1) return(null); String value = mimeString.substring(idx + paramName.length() + 1); idx = value.indexOf(" "); if (idx == -1) return(value); else return(value.substring(0, idx)); | public String getParameter(String paramName) { if ("humanPresentableName".equals(paramName)) return getHumanPresentableName(); return getParameter(paramName, mimeType); } |
throws IOException, ClassNotFoundException | throws IOException, ClassNotFoundException, NotImplementedException | public void readExternal(ObjectInput stream) throws IOException, ClassNotFoundException { // FIXME: Implement me } |
public void writeExternal(ObjectOutput stream) throws IOException | public void writeExternal(ObjectOutput stream) throws IOException, NotImplementedException | public void writeExternal(ObjectOutput stream) throws IOException { // FIXME: Implement me } |
throw new PatternSyntaxException(e.getMessage(), | PatternSyntaxException pse; pse = new PatternSyntaxException(e.getMessage(), | private Pattern (String regex, int flags) throws PatternSyntaxException { this.regex = regex; this.flags = flags; int gnuFlags = 0; if ((flags & CASE_INSENSITIVE) != 0) gnuFlags |= RE.REG_ICASE; if ((flags & MULTILINE) != 0) gnuFlags |= RE.REG_MULTILINE; if ((flags & DOTALL) != 0) ... |
pse.initCause(e); throw pse; | private Pattern (String regex, int flags) throws PatternSyntaxException { this.regex = regex; this.flags = flags; int gnuFlags = 0; if ((flags & CASE_INSENSITIVE) != 0) gnuFlags |= RE.REG_ICASE; if ((flags & MULTILINE) != 0) gnuFlags |= RE.REG_MULTILINE; if ((flags & DOTALL) != 0) ... | |
int len = dst.capacity() - dst.position(); | int len = dst.remaining(); | public SocketAddress receive (ByteBuffer dst) throws IOException { if (!isOpen()) throw new ClosedChannelException(); try { DatagramPacket packet; int len = dst.capacity() - dst.position(); if (dst.hasArray()) { packet = new DatagramPacket (dst.... |
if (maximum != old) firePropertyChange("maximum", old, maximum); | public void setMaximum(int maximum) { sliderModel.setMaximum(maximum); } | |
if (minimum != old) firePropertyChange("minimum", old, minimum); | public void setMinimum(int minimum) { sliderModel.setMinimum(minimum); } | |
boolean oldPaintLabels = paintLabels; | public void setPaintLabels(boolean paint) { if (paint != paintLabels) { boolean oldPaintLabels = paintLabels; paintLabels = paint; firePropertyChange("paintLabels", oldPaintLabels, paintLabels); } } | |
firePropertyChange("paintLabels", oldPaintLabels, paintLabels); | if (paint && majorTickSpacing > 0) labelTable = createStandardLabels(majorTickSpacing); firePropertyChange("paintLabels", !paint, paint); | public void setPaintLabels(boolean paint) { if (paint != paintLabels) { boolean oldPaintLabels = paintLabels; paintLabels = paint; firePropertyChange("paintLabels", oldPaintLabels, paintLabels); } } |
firePropertyChange("paintTrack", !paint, paint); } | public void setPaintTrack(boolean paint) { paintTrack = paint; } | |
fireStateChanged(); | firePropertyChange("snapToTicks", !snap, snap); | public void setSnapToTicks(boolean snap) { if (snap != snapToTicks) { snapToTicks = snap; fireStateChanged(); } } |
public boolean intersects(Rectangle2D r) | public boolean intersects(double x, double y, double w, double h) | public boolean intersects(Rectangle2D r) { return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } |
return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight()); | if (w <= 0 || h <= 0) return false; double x1 = getX1(); double y1 = getY1(); double x2 = getX2(); double y2 = getY2(); if (x1 >= x && x1 <= x + w && y1 >= y && y1 <= y + h) return true; if (x2 >= x && x2 <= x + w && y2 >= y && y2 <= y + h) return true; double x3 = x + w; double y3 = y + h; return (linesIntersect(x1... | public boolean intersects(Rectangle2D r) { return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } |
repaint(); | public FrameWrapper(JInternalFrame iFrame) { this.frame = iFrame; this.setText(iFrame.getTitle()); this.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { try { JInternalFrame frame =... | |
removeFrame(FrameWrapper.this.frame); | public void internalFrameClosed(InternalFrameEvent event) { remove(FrameWrapper.this); revalidate(); repaint(); } | |
removeFrame(FrameWrapper.this.frame); | public void internalFrameClosing(InternalFrameEvent event) { remove(FrameWrapper.this); revalidate(); repaint(); } | |
repaint(); | public void internalFrameDeiconified(InternalFrameEvent event) { //To change body of implemented methods use File | Settings | File Templates. } | |
repaint(); | public void internalFrameIconified(InternalFrameEvent event) { //To change body of implemented methods use File | Settings | File Templates. } | |
public boolean add(E o) | public void add(int index, E o) | public boolean add(E o) { add(size(), o); return true; } |
add(size(), o); return true; | throw new UnsupportedOperationException(); | public boolean add(E o) { add(size(), o); return true; } |
final int LEFT_TO_RIGHT = Character.DIRECTIONALITY_LEFT_TO_RIGHT; | public static boolean requiresBidi(char[] text, int start, int end) { final int LEFT_TO_RIGHT = Character.DIRECTIONALITY_LEFT_TO_RIGHT; for (int i = start; i < end; i++) { char c = text[i]; if (Character.getDirectionality(c) != LEFT_TO_RIGHT) return true; } return false; } | |
char c = text[i]; if (Character.getDirectionality(c) != LEFT_TO_RIGHT) | byte dir = Character.getDirectionality(text[i]); if (dir != Character.DIRECTIONALITY_LEFT_TO_RIGHT && dir != Character.DIRECTIONALITY_EUROPEAN_NUMBER && dir != Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR && dir != Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR && dir != Character.DIRECTIONALITY_ARABIC_NUMBE... | public static boolean requiresBidi(char[] text, int start, int end) { final int LEFT_TO_RIGHT = Character.DIRECTIONALITY_LEFT_TO_RIGHT; for (int i = start; i < end; i++) { char c = text[i]; if (Character.getDirectionality(c) != LEFT_TO_RIGHT) return true; } return false; } |
if (IS_PREFIX_DEFAULTING.equals(name)) | if (IS_REPAIRING_NAMESPACES.equals(name)) | public Object getProperty(String name) throws IllegalArgumentException { if (IS_PREFIX_DEFAULTING.equals(name)) return new Boolean(prefixDefaulting); throw new IllegalArgumentException(name); } |
if (IS_PREFIX_DEFAULTING.equals(name)) | if (IS_REPAIRING_NAMESPACES.equals(name)) | public boolean isPropertySupported(String name) { if (IS_PREFIX_DEFAULTING.equals(name)) return true; return false; } |
if (IS_PREFIX_DEFAULTING.equals(name)) | if (IS_REPAIRING_NAMESPACES.equals(name)) | public void setProperty(String name, Object value) throws IllegalArgumentException { if (IS_PREFIX_DEFAULTING.equals(name)) prefixDefaulting = ((Boolean) value).booleanValue(); else throw new IllegalArgumentException(name); } |
log.setLevel(Level.INFO); | public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); } | |
long iNodeTableBlock = groupDescriptors[0].getInodeTable(); INodeTable iNodeTable = new INodeTable(this, (int)iNodeTableBlock); | INodeTable iNodeTable = iNodeTables[0]; | protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table long iNodeTableBlock = groupDescriptors[0].getInodeTable(); //the first block of the inode table INodeTable iNodeTable = new INodeTable(this, (int)iNodeTableBlock); //byte[]... |
iNodeTables[i] = new INodeTable(this, (int)iNodeTableBlock); | public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD... | |
long iNodeTableBlock = groupDescriptors[preferredBlockBroup].getInodeTable(); INodeTable iNodeTable = new INodeTable(this, (int)iNodeTableBlock); | INodeTable iNodeTable = iNodeTables[preferredBlockBroup]; | protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr... |
log.debug("Reading block "+nr+" (offset: "+nr*blockSize+") from disk"); | public byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) { ... | |
else{ int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup()); | } | public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); //log.debug("iNodeCache size: "+in... |
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); INodeTable iNodeTable = new INodeTable(this, (int)iNodeTableBlock); INode result = new INode(this, new INodeDescriptor(iNodeTable, iNodeNr, group, index)); result.read(iNodeTable.getInodeData(index)); | int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup()); INodeTable iNodeTable = iNodeTables[group]; INode result = new INode(this, new INodeDescriptor(iNodeTable, iNodeNr, group, index)); result.read(iNodeTable.getInodeData(index)); | public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); //log.debug("iNodeCache size: "+in... |
} | } else return (INode)inodeCache.get(key); | public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); //log.debug("iNodeCache size: "+in... |
iNodeTables[i] = new INodeTable(this, (int)groupDescriptors[i].getInodeTable()); | public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb... | |
return new Ext2Directory( iNode ); | return new Ext2Directory( iNode, fs ); | public FSDirectory getDirectory() throws IOException { if(isDirectory()) return new Ext2Directory( iNode ); else throw new IOException("Not a directory"); } |
abstract public boolean isUserNode(); | public boolean isUserNode() { AbstractPreferences root = this; while (root.parent != null) root = root.parent; return root == Preferences.userRoot(); } | abstract public boolean isUserNode(); |
public abstract ShortBuffer put (short b); | public ShortBuffer put (ShortBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { short[] toPut = new short [src.remaining ()]; src.get (toPut); put (toPut); } return this; } | public abstract ShortBuffer put (short b); |
Class c = cl.loadClass(className); | Class<?> c = cl.loadClass(className); | private void addEntry(ConfigurationElement element){ final String className = element.getAttribute("class"); final String entryName = element.getAttribute("name"); if (className != null) { try { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class c = cl.loadClass(className); Obj... |
{ | TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ValueOfNode(select.clone(stylesheet), disableOutputEscaping); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); ... | |
} | TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ValueOfNode(select.clone(stylesheet), disableOutputEscaping); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); ... | |
{ | void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); /*if (stylesheet.debug) { System.err.println("value-of: " + select + " -> " + ret)... | |
} | void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Object ret = select.evaluate(context, pos, len); /*if (stylesheet.debug) { System.err.println("value-of: " + select + " -> " + ret)... | |
StringBuffer buf = new StringBuffer(getClass().getName()); | StringBuffer buf = new StringBuffer("value-of"); | public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("select="); buf.append(select); if (disableOutputEscaping) { buf.append(",disableOutputEscaping"); } buf.append(']'); return buf.toString(); } |
{ | public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("select="); buf.append(select); if (disableOutputEscaping) { buf.append(",disableOutputEscaping"); } buf.append(']'); return buf.toString(); } | |
} | public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("select="); buf.append(select); if (disableOutputEscaping) { buf.append(",disableOutputEscaping"); } buf.append(']'); return buf.toString(); } | |
public CharSeqHolder(char[] initial_value) | public CharSeqHolder() | public CharSeqHolder(char[] initial_value) { value = initial_value; typecode.setLength(value.length); } |
value = initial_value; typecode.setLength(value.length); | public CharSeqHolder(char[] initial_value) { value = initial_value; typecode.setLength(value.length); } | |
return Class.forName(getValue(cmdLine)); | final ClassLoader cl = Thread.currentThread().getContextClassLoader(); return cl.loadClass(getValue(cmdLine)); | public Class getClass(ParsedArguments cmdLine) throws ClassNotFoundException { return Class.forName(getValue(cmdLine)); } |
synchronized (this) { Rectangle newRect = e.getUpdateRect(); if (paintArea == null) paintArea = newRect; else Rectangle.union(paintArea, newRect, paintArea); } | public void coalescePaintEvent(PaintEvent e) { // Nothing to do here yet. } | |
if (! (this instanceof LightweightPeer)) { Component comp = awtComponent; Container parent = comp.getParent(); while (parent != null && ! (parent.getPeer() instanceof SwingContainerPeer)) { comp = parent; parent = comp.getParent(); } if (parent != null && parent.getPeer() instanceof SwingContainerPeer) { SwingContai... | public void dispose() { awtComponent = null; swingComponent = null; } | |
ComponentPeer parentPeer = parent.getPeer(); Graphics g = parentPeer.getGraphics(); | Graphics g = parent.getGraphics(); | public Graphics getGraphics() { Component parent = awtComponent.getParent(); ComponentPeer parentPeer = parent.getPeer(); Graphics g = parentPeer.getGraphics(); g.translate(awtComponent.getX(), awtComponent.getY()); g.setClip(0, 0, awtComponent.getWidth(), awtComponent.getHeight()); return g; } |
synchronized (this) { assert paintArea != null; | public void handleEvent(AWTEvent e) { switch (e.getID()) { case PaintEvent.UPDATE: case PaintEvent.PAINT: // This only will work when the component is showing. if (awtComponent.isShowing()) { Graphics g = getGraphics(); Rectangle clip = ((PaintEvent)e).getUpdateRe... | |
Graphics g = getGraphics(); Rectangle clip = ((PaintEvent)e).getUpdateRect(); | Graphics g = awtComponent.getGraphics(); try { Rectangle clip = paintArea; | public void handleEvent(AWTEvent e) { switch (e.getID()) { case PaintEvent.UPDATE: case PaintEvent.PAINT: // This only will work when the component is showing. if (awtComponent.isShowing()) { Graphics g = getGraphics(); Rectangle clip = ((PaintEvent)e).getUpdateRe... |
if (e.getID() == PaintEvent.UPDATE) awtComponent.update(g); else awtComponent.paint(g); peerPaint(g); | peerPaint(g, e.getID() == PaintEvent.UPDATE); } finally { | public void handleEvent(AWTEvent e) { switch (e.getID()) { case PaintEvent.UPDATE: case PaintEvent.PAINT: // This only will work when the component is showing. if (awtComponent.isShowing()) { Graphics g = getGraphics(); Rectangle clip = ((PaintEvent)e).getUpdateRe... |
paintArea = null; } } | public void handleEvent(AWTEvent e) { switch (e.getID()) { case PaintEvent.UPDATE: case PaintEvent.PAINT: // This only will work when the component is showing. if (awtComponent.isShowing()) { Graphics g = getGraphics(); Rectangle clip = ((PaintEvent)e).getUpdateRe... | |
if (swingComponent != null) { JComponent c = swingComponent.getJComponent(); if (c != null) { c.addNotify(); RepaintManager.currentManager(c).setDoubleBufferingEnabled(false); System.setProperty("gnu.awt.swing.doublebuffering", "true"); } } if (! (this instanceof LightweightPeer)) { Component comp = awtComponent; Co... | protected void init(Component awtComp, SwingComponent swingComp) { awtComponent = awtComp; swingComponent = swingComp; } | |
peerPaint(graphics, false); | public void paint(Graphics graphics) { // FIXME: I don't know what this method is supposed to do. } | |
protected void peerPaint(Graphics g) | protected void peerPaint(Graphics g, boolean update) | protected void peerPaint(Graphics g) { if (swingComponent != null) swingComponent.getJComponent().paint(g); } |
if (swingComponent != null) swingComponent.getJComponent().paint(g); | peerPaintComponent(g); Graphics userGraphics = g.create(); try{ if (update) awtComponent.update(userGraphics); else awtComponent.paint(userGraphics); } finally { userGraphics.dispose(); } | protected void peerPaint(Graphics g) { if (swingComponent != null) swingComponent.getJComponent().paint(g); } |
peerFont = font; | public void setFont(Font font) { if (swingComponent != null) swingComponent.getJComponent().setFont(font); } | |
if (portBounds.height >= viewMinimum.height) | if (portBounds.height >= viewPref.height) | 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 ... |
viewPref.height = viewMinimum.height; | 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 (portBounds.width >= viewMinimum.width) | if (portBounds.width >= viewPref.width) | 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 ... |
viewPref.width = viewMinimum.width; | 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 (servant != null) | if (servant != null && !noRetain) | public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (... |
extendedLoaded = false; | private Provider () { // FIXME: We might need to make the name comparison case insensitive. // Verify this with the Sun JDK. canonicalNames = new HashMap (); charsets = new HashMap (); // US-ASCII aka ISO646-US addCharset (new US_ASCII ()); // ISO-8859-1 aka ISO-LATIN-1 addCharset (new ISO_88... | |
addCharset (new UnicodeLittle ()); addCharset (new Windows1250 ()); addCharset (new Windows1251 ()); addCharset (new Windows1252 ()); addCharset (new Windows1253 ()); addCharset (new Windows1254 ()); addCharset (new Windows1257 ()); addCharset (new ISO_8859_2 ()); addCharset (new ISO_8859_4 ()); addCh... | private Provider () { // FIXME: We might need to make the name comparison case insensitive. // Verify this with the Sun JDK. canonicalNames = new HashMap (); charsets = new HashMap (); // US-ASCII aka ISO646-US addCharset (new US_ASCII ()); // ISO-8859-1 aka ISO-LATIN-1 addCharset (new ISO_88... | |
String canonicalName = cs.name (); | String canonicalName = cs.name().toLowerCase(); | private void addCharset (Charset cs) { String canonicalName = cs.name (); charsets.put (canonicalName, cs); for (Iterator i = cs.aliases ().iterator (); i.hasNext (); ) canonicalNames.put (i.next (), canonicalName); } |
canonicalNames.put (i.next (), canonicalName); | canonicalNames.put (((String) i.next()).toLowerCase(), canonicalName); | private void addCharset (Charset cs) { String canonicalName = cs.name (); charsets.put (canonicalName, cs); for (Iterator i = cs.aliases ().iterator (); i.hasNext (); ) canonicalNames.put (i.next (), canonicalName); } |
return (Charset) charsets.get (canonicalize (charsetName)); | Charset cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); if(cs == null && !extendedLoaded) { loadExtended(); cs = (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); } return cs; | public Charset charsetForName (String charsetName) { return (Charset) charsets.get (canonicalize (charsetName)); } |
loadExtended(); | public Iterator charsets () { return Collections.unmodifiableCollection (charsets.values ()) .iterator (); } | |
if (singleton == null) { singleton = (Provider)AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new Provider(); } }); } | if (singleton == null) singleton = new Provider (); | public static synchronized Provider provider () { if (singleton == null) { // @classpath-bugfix Security fix singleton = (Provider)AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new Provider(); } }); } return singleton; } |
} | public void setModel(TreeModel newModel) { treeModel = newModel; // The root node is expanded by default. expanded.add(treeModel.getRoot()); dirty = true; } | |
if (treeModel == null) return; | private final void update() { nodes.clear(); row2node.clear(); totalHeight = maximalWidth = 0; Object root = treeModel.getRoot(); if (rootVisible) { countRows(root, null, 0); } else { int sc = treeModel.getChildCount(root); for (int i = 0; i < sc; i++) { ... | |
getRootPane(); | getRootPane(); initStageDone = true; | public JApplet() { super.setLayout(new BorderLayout(1, 1)); getRootPane(); // will do set/create } |
else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } | protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); } | |
throws NotImplementedException | public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) { throw new Error("not implemented"); } | |
throws NotImplementedException | public int getTransparency() { throw new Error("not implemented"); } | |
BooleanSeqHolder h = new BooleanSeqHolder(); h._read(input); return h.value; | boolean [] value = new boolean[ input.read_long() ]; input.read_boolean_array(value, 0, value.length); return value; | public static boolean[] read(InputStream input) { BooleanSeqHolder h = new BooleanSeqHolder(); h._read(input); return h.value; } |
BooleanSeqHolder h = new BooleanSeqHolder(value); h._write(output); | output.write_long(value.length); output.write_boolean_array(value, 0, value.length); | public static void write(OutputStream output, boolean[] value) { BooleanSeqHolder h = new BooleanSeqHolder(value); h._write(output); } |
return "JScrollPane"; | return "ScrollPaneUI"; | public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JScrollPane"; } |
throw new SocketException(e.getMessage()); | SocketException se = new SocketException(e.toString()); se.initCause(e); throw se; | private SocketImpl getImpl() throws SocketException { try { if (! implCreated) { impl.create(true); implCreated = true; } } catch (IOException e) { throw new SocketException(e.getMessage()); } return impl; } |
opened = false; implCloseChannel (); | if (! closed) { closed = true; implCloseChannel(); } | public final void close () throws IOException { opened = false; implCloseChannel (); } |
public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); | JDialog a; | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
JDialog a; | if (frame == null) { a = new JDialog((Frame)frame, title, true); } else if (frame instanceof Dialog) { a = new JDialog((Dialog) frame, title, true); } else if (frame instanceof Frame) { a = new JDialog((Frame) frame, title, true); } else { System.out.println("HUUUUHHH, not a frame or dialog !"); a = new JDialog((Frame... | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
if (frame == null) { a = new JDialog((Frame) frame, title, true); } else if (frame instanceof Dialog) { a = new JDialog((Dialog) frame, title, true); } else if (frame instanceof Frame) { a = new JDialog((Frame) frame, title, true); } else { System.out.println("HUUUUHHH, not a frame or dialog !"); | p.dialog = a; a.getContentPane().setLayout(new BorderLayout()); a.getContentPane().add(p, BorderLayout.CENTER); a.pack(); a.setVisible(true); Object s = p.getValue(); | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
a = new JDialog((Frame) null, title, true); } | System.out.println("RESULT FROM DIALOG = " + s); | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
p.dialog = a; a.getContentPane().setLayout(new BorderLayout()); a.getContentPane().add(p, BorderLayout.CENTER); a.pack(); a.setVisible(true); Object s = p.getValue(); System.out.println("RESULT FROM DIALOG = " + s); if (s == null) return null; return s; } | if (s == null) return null; return s; } | public static Object DoShowOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { JOptionPane p = new JOptionPane(msg, msg_type, opt_type, icon, opts, init); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " + p.msg); JDialog a; if (frame... |
public String getUIClassID() { return "JOptionPane"; } | public String getUIClassID() { return "OptionPaneUI"; } | public String getUIClassID() { return "JOptionPane"; } |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.setBorder(defaults.getBorder("OptionPane.border")); | LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background", "OptionPane.foreground", "OptionPane.font"); LookAndFeel.installBorder(optionPane, "OptionPane.border"); | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.s... |
messageBorder = defaults.getBorder("OptionPane.messageAreaBorder"); messageForeground = defaults.getColor("OptionPane.messageForeground"); buttonBorder = defaults.getBorder("OptionPane.buttonAreaBorder"); | messageBorder = UIManager.getBorder("OptionPane.messageAreaBorder"); messageForeground = UIManager.getColor("OptionPane.messageForeground"); buttonBorder = UIManager.getBorder("OptionPane.buttonAreaBorder"); | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.s... |
minimumSize = defaults.getDimension("OptionPane.minimumSize"); | minimumSize = UIManager.getDimension("OptionPane.minimumSize"); | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.s... |
public void layoutContainer(Container parent) { if (parent.countComponents() == 1) { Component c = parent.getComponent(0); } | public void layoutContainer(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); Rectangle portBounds = vp.getBounds(); Dimension viewMinimum = view.getMinimumSize(); int width = Math.max(portBounds.width, viewMinimum.width); int height = Math.max(portBounds.height, viewMinimum.height); ... | public void layoutContainer(Container parent) { if (parent.countComponents() == 1) { // This should usually be true, but if it's not it is // probably nicer if we do not panic. Component c = parent.getComponent(0); } } |
public Dimension minimumLayoutSize(Container parent) { return null; } | public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); return view.getMinimumSize(); } | public Dimension minimumLayoutSize(Container parent) { return null; } |
public Dimension preferredLayoutSize(Container parent) { return null; | public Dimension preferredLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view instanceof Scrollable) { Scrollable sc = (Scrollable) view; Dimension d = sc.getPreferredScrollableViewportSize(); return d; | public Dimension preferredLayoutSize(Container parent) { return null; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.