rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public static Border createEtchedBorder() { return null; } | public static Border createEtchedBorder () { return new EtchedBorder (); } | public static Border createEtchedBorder() { /* Create a border with an "etched" look using the component's current background color for highlighting and shading. Returns: the Border object createEtchedBorder */ return null; } |
public static Border createLoweredBevelBorder() { return null; } | public static Border createLoweredBevelBorder () { return new BevelBorder (BevelBorder.LOWERED); } | public static Border createLoweredBevelBorder() { /* Created a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.) Returns: the Border ... |
public static MatteBorder createMatteBorder( int top, int left, int bottom, int right, Color color) { return null; } | public static MatteBorder createMatteBorder (int top, int left, int bottom, int right, Color color) { return new MatteBorder (top, left, bottom, right, color); } | public static MatteBorder createMatteBorder( int top, int left, int bottom, int right, Color color) { /* Create a matte-look border using a solid color. (The difference between this border and a line border is that you can specify the individual border dimensions.) Parameters: top - an int specifying t... |
public static Border createRaisedBevelBorder() { return null; } | public static Border createRaisedBevelBorder () { return new BevelBorder (BevelBorder.RAISED); } | public static Border createRaisedBevelBorder() { /* Created a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a raised border, highlights are on top and shadows are underneath.) Returns: the Border obj... |
public static TitledBorder createTitledBorder(String title) { return null; } | public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); } | public static TitledBorder createTitledBorder(String title) { /* Create a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (left) and using the default font and text color determined by the curre... |
buf.append(record.getLoggerName()); | buf.append(record.getSourceClassName()); buf.append(' '); buf.append(record.getSourceMethodName()); | public String format(LogRecord record) { StringBuffer buf = new StringBuffer(180); if (dateFormat == null) dateFormat = DateFormat.getDateTimeInstance(); buf.append(dateFormat.format(new Date(record.getMillis()))); buf.append(' '); buf.append(record.getLoggerName()); buf.append(lineSep); bu... |
Menu(String label) | Menu() | Menu(String label){ this(label, false);} |
this(label, false); | Menu(String label){ this(label, false);} | |
if (item.parent != null) { item.parent.remove(item); } item.parent = this; | item.setParent(this); | add(MenuItem item){ items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item;} |
item.addNotify(); | add(MenuItem item){ items.addElement(item); if (item.parent != null) { item.parent.remove(item); } item.parent = this; if (peer != null) { MenuPeer mp = (MenuPeer) peer; mp.addItem(item); } return item;} | |
return channel != null && channel.isOpen(); | ByteChannel c = channel; return (c != null) && (c.isOpen()); | public boolean valid () { return channel != null && channel.isOpen(); } |
Certificate certs[] = new Certificate[certificates.size()]; | Certificate[] certs = new Certificate[certificates.size()]; | public Certificate[] certificates() { Certificate certs[] = new Certificate[certificates.size()]; int max = certificates.size(); for (int i = 0; i < max; i++) certs[i] = (Certificate) certificates.elementAt(i); return certs; } |
parser = new XMLReaderAdapter (ae2); | { parser = new XMLReaderAdapter(ae2); } | public Parser getParser () throws SAXException { if (parser == null) parser = new XMLReaderAdapter (ae2); return parser; } |
public boolean isNamespaceAware () | public boolean isNamespaceAware() { try { return ae2.getFeature(SAXDriver.FEATURE + "namespaces"); } catch (Exception e) | public boolean isNamespaceAware () { try { return ae2.getFeature (SAXDriver.FEATURE + "namespaces"); } catch (Exception e) { throw new Error (); } } |
try { return ae2.getFeature (SAXDriver.FEATURE + "namespaces"); } catch (Exception e) { throw new Error (); | throw new Error(); | public boolean isNamespaceAware () { try { return ae2.getFeature (SAXDriver.FEATURE + "namespaces"); } catch (Exception e) { throw new Error (); } } |
return value.booleanValue (); | { return value.booleanValue(); } | public boolean getFeature (String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { Boolean value = (Boolean) flags.get (name); if (value != null) return value.booleanValue (); else try { return new JaxpParser ().getXMLReader ().getFeature (name); ... |
try { return new JaxpParser ().getXMLReader ().getFeature (name); } catch (SAXNotRecognizedException e) { throw new SAXNotRecognizedException (name); } catch (SAXNotSupportedException e) { throw new SAXNotSupportedException (name); } catch (SAXException e) { throw new ParserConfigurationException ( e.getClass ().getNam... | { try { return new JaxpParser().getXMLReader().getFeature(name); } catch (SAXNotRecognizedException e) { throw new SAXNotRecognizedException(name); } catch (SAXNotSupportedException e) { throw new SAXNotSupportedException(name); } catch (SAXException e) { throw new ParserConfigurationException(e.getClass().getName() | public boolean getFeature (String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { Boolean value = (Boolean) flags.get (name); if (value != null) return value.booleanValue (); else try { return new JaxpParser ().getXMLReader ().getFeature (name); ... |
+ e.getMessage ()); | + e.getMessage()); } | public boolean getFeature (String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { Boolean value = (Boolean) flags.get (name); if (value != null) return value.booleanValue (); else try { return new JaxpParser ().getXMLReader ().getFeature (name); ... |
public XMLReaderAdapter (XMLReader xmlReader) | public XMLReaderAdapter () throws SAXException | public XMLReaderAdapter (XMLReader xmlReader) { setup(xmlReader); } |
setup(xmlReader); | setup(XMLReaderFactory.createXMLReader()); | public XMLReaderAdapter (XMLReader xmlReader) { setup(xmlReader); } |
if ((SAXDriver.PROPERTY + "declaration-handler") .equals (propertyId) || (SAXDriver.PROPERTY + "lexical-handler") .equals (propertyId)) return filter.getProperty (propertyId); throw new SAXNotRecognizedException (propertyId); | if ((SAXDriver.PROPERTY + "declaration-handler").equals(propertyId) || (SAXDriver.PROPERTY + "lexical-handler").equals(propertyId)) { return filter.getProperty(propertyId); } throw new SAXNotRecognizedException(propertyId); | public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((SAXDriver.PROPERTY + "declaration-handler") .equals (propertyId) || (SAXDriver.PROPERTY + "lexical-handler") .equals (propertyId)) return filter.getProperty (propertyId); throw new SAXNotRecognizedException (propert... |
if ((SAXDriver.FEATURE + "validation").equals (featureId)) | if ((SAXDriver.FEATURE + "validation").equals(featureId)) { | public boolean getFeature (String featureId) throws SAXNotRecognizedException, SAXNotSupportedException { if ((SAXDriver.FEATURE + "validation").equals (featureId)) return isValidating; return aelfred2.getFeature (featureId); } |
throw new IllegalStateException ("already parsing"); if (getProperty (propertyId) != value) filter.setProperty (propertyId, value); | { throw new IllegalStateException("already parsing"); } if (getProperty(propertyId) != value) { filter.setProperty(propertyId, value); } | public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (active) throw new IllegalStateException ("already parsing"); if (getProperty (propertyId) != value) filter.setProperty (propertyId, value); } |
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { return null; } | public TreePath getClosestPathForLocation(JTree tree, int x, int y) { return treeState.getPathClosestTo(x, y); } | public TreePath getClosestPathForLocation(JTree tree, int x, int y) { return null; // FIXME: not implemented } |
{ return null; } | { DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } if (pathForRow == null) return null; return new TreePath(pathForRow.getPath()); } | public TreePath getPathForRow(JTree tree, int row) { return null; // FIXME: not implemented } |
{ return new Dimension(200,200); } | { return getPreferredSize(c, false); } | public Dimension getPreferredSize(JComponent c) { return new Dimension(200,200); } |
{ return 0; } | { return treeState.getRowCount(); } | public int getRowCount(JTree tree) { return 0; // FIXME: not implemented } |
{ return -1; } | { return path.getPathCount() - 1; } | public int getRowForPath(JTree tree, TreePath path) { return -1; // FIXME: not implemented } |
hashColor = defaults.getColor("Tree.hash"); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); rowHeight = defaults.getInt("Tree.rowHeight"); } | rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); } | protected void installDefaults(JTree tree) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); hashColor = ... |
protected void installListeners() { } | protected void installListeners() { tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChange... | protected void installListeners() { } |
{ installDefaults((JTree) c); } | { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; setModel(tree.getModel()); treeSelectionModel = tree.getSelectionModel(); installListeners(); installKeyboardActions(); completeUIInstall(); } | public void installUI(JComponent c) { installDefaults((JTree) c); } |
protected void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) | private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); ... | protected void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, // selected... |
} | protected void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, // selected... | |
protected void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) | private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, false, true,... | protected void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, //... |
} | protected void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, //... | |
protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + rowHeight) | if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
int halfHeight = rowHeight / 2; | int halfHeight = getRowHeight() / 2; | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
descent += rowHeight; } else | descent += getRowHeight(); } else | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
descent += rowHeight; | descent += getRowHeight(); | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
g.setColor(hashColor); | g.setColor(getHashColor()); | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
g.setColor(hashColor); g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); | g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, ... |
{ return true; } | { return false; } | public boolean stopEditing(JTree tree) { return true; // FIXME: not implemented } |
protected void uninstallDefaults(JTree tree) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); tree.setCellRenderer(null); } | protected void uninstallDefaults(JTree tree) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(null); tree.setForeground(null); tree.setBackground(null); tree.setCellRenderer(null); } | protected void uninstallDefaults(JTree tree) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); tree.setCellRenderer(null); } |
{ uninstallDefaults((JTree) c); } | { uninstallDefaults((JTree) c); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); } | public void uninstallUI(JComponent c) { uninstallDefaults((JTree) c); } |
if (in == null && url != null) | if (in == null) { if (url != null) | DOMSource resolveDOM(Source source, String base, String href) throws TransformerException { if (source != null && source instanceof DOMSource) { return (DOMSource) source; } String systemId = (source == null) ? null : source.getSystemId(); long lastModified = 0L, lastLastModified = 0L; ... |
else { throw new TransformerException("can't resolve URL: " + systemId); } } | DOMSource resolveDOM(Source source, String base, String href) throws TransformerException { if (source != null && source instanceof DOMSource) { return (DOMSource) source; } String systemId = (source == null) ? null : source.getSystemId(); long lastModified = 0L, lastLastModified = 0L; ... | |
} else { throw new MalformedURLException(systemId); | URL resolveURL(String systemId, String base, String href) throws IOException { URL url = null; try { if (systemId != null) { try { url = new URL(systemId); } catch (MalformedURLException e) { // T... | |
"ColorChooser.rgbBlueMnemonic", new Integer(66), | "ColorChooser.rgbBlueMnemonic", "66", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"ColorChooser.rgbGreenMnemonic", new Integer(71), | "ColorChooser.rgbGreenMnemonic", "78", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"ColorChooser.rgbRedMnemonic", new Integer(82), | "ColorChooser.rgbRedMnemonic", "68", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"FileChooser.cancelButtonMnemonic", new Integer(67), | "FileChooser.cancelButtonMnemonic", "67", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"FileChooser.helpButtonMnemonic", new Integer(72), | "FileChooser.directoryOpenButtonMnemonic", "79", "FileChooser.helpButtonMnemonic", "72", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"FileChooser.openButtonMnemonic", new Integer(79), | "FileChooser.openButtonMnemonic", "79", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"FileChooser.saveButtonMnemonic", new Integer(83), | "FileChooser.saveButtonMnemonic", "83", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"FileChooser.updateButtonMnemonic", new Integer(85), | "FileChooser.updateButtonMnemonic", "85", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"MenuItem.acceleratorDelimiter", "-", | "MenuItem.acceleratorDelimiter", "+", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"PasswordField.font", new FontUIResource("Dialog", Font.PLAIN, 12), | "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"SplitPane.dividerSize", new Integer(10), | "SplitPane.dividerSize", new Integer(7), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... | |
"TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... | |
"ToolBar.separatorSize", new DimensionUIResource(20, 20), | "ToolBar.separatorSize", new DimensionUIResource(10, 10), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
+ slope + ", xIntersection: " + xIntersection; | + slope + ", xIntersection: " + xIntersection + ", isClip: " + isClip; | public String toString() { return "Edge: " + x0 + ", " + y0 + ", " + x1 + ", " + y1 + ", slope: " + slope + ", xIntersection: " + xIntersection; } |
public Binding(NameComponent[] a_name, BindingType a_type) | public Binding() | public Binding(NameComponent[] a_name, BindingType a_type) { binding_name = a_name; binding_type = a_type; } |
binding_name = a_name; binding_type = a_type; | public Binding(NameComponent[] a_name, BindingType a_type) { binding_name = a_name; binding_type = a_type; } | |
int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); Dimension single = new Dimension(10, 10);; Rectangle bounds = null; | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... | |
if (vis > nrows) | Dimension retVal = getPreferredSize(); if (getLayoutOrientation() == VERTICAL) | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... |
if (fixedCellWidth != -1 && fixedCellHeight != -1) | if (fixedCellHeight != -1) | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... |
single = new Dimension(fixedCellWidth, fixedCellHeight); } else if (nrows != 0 && getUI() != null) | if (fixedCellWidth != -1) | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... |
Rectangle tmp = getUI().getCellBounds(this, 0, 0); if (tmp != null) single = tmp.getSize(); } | int size = getModel().getSize(); retVal = new Dimension(fixedCellWidth, size * fixedCellHeight); } } | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... |
else if (getUI() != null) { return getUI().getCellBounds(this, 0, vis - 1).getSize(); } return new Dimension(single.width, single.height * vis); | return retVal; | public Dimension getPreferredScrollableViewportSize() { int vis = getVisibleRowCount(); int nrows = getModel() == null ? 0 : getModel().getSize(); // FIXME: this is a somewhat arbitrary default, but.. ? Dimension single = new Dimension(10, 10);; Rectangle bounds = null; if (vis > nrows) { ... |
return false; | Component parent = getParent(); boolean retVal = false; if (parent instanceof JViewport) { JViewport viewport = (JViewport) parent; Dimension pref = getPreferredSize(); if (viewport.getSize().height > pref.height) retVal = true; if ((getLayoutOrientation() == VERTICAL_WRAP) && (getVisibleRowCount() <= 0)) retVal = true... | public boolean getScrollableTracksViewportHeight() { return false; } |
return false; | Component parent = getParent(); boolean retVal = false; if (parent instanceof JViewport) { JViewport viewport = (JViewport) parent; Dimension pref = getPreferredSize(); if (viewport.getSize().width > pref.width) retVal = true; if ((getLayoutOrientation() == HORIZONTAL_WRAP) && (getVisibleRowCount() <= 0)) retVal = true... | public boolean getScrollableTracksViewportWidth() { return false; } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return PrinterInfo.class; } |
public final String getName() | public String getName() | public final String getName() { return "printer-info"; } |
public abstract boolean addOwner(Principal caller, Principal owner) | boolean addOwner(Principal caller, Principal owner) | public abstract boolean addOwner(Principal caller, Principal owner) throws NotOwnerException; |
public abstract boolean deleteOwner(Principal caller, Principal owner) | boolean deleteOwner(Principal caller, Principal owner) | public abstract boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException; |
public abstract boolean isOwner(Principal owner); | boolean isOwner(Principal owner); | public abstract boolean isOwner(Principal owner); |
iter = null; | public WordBreakIterator () { iter = null; } | |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return PrinterLocation.class; } |
public final String getName() | public String getName() | public final String getName() { return "printer-location"; } |
if (nodeNames != null && !acceptName(n.getLocalName())) | String localName = n.getLocalName(); if (localName == null) { localName = n.getNodeName(); } if (nodeNames != null && !acceptName(localName)) | public short acceptNode(Node n) { if (n.getNodeType() != Node.ELEMENT_NODE) { return NodeFilter.FILTER_SKIP; } if (nodeNames != null && !acceptName(n.getLocalName())) { return NodeFilter.FILTER_SKIP; } if (attributeNames != null && !acceptAttributes(n.getAttributes())) ... |
if (attrName == null) { attrName = attr.getNodeName(); } | private Node getNamedItem(NamedNodeMap attrs, String name) { int len = attrs.getLength(); for (int i = 0; i < len; i++) { Node attr = attrs.item(i); String attrName = attr.getLocalName(); if (name.equalsIgnoreCase(attrName)) { return attr; } } retu... | |
super.initialize(type, oldInstance, newInstance, out); if (type != oldInstance.getClass()) return; | protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) { try { PropertyDescriptor[] propertyDescs = Introspector.getBeanInfo( oldInstance.getClass()).getPropertyDescripto... | |
System.out.print("."); | if(written%10 == 0) System.out.print("."); | public FillTest(String fname, int kilos) throws FileNotFoundException, IOException{ byte[] bbuf=new byte[1024]; for(int i=0; i<1024; i++) bbuf[i]=(byte)(i%8+65); FileOutputStream fos = new FileOutputStream(fname, false); int written=0; while(written<kilos) { System.out.print("."); fos.write(bbuf, 0, 1024)... |
System.out.println("\n"+written+" KB"); | System.out.println(written+" KB"); | public FillTest(String fname, int kilos) throws FileNotFoundException, IOException{ byte[] bbuf=new byte[1024]; for(int i=0; i<1024; i++) bbuf[i]=(byte)(i%8+65); FileOutputStream fos = new FileOutputStream(fname, false); int written=0; while(written<kilos) { System.out.print("."); fos.write(bbuf, 0, 1024)... |
{ | public synchronized void readConfiguration() throws IOException, SecurityException { String path; InputStream inputStream; path = System.getProperty("java.util.logging.config.file"); if ((path == null) || (path.length() == 0)) { String url = (System.getProperty("gnu.classpath.home.url")... | |
} | public synchronized void readConfiguration() throws IOException, SecurityException { String path; InputStream inputStream; path = System.getProperty("java.util.logging.config.file"); if ((path == null) || (path.length() == 0)) { String url = (System.getProperty("gnu.classpath.home.url")... | |
public LoginException (String message) | public LoginException() | public LoginException (String message) { super (message); } |
super (message); | public LoginException (String message) { super (message); } | |
superblock.setState(Ext2Constants.EXT2_VALID_FS); | public void close() throws IOException { super.close(); //mark the filesystem clean superblock.setState(Ext2Constants.EXT2_VALID_FS); } | |
if(isClosed()) throw new IOException("FS closed"); | public byte[] getBlock(long nr) throws IOException{ //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) { //check if the block has already been retrieved if(blockCache.containsKey(key)) ... | |
if(isClosed()) throw new IOException("FS closed"); | public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.getBlockSize(); //check if the block is in the cache sy... | |
layoutContainer(scrollbar); | public void stateChanged(ChangeEvent e) { // System.err.println(this + ".stateChanged()"); calculatePreferredSize(); layoutContainer(scrollbar); getThumbBounds(); scrollbar.repaint(); } | |
layoutContainer(scrollbar); | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o... | |
scrollbar.setLayout(this); | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollbar.setForeground(defaults.getColor("ScrollBar.foreground")); scrollbar.setBackground(defaults.getColor("ScrollBar.background")); scrollbar.setBorder(defaults.getBorder("ScrollBar.border")); scrollbar.se... | |
layoutContainer(scrollbar); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(200, null); scrollTimer.setRepeats(true); installComponents(); installDefaults(); configureScrollBarColors(... | |
layoutContainer(scrollbar); | public void paint(Graphics g, JComponent c) { layoutContainer(scrollbar); paintTrack(g, c, getTrackBounds()); paintThumb(g, c, getThumbBounds()); if (trackHighlight == INCREASE_HIGHLIGHT) paintIncreaseHighlight(g); else if (trackHighlight == DECREASE_HIGHLIGHT) paintDecreaseHighlight(g); } | |
return new JScrollBar(SwingConstants.HORIZONTAL); | return new ScrollBar(SwingConstants.HORIZONTAL); | public JScrollBar createHorizontalScrollBar() { return new JScrollBar(SwingConstants.HORIZONTAL); } |
int xpos = 0; int ypos = 0; | ChangeListener createScrollListener() { return new ChangeListener() { public void stateChanged(ChangeEvent event) { int xpos = 0; int ypos = 0; JScrollBar vsb = JScrollPane.this.getVerticalScrollBar(); JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.