rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
updateSelection(); | updateSelection(e.isControlDown()); | public void mousePressed(MouseEvent e) { begin = new Point(e.getX(), e.getY()); curr = new Point(e.getX(), e.getY()); updateSelection(); } |
private void updateSelection() | private void updateSelection(boolean controlPressed) | private void updateSelection() { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) rowModel.setSele... |
} | private void updateSelection() { if (table.getRowSelectionAllowed()) { int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) rowModel.setSele... | |
table.addMouseMotionListener(mouseInputListener); | protected void installListeners() { table.addFocusListener(focusListener); table.addKeyListener(keyListener); table.addMouseListener(mouseInputListener); } | |
table.removeMouseMotionListener(mouseInputListener); | protected void uninstallListeners() { table.removeFocusListener(focusListener); table.removeKeyListener(keyListener); table.removeMouseListener(mouseInputListener); } | |
protected static String toIDL(String cn) | public static String toIDL(String cn) | protected static String toIDL(String cn) { if (cn.startsWith(JAVA_PREFIX)) cn = cn.substring(JAVA_PREFIX.length()); cn = cn.replace('.', '/'); return "IDL:" + OMG_PREFIX + cn + ":1.0"; } |
cn = cn.substring(JAVA_PREFIX.length()); | cn = OMG_PREFIX + cn.substring(JAVA_PREFIX.length()).replace('.', '/'); else if (cn.startsWith(CLASSPATH_PREFIX)) cn = OMG_PREFIX + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/'); | protected static String toIDL(String cn) { if (cn.startsWith(JAVA_PREFIX)) cn = cn.substring(JAVA_PREFIX.length()); cn = cn.replace('.', '/'); return "IDL:" + OMG_PREFIX + cn + ":1.0"; } |
cn = cn.replace('.', '/'); return "IDL:" + OMG_PREFIX + cn + ":1.0"; | return "IDL:" + cn + ":1.0"; | protected static String toIDL(String cn) { if (cn.startsWith(JAVA_PREFIX)) cn = cn.substring(JAVA_PREFIX.length()); cn = cn.replace('.', '/'); return "IDL:" + OMG_PREFIX + cn + ":1.0"; } |
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ synchronized(((Ext2FileSystem)getFileSystem()).getInodeCache()) { int iNodeNr = iNode.getINodeNr(); iNode = ((Ext2FileSystem)getFileSystem()).getINode(iNodeNr); iNode.incLocked(); } synchronized(iNode) { try{ Ex... | private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException { synchronized (((Ext2FileSystem) getFileSystem()).getInodeCache()) { int iNodeNr = iNode.getINodeNr(); iNode = ((Ext2FileSystem) getFileSystem()).getINode(iNodeNr); | private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ //synchronize to the inode cache to make sure that the inode does not get //flushed between reading it and locking it synchronized(((Ext2FileSystem)getFileSystem()).getInodeCache()) { //reread the inode before synchro... |
Ext2FSEntryIterator iterator = new Ext2FSEntryIterator(iNode); Ext2DirectoryRecord rec=null; while(iterator.hasNext()) { rec = iterator.nextDirectoryRecord(); } Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); if(rec!=null) { long lastPos = rec.getFileOffset(); long lastLen = rec.getRecLen(); rec.truncateRecord... | iNode.incLocked(); } synchronized (iNode) { try { Ext2File dir = new Ext2File(iNode); Ext2FSEntryIterator iterator = new Ext2FSEntryIterator(iNode); Ext2DirectoryRecord rec = null; while (iterator.hasNext()) { rec = iterator.nextDirectoryRecord(); } Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); if (rec ... | private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ //synchronize to the inode cache to make sure that the inode does not get //flushed between reading it and locking it synchronized(((Ext2FileSystem)getFileSystem()).getInodeCache()) { //reread the inode before synchro... |
protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try{ dr = new Ext2DirectoryRecord(fs, iNodeNr, fileType, lin... | protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if (!canWrite()) throw new IOException( "Filesystem or directory is mounted read-only!"); | protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface Ext2DirectoryRecord dr; Ext2FileS... |
iNode.update(); INode linkedINode = fs.getINode(iNodeNr); linkedINode.setLinksCount( linkedINode.getLinksCount()+1 ); return new Ext2Entry(linkedINode, linkName, fileType, fs, this); }catch(FileSystemException fse) { throw new IOException(fse); } } | Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try { dr = new Ext2DirectoryRecord(fs, iNodeNr, fileType, linkName); addDirectoryRecord(dr); iNode.update(); INode linkedINode = fs.getINode(iNodeNr); linkedINode.setLinksCount(linkedINode.getLinksCount() + 1); return new Ext2Entry(linke... | protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface Ext2DirectoryRecord dr; Ext2FileS... |
INode newINode; Ext2DirectoryRecord dr; Ext2Entry newEntry; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try{ int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); newINode = fs.createINode((int)iNode.getGroup(), Ext2Constants.EXT2_S_IFDIR, rights, 0, 0);... | INode newINode; Ext2DirectoryRecord dr; Ext2Entry newEntry; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try { int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); newINode = fs.createINode((int) iNode.getGroup(), Ext2Constants.EXT2_S_IFDIR, rights, 0, 0... | public FSEntry createDirectoryEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Dir... |
addDirectoryRecord(dr); newINode.setLinksCount( newINode.getLinksCount()+1 ); | dr = new Ext2DirectoryRecord(fs, newINode.getINodeNr(), Ext2Constants.EXT2_FT_DIR, name); | public FSEntry createDirectoryEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Dir... |
newEntry = new Ext2Entry(newINode, name, Ext2Constants.EXT2_FT_DIR, fs, this); Ext2Directory newDir = new Ext2Directory(newEntry); Ext2DirectoryRecord drThis = new Ext2DirectoryRecord( fs, newINode.getINodeNr(), Ext2Constants.EXT2_FT_DIR, "." ); newINode.setLinksCount( 2 ); newDir.addDirectoryRecord( drThis ); long... | addDirectoryRecord(dr); newINode.setLinksCount(newINode.getLinksCount() + 1); newEntry = new Ext2Entry(newINode, name, Ext2Constants.EXT2_FT_DIR, fs, this); Ext2Directory newDir = new Ext2Directory(newEntry); Ext2DirectoryRecord drThis = new Ext2DirectoryRecord(fs, newINode .getINodeNr(), Ext2Constants.EXT2_FT_DIR,... | public FSEntry createDirectoryEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Dir... |
INode newINode; Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try{ int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); newINode = fs.createINode((int)iNode.getGroup(), Ext2Constants.EXT2_S_IFREG, rights, 0, 0); dr = new Ext2Direc... | INode newINode; Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try { int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); newINode = fs.createINode((int) iNode.getGroup(), Ext2Constants.EXT2_S_IFREG, rights, 0, 0); | public FSEntry createFileEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Director... |
addDirectoryRecord(dr); newINode.setLinksCount( newINode.getLinksCount()+1 ); | dr = new Ext2DirectoryRecord(fs, newINode.getINodeNr(), Ext2Constants.EXT2_FT_REG_FILE, name); | public FSEntry createFileEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Director... |
}catch(FileSystemException fse) { throw new IOException(fse); } return new Ext2Entry(newINode, name, Ext2Constants.EXT2_FT_REG_FILE, fs, this); } | addDirectoryRecord(dr); newINode.setLinksCount(newINode.getLinksCount() + 1); } catch (FileSystemException ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } return new Ext2Entry(newINode, name, Ext2Constants.EXT2_FT_REG_FILE, fs, this); } | public FSEntry createFileEntry(String name) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Director... |
c.setLayout(new ViewportLayout()); | public void installUI(JComponent c) { super.installUI(c); c.setLayout(new ViewportLayout()); installListeners(c); } | |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuItem.setBackground(defaults.getColor("Menu.background")); menuItem.setBorder(defaults.getBorder("Menu.border")); menuItem.setFont(defaults.getFont("Menu.font")); menuItem.setForeground(defaults.getColor("Menu.foreground")); menuItem.setMargin(defaults.getIn... | LookAndFeel.installBorder(menuItem, "Menu.border"); LookAndFeel.installColorsAndFont(menuItem, "Menu.background", "Menu.foreground", "Menu.font"); menuItem.setMargin(UIManager.getInsets("Menu.margin")); acceleratorFont = UIManager.getFont("Menu.acceleratorFont"); acceleratorForeground = UIManager.getColor("Menu.acceler... | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuItem.setBackground(defaults.getColor("Menu.background")); menuItem.setBorder(defaults.getBorder("Menu.border")); menuItem.setFont(defaults.getFont("Menu.font")); menuItem.setForeground(defaults.getColor("M... |
this(bits * 4, nArray(bits, 4), | this(bits, nArray(bits / 4, 4), | public ColorModel(int bits) { this(bits * 4, // total bits, sRGB, four channels nArray(bits, 4), // bits for each channel ColorSpace.getInstance(ColorSpace.CS_sRGB), // sRGB true, // has alpha false, // not premultiplied TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits * 4)); } |
final Word headerSizeW = Word.fromIntZeroExtend(headerSize); Word offset = Word.fromIntZeroExtend(headerSize); | final Word headerSize = Word.fromIntZeroExtend(this.headerSize); Word offset = headerSize; | protected void initialize(Address start, Address end, int slotSize) { //Unsafe.debug("bootheap.initialize"); //Unsafe.debug("start"); Unsafe.debug(Unsafe.addressToInt(start)); //Unsafe.debug("end"); Unsafe.debug(Unsafe.addressToInt(end)); this.start = start; this.end = end; ... |
offset = offset.add(objSize).add(headerSizeW); | offset = offset.add(objSize).add(headerSize); | protected void initialize(Address start, Address end, int slotSize) { //Unsafe.debug("bootheap.initialize"); //Unsafe.debug("start"); Unsafe.debug(Unsafe.addressToInt(start)); //Unsafe.debug("end"); Unsafe.debug(Unsafe.addressToInt(end)); this.start = start; this.end = end; ... |
validate(); super.show(); toFront(); | } KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); manager.setGlobalFocusedWindow(this); | public void show() { synchronized (getTreeLock()) { if (parent != null && !parent.isDisplayable()) parent.addNotify(); if (peer == null) addNotify(); // Show visible owned windows. Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get... |
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.setGlobalFocusedWindow (this); if (!shown) | if (! shown) | public void show() { synchronized (getTreeLock()) { if (parent != null && !parent.isDisplayable()) parent.addNotify(); if (peer == null) addNotify(); // Show visible owned windows. Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get... |
return parentPeer.prepareImage(img, width, height, ob); | res = parentPeer.prepareImage(img, width, height, ob); } else { res = Toolkit.getDefaultToolkit().prepareImage(img, width, height, ob); } return res; | public boolean prepareImage(Image img, int width, int height, ImageObserver ob) { Component parent = awtComponent.getParent(); ComponentPeer parentPeer = parent.getPeer(); return parentPeer.prepareImage(img, width, height, ob); } |
.getColor("Tree.textBackground")); | .getColor("Tree.nonSelectionBackground")); | public DefaultTreeCellRenderer() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); setLeafIcon(getDefaultLeafIcon()); setOpenIcon(getDefaultOpenIcon()); setClosedIcon(getDefaultClosedIcon()); setTextNonSelectionColor(defaults.getColor("Tree.textForegro... |
this.selected = selected; this.hasFocus = hasFocus; setText(val.toString()); setHorizontalAlignment(LEFT); setOpaque(true); setVerticalAlignment(TOP); setEnabled(true); setFont(getFont()); | public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; setText(val.toString()); setHorizontalAlignment(LEFT); setOpaque(true); ... | |
super.setBackground((tree.getParent()).getBackground()); | super.setBackground(getBackgroundNonSelectionColor()); | public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; setText(val.toString()); setHorizontalAlignment(LEFT); setOpaque(true); ... |
c.setOpaque(true); | protected void installDefaults(JLabel c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setForeground(defaults.getColor("Label.foreground")); c.setBackground(defaults.getColor("Label.background")); c.setFont(defaults.getFont("Label.font")); c.setBorder(defaults.getBorder("Label.border")... | |
if (b.isOpaque()) { g.setColor(b.getBackground()); g.fillRect(vr.x, vr.y, vr.width, vr.height); } | public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; Font saved_font = g.getFont(); Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); vr = SwingUtilities.... | |
} | public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; Font saved_font = g.getFont(); Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); vr = SwingUtilities.... | |
return null; | return c.getPreferredSize(); | public Dimension getMaximumSize(JComponent c) { return null; } |
throws NotImplementedException | protected void installKeyboardActions(JScrollPane sp) throws NotImplementedException { // TODO: Is this only a hook method or should we actually do something // here? If the latter, than figure out what and implement this. } | |
InputMap keyMap = getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); SwingUtilities.replaceUIInputMap(sp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap); ActionMap map = getActionMap(); SwingUtilities.replaceUIActionMap(sp, map); | protected void installKeyboardActions(JScrollPane sp) throws NotImplementedException { // TODO: Is this only a hook method or should we actually do something // here? If the latter, than figure out what and implement this. } | |
throws NotImplementedException | protected void uninstallKeyboardActions(JScrollPane sp) throws NotImplementedException { // TODO: Is this only a hook method or should we actually do something // here? If the latter, than figure out what and implement this. } | |
SwingUtilities.replaceUIActionMap(sp, null); SwingUtilities.replaceUIInputMap(sp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null); | protected void uninstallKeyboardActions(JScrollPane sp) throws NotImplementedException { // TODO: Is this only a hook method or should we actually do something // here? If the latter, than figure out what and implement this. } | |
if (name == null) { name = ctx.getNodeName(); } | Node getCell(final int index) { int i = 0; for (Node ctx = getFirstChild(); ctx != null; ctx = ctx.getNextSibling()) { String name = ctx.getLocalName(); if (!"td".equalsIgnoreCase(name) && !"th".equalsIgnoreCase(name)) { continue; } if ... | |
((ClasspathToolkit)Toolkit.getDefaultToolkit()).registerImageIOSpis(this); | Toolkit toolkit = Toolkit.getDefaultToolkit(); if (toolkit instanceof ClasspathToolkit) ((ClasspathToolkit)toolkit).registerImageIOSpis(this); | private IIORegistry() { super(defaultCategories.iterator()); // XXX: Register built-in Spis here. ((ClasspathToolkit)Toolkit.getDefaultToolkit()).registerImageIOSpis(this); registerApplicationClasspathSpis(); } |
} | protected GridBagLayoutInfo GetLayoutInfo (Container parent, int sizeflag) { if (sizeflag != MINSIZE && sizeflag != PREFERREDSIZE) throw new IllegalArgumentException(); Dimension parentDim = parent.getSize (); Insets parentInsets = parent.getInsets (); parentDim.width -= parentInsets.l... | |
public PolicyListHolder(Policy[] initialValue) | public PolicyListHolder() | public PolicyListHolder(Policy[] initialValue) { value = initialValue; } |
value = initialValue; | public PolicyListHolder(Policy[] initialValue) { value = initialValue; } | |
CharsetProvider[] providers = providers(); | CharsetProvider[] providers = providers2(); | public static SortedMap availableCharsets() { TreeMap charsets = new TreeMap(String.CASE_INSENSITIVE_ORDER); CharsetProvider[] providers = providers(); for (int j = 0; j < providers.length; j++) { for (Iterator i = providers[j].charsets(); i.hasNext(); ) { Charset cs = (Charset) i.ne... |
CharsetProvider[] providers = providers(); | CharsetProvider[] providers = providers2(); | private static Charset charsetForName(String charsetName) { checkName (charsetName); Charset cs = null; CharsetProvider[] providers = providers(); for (int i = 0; i < providers.length; i++) { cs = providers[i].charsetForName(charsetName); if (cs != null) break; } return cs; } |
encoding = System.getProperty("file.encoding"); } catch(SecurityException e) { | encoding = SystemProperties.getProperty("file.encoding"); } catch(SecurityException e) { | public static Charset defaultCharset() { String encoding; try { encoding = System.getProperty("file.encoding"); } catch(SecurityException e) { encoding = "ISO-8859-1"; } catch(IllegalArgumentException e) { encoding = "ISO-8859-1"; } try { return forName(encoding); } catch(Unsu... |
} catch(UnsupportedCharsetException e) { } catch(IllegalCharsetNameException e) { } catch(IllegalArgumentException e) { | public static Charset defaultCharset() { String encoding; try { encoding = System.getProperty("file.encoding"); } catch(SecurityException e) { encoding = "ISO-8859-1"; } catch(IllegalArgumentException e) { encoding = "ISO-8859-1"; } try { return forName(encoding); } catch(Unsu... | |
catch(UnsupportedCharsetException e) { } catch(IllegalCharsetNameException e) { } catch(IllegalArgumentException e) { } | public static Charset defaultCharset() { String encoding; try { encoding = System.getProperty("file.encoding"); } catch(SecurityException e) { encoding = "ISO-8859-1"; } catch(IllegalArgumentException e) { encoding = "ISO-8859-1"; } try { return forName(encoding); } catch(Unsu... | |
String useIconv = SystemProperties.getProperty ("gnu.classpath.nio.charset.provider.iconv"); if (useIconv != null) return IconvProvider.provider(); | private static CharsetProvider provider() { return Provider.provider(); } | |
static Object allocateObject (Class clazz) | static Object allocateObject (Class clazzClass, Class constr_clazz, Constructor constructor) | static Object allocateObject (Class clazz) throws InstantiationException { // TODO implement me return null; } |
g.drawRect(t.x - 1, t.y + 2, t.width + 2, t.height - 4); | g.drawRect(t.x - 1, t.y - 1, t.width + 2, t.height + 2); | protected void paintFocus(Graphics g, Rectangle t, Dimension d) { g.setColor(focusColor); g.drawRect(t.x - 1, t.y + 2, t.width + 2, t.height - 4); } |
if (ancestor != root) | if (ancestor == null) ancestor = root; else if (ancestor != root) | public Component getComponentAfter (Container root, Component current) { if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalAr... |
if (components[i] == current) | if (components[i].equals(current)) | public Component getComponentAfter (Container root, Component current) { if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalAr... |
for (int i = componentIndex + 1; i < numComponents; i++) { if (accept (components[i])) return components[i]; if (components[i] instanceof Container) { Component result = getFirstComponent ((Container) components[i]); if (result != null && implicitDownCycleTraversal) return result; } } | int i = componentIndex + 1; int end = numComponents - 1; Component next = getNextAvailableComponent(components, i, end); if (next != null) return next; i = 0; end = componentIndex; next = getNextAvailableComponent(components, i, end); if (next != null) return next; | public Component getComponentAfter (Container root, Component current) { if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalAr... |
if (ancestor != root) | if (ancestor == null) ancestor = root; else if (ancestor != root) | public Component getComponentBefore (Container root, Component current) { if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalA... |
for (int i = componentIndex - 1; i >= 0; i--) { if (accept (components[i])) return components[i]; if (components[i] instanceof Container) { Component result = getLastComponent ((Container) components[i]); if (result != null) return result; } } | int i = componentIndex - 1; int end = 0; Component prev = getPrevAvailableComponent(components, i, end); if (prev != null) return prev; i = numComponents -1; end = componentIndex; prev = getPrevAvailableComponent(components, i, end); if (prev != null) return prev; | public Component getComponentBefore (Container root, Component current) { if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null"); if (!root.isFocusCycleRoot ()) throw new IllegalA... |
if (accept (root)) | if (root.visible && root.isDisplayable() && root.enabled && root.focusable) | public Component getFirstComponent(Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = 0; i < c... |
if (accept (component)) | if (component.visible && component.isDisplayable() && component.enabled && component.focusable) | public Component getFirstComponent(Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = 0; i < c... |
if (result != null) | if (result != null && (result.visible && result.isDisplayable() && result.enabled && result.focusable)) | public Component getFirstComponent(Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = 0; i < c... |
if (accept (root)) | if (root.visible && root.isDisplayable() && root.enabled && root.focusable) | public Component getLastComponent (Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = compon... |
if (accept (component)) | if (component.visible && component.isDisplayable() && component.enabled && component.focusable) | public Component getLastComponent (Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = compon... |
if (result != null) | if (result != null && result.visible && result.isDisplayable() && result.enabled && result.focusable) | public Component getLastComponent (Container root) { if (root == null) throw new IllegalArgumentException (); if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = compon... |
return super.getMessage() + (index >= 0 ? " at index " + index : "") + ": " + input; | return (super.getMessage() + (index >= 0 ? " at index " + index : "") + ": " + input); | public String getMessage() { return super.getMessage() + (index >= 0 ? " at index " + index : "") + ": " + input; } |
public ServiceContextListHolder(ServiceContext[] initialValue) | public ServiceContextListHolder() | public ServiceContextListHolder(ServiceContext[] initialValue) { value = initialValue; } |
value = initialValue; | public ServiceContextListHolder(ServiceContext[] initialValue) { value = initialValue; } | |
if (viewIndex == -1) return null; | protected View createView(FlowView fv, int offset, int spanLeft, int rowIndex) { // Find the logical element for the given offset. View logicalView = getLogicalView(fv); int viewIndex = logicalView.getViewIndex(offset, Position.Bias.Forward); View child = logicalV... | |
} | protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV... | |
return getElement().getElementIndex(pos); | int index = -1; int i = 0; for (Iterator it = children.iterator(); it.hasNext(); i++) { View child = (View) it.next(); if (child.getStartOffset() >= pos && child.getEndOffset() < pos) { index = i; break; } } return index; | public int getViewIndex(int pos, Position.Bias b) { return getElement().getElementIndex(pos); } |
Element el = getElement(); int index = el.getElementIndex(pos); | int index = -1; for (int i = 0; i < children.length; i++) { if (children[i].getStartOffset() >= pos && children[i].getEndOffset() < pos) { index = i; break; } } | protected int getViewIndexAtPosition(int pos) { // We have one child view allocated for each child element in // loadChildren(), so this should work. Element el = getElement(); int index = el.getElementIndex(pos); return index; } |
g.fillRect(0, 0, c.getWidth(), c.getHeight()); | Rectangle clip = g.getClipBounds(); g.fillRect(clip.x, clip.y, clip.width, clip.height); | public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } paint(g, c); } |
int rount = units / 2; | public int getCrossFeedResolution(int units) { if (units < 1) throw new IllegalArgumentException("units may not be less then 1"); int rount = units / 2; return (crossFeedResolution + units) / units; } | |
int rount = units / 2; | public int getFeedResolution(int units) { if (units < 1) throw new IllegalArgumentException("units may not be less then 1"); int rount = units / 2; return (crossFeedResolution + units) / units; } | |
protected void fireValueChanged(int firstIndex, int lastIndex) | protected void fireValueChanged(boolean isAdjusting) | protected void fireValueChanged(int firstIndex, int lastIndex) { fireValueChanged(firstIndex, lastIndex, getValueIsAdjusting()); } |
fireValueChanged(firstIndex, lastIndex, getValueIsAdjusting()); | fireValueChanged(getMinSelectionIndex(), getMaxSelectionIndex(), isAdjusting); | protected void fireValueChanged(int firstIndex, int lastIndex) { fireValueChanged(firstIndex, lastIndex, getValueIsAdjusting()); } |
throws NotImplementedException | public Shape createStrokedShape(Shape s) { // FIXME: Implement this throw new Error("not implemented"); } | |
return null; | return createLineBorder(color, 1); | public static Border createLineBorder(Color color) { return null; } |
log.entering("Main", "installNewProvider"); | log.entering(this.getClass().getName(), "installNewProvider"); | private void installNewProvider() { log.entering("Main", "installNewProvider"); String providerName = provider.getName(); log.info("About to install new provider: " + providerName); // we need to override security checks Boolean result = (Boolean) AccessController.doPrivileged(new PrivilegedAction() ... |
String providerName = provider.getName(); log.info("About to install new provider: " + providerName); Boolean result = (Boolean) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { int actualPosition = Security.insertProviderAt(provider, 1); return new Boolean(actualPosition != - 1); } }); log... | providerInstalled = ProviderUtil.addProvider(provider) != -1; | private void installNewProvider() { log.entering("Main", "installNewProvider"); String providerName = provider.getName(); log.info("About to install new provider: " + providerName); // we need to override security checks Boolean result = (Boolean) AccessController.doPrivileged(new PrivilegedAction() ... |
log.exiting("Main", "installNewProvider"); | log.exiting(this.getClass().getName(), "installNewProvider"); | private void installNewProvider() { log.entering("Main", "installNewProvider"); String providerName = provider.getName(); log.info("About to install new provider: " + providerName); // we need to override security checks Boolean result = (Boolean) AccessController.doPrivileged(new PrivilegedAction() ... |
log.entering("Main", "main", args); | log.entering(Main.class.getName(), "main", args); | public static final void main(String[] args) { log.entering("Main", "main", args); Main tool = new Main(); try { tool.processArgs(args); tool.start(); } catch (SecurityException x) { log.throwing("Main", "main", x); System.err.println("jarsigner: " + x.getMessag... |
log.throwing("Main", "main", x); System.err.println("jarsigner: " + x.getMessage()); | log.throwing(Main.class.getName(), "main", x); System.err.println(Messages.getString("Main.7") + x.getMessage()); | public static final void main(String[] args) { log.entering("Main", "main", args); Main tool = new Main(); try { tool.processArgs(args); tool.start(); } catch (SecurityException x) { log.throwing("Main", "main", x); System.err.println("jarsigner: " + x.getMessag... |
log.throwing("Main", "main", x); System.err.println("jarsigner error: " + x); | log.throwing(Main.class.getName(), "main", x); System.err.println(Messages.getString("Main.9") + x); } finally { tool.teardown(); | public static final void main(String[] args) { log.entering("Main", "main", args); Main tool = new Main(); try { tool.processArgs(args); tool.start(); } catch (SecurityException x) { log.throwing("Main", "main", x); System.err.println("jarsigner: " + x.getMessag... |
tool.teardown(); log.exiting("Main", "main"); | log.exiting(Main.class.getName(), "main", Integer.valueOf(result)); System.exit(result); | public static final void main(String[] args) { log.entering("Main", "main", args); Main tool = new Main(); try { tool.processArgs(args); tool.start(); } catch (SecurityException x) { log.throwing("Main", "main", x); System.err.println("jarsigner: " + x.getMessag... |
log.entering("Main", "processArgs", args); | log.entering(this.getClass().getName(), "processArgs", args); | private void processArgs(String[] args) throws Exception { log.entering("Main", "processArgs", args); HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0... |
HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0; String opt; while (i < limit) { opt = args[i++]; log.finest("args[" + (i - 1) + "]=" + opt); if (opt == null || opt.length() ... | cmdLineParser = new ToolParser(); cmdLineParser.initializeParser(); cmdLineParser.parse(args, new ToolParserCallback()); | private void processArgs(String[] args) throws Exception { log.entering("Main", "processArgs", args); HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0... |
log.info("Will verify with the following parameters:"); log.info(" jar-file = '" + jarFileName + "'"); log.info("Options:"); log.info(" provider = '" + providerClassName + "'"); log.info(" verbose ? " + verbose); log.info(" certs ? " + certs); log.info(" internalsf ? " + internalSF); log.info(" se... | log.finer("Will verify with the following parameters:"); log.finer(" jar-file = '" + jarFileName + "'"); log.finer("Options:"); log.finer(" provider = '" + providerClassName + "'"); log.finer(" verbose ? " + verbose); log.finer(" certs ? " + certs); log.finer(" internalsf ? " + internalSF); log.fi... | private void processArgs(String[] args) throws Exception { log.entering("Main", "processArgs", args); HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0... |
log.info("Will sign with the following parameters:"); log.info(" jar-file = '" + jarFileName + "'"); log.info(" alias = '" + alias + "'"); log.info("Options:"); log.info(" keystore = '" + ksURL + "'"); log.info(" storetype = '" + ksType + "'"); log.info(" storepass = '" + ksPassword + "'"); log.inf... | log.finer("Will sign with the following parameters:"); log.finer(" jar-file = '" + jarFileName + "'"); log.finer(" alias = '" + alias + "'"); log.finer("Options:"); log.finer(" keystore = '" + ksURL + "'"); log.finer(" storetype = '" + ksType + "'"); log.finer(" storepass = '" + ksPassword + "'"); ... | private void processArgs(String[] args) throws Exception { log.entering("Main", "processArgs", args); HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0... |
log.exiting("Main", "processArgs"); | log.exiting(this.getClass().getName(), "processArgs"); | private void processArgs(String[] args) throws Exception { log.entering("Main", "processArgs", args); HelpPrinter.checkHelpKey(args, HELP_PATH); if (args == null || args.length == 0) HelpPrinter.printHelpAndExit(HELP_PATH); int limit = args.length; log.finest("args.length=" + limit); int i = 0... |
log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); | log.entering(this.getClass().getName(), "setupCommonParams"); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
throw new IOException("JAR file [" + jarFileName + "] is NOT a file object"); | throw new IOException(Messages.getFormattedString("Main.70", jarFileName)); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
throw new IOException("JAR file [" + jarFileName + "] is NOT readable"); | throw new IOException(Messages.getFormattedString("Main.72", jarFileName)); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
log.info("Provider " + providerName + " is already installed"); | log.finer("Provider " + providerName + " is already installed"); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
log.warning("Option <certs> is set but <verbose> is not. Ignored"); | log.fine("Option <certs> is set but <verbose> is not. Ignored"); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
log.exiting("Main", "setupCommonParams"); | log.exiting(this.getClass().getName(), "setupCommonParams"); | private void setupCommonParams() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { log.entering("Main", "setupCommonParams"); if (jarFileName == null) HelpPrinter.printHelpAndExit(HELP_PATH); File jar = new File(jarFileName); if (! jar.exists()) t... |
log.entering("Main", "setupSigningParams"); | log.entering(this.getClass().getName(), "setupSigningParams"); | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
throw new SecurityException("Option '-keystore' is not defined or" + " is an empty string, and 'user.home'" + " is unknown"); ksURL = "file:" + userHome.trim() + "/.keystore"; | throw new SecurityException(Messages.getString("Main.85")); ksURL = "file:" + userHome.trim() + "/.keystore"; | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
CallbackHandler handler = new ConsoleCallbackHandler(); PasswordCallback pcb = new PasswordCallback("Enter keystore password: ", | PasswordCallback pcb = new PasswordCallback(Messages.getString("Main.92"), | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
handler.handle(new Callback[] { pcb }); | getCallbackHandler().handle(new Callback[] { pcb }); | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
if (alias == null) HelpPrinter.printHelpAndExit(HELP_PATH); | if (! store.containsAlias(alias)) throw new SecurityException(Messages.getFormattedString("Main.6", alias)); | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
if (! store.containsAlias(alias)) throw new SecurityException("Designated alias [" + alias + "] MUST be known to the key store in use"); | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... | |
throw new SecurityException("Designated alias [" + alias + "] MUST be an Alias of a Key Entry"); | throw new SecurityException(Messages.getFormattedString("Main.95", alias)); | private void setupSigningParams() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, UnrecoverableKeyException { log.entering("Main", "setupSigningParams"); if (ksURL == null || ksURL.trim().length() == 0) { String userHome... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.