rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
getRowHeight(minIndex));
getCellHeight(minIndex));
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); Rectangle bounds = new Recta...
getRowHeight(i));
getCellHeight(i));
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); Rectangle bounds = new Recta...
if (size == 0) return new Dimension(0, 0);
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); Dimension retVal = bounds.getSize(); Component parent = list.getParent(); if ((visibleRows == -1) && (parent instanceof JViewport))
int h; int w; int maxCellHeight = cellHeight; if (maxCellHeight <= 0)
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
JViewport viewport = (JViewport) parent;
for (int i = 0; i < cellHeights.length; i++) maxCellHeight = Math.max(maxCellHeight, cellHeights[i]); }
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
int h = viewport.getSize().height; int cellsPerCol = h / cellHeight; int w = size / cellsPerCol * cellWidth; retVal = new Dimension(w, h);
if (visibleRows > 0) { double modelSize = size; int neededColumns = (int) Math.ceil(modelSize / visibleRows); int adjustedRows = (int) Math.ceil(modelSize / neededColumns); h = maxCellHeight * adjustedRows; w = cellWidth * neededColumns; } else { int neededColumns = Math.min(1, list.getWidth() / cellWidth); h = size /...
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
int w = viewport.getSize().width; int cellsPerRow = Math.max(w / cellWidth, 1); int h = size / cellsPerRow * cellHeight; retVal = new Dimension(w, h);
if (visibleRows > 0) h = visibleRows * maxCellHeight; else h = Math.max(list.getHeight(), maxCellHeight); int neededColumns = h / maxCellHeight; w = cellWidth * neededColumns;
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
Insets insets = list.getInsets(); Dimension retVal = new Dimension(w + insets.left + insets.right, h + insets.top + insets.bottom);
public Dimension getPreferredSize(JComponent c) { int size = list.getModel().getSize(); if (size == 0) return new Dimension(0, 0); int visibleRows = list.getVisibleRowCount(); int layoutOrientation = list.getLayoutOrientation(); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() ...
public Point indexToLocation(JList list, int index)
public Point indexToLocation(JList l, int index)
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
int visibleRows = list.getVisibleRowCount();
int maxCellHeight = getCellHeight(0); int visibleRows = list.getHeight() / maxCellHeight;
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
if (visibleRows <= 0) { Dimension listDim = list.getSize(); numberOfCellsPerRow = Math.max(listDim.width / cellWidth, 1); } else {
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
}
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
int locY = gridY * cellHeight;
int locY; locY = gridY * maxCellHeight;
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
int visibleRows2 = list.getVisibleRowCount(); if (visibleRows2 <= 0) { Dimension listDim2 = list.getSize(); visibleRows2 = listDim2.height / cellHeight; }
int maxCellHeight2 = getCellHeight(0); int visibleRows2 = list.getHeight() / maxCellHeight2;
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
int locY2 = gridY2 * cellHeight;
int locY2 = gridY2 * maxCellHeight2;
public Point indexToLocation(JList list, int index) { int layoutOrientation = list.getLayoutOrientation(); Point loc = null; switch (layoutOrientation) { case JList.VERTICAL: loc = new Point(0, convertRowToY(index)); break; case JList.HORIZONTAL_WRAP: // determine visible...
componentListener = new ComponentHandler(); list.addComponentListener(componentListener);
protected void installListeners() { if (focusListener == null) focusListener = createFocusListener(); list.addFocusListener(focusListener); if (listDataListener == null) listDataListener = createListDataListener(); list.getModel().addListDataListener(listDataListener); if (listSelectionListe...
public int locationToIndex(JList list, Point location)
public int locationToIndex(JList l, Point location)
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
int visibleRows = list.getVisibleRowCount();
int maxCellHeight = getCellHeight(0); int visibleRows = list.getHeight() / maxCellHeight;
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
Dimension listDim = list.getSize(); if (visibleRows <= 0) { try { cellsPerRow = listDim.width / cellWidth; } catch (ArithmeticException ex) { cellsPerRow = 1; } } else {
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
}
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
int gridY = Math.min(location.y / cellHeight, cellsPerColumn);
int gridY = Math.min(location.y / maxCellHeight, cellsPerColumn);
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
int visibleRows2 = list.getVisibleRowCount(); if (visibleRows2 <= 0) { Dimension listDim2 = list.getSize(); visibleRows2 = listDim2.height / cellHeight; }
int maxCellHeight2 = getCellHeight(0); int visibleRows2 = list.getHeight() / maxCellHeight2;
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
int gridY2 = Math.min(location.y / cellHeight, visibleRows2);
int gridY2 = Math.min(location.y / maxCellHeight2, visibleRows2);
public int locationToIndex(JList list, Point location) { int layoutOrientation = list.getLayoutOrientation(); int index = -1; switch (layoutOrientation) { case JList.VERTICAL: index = convertYToRow(location.y); break; case JList.HORIZONTAL_WRAP: // determine visible rows ...
if (updateLayoutStateNeeded != 0)
if (updateLayoutStateNeeded != 0 || !list.isValid())
protected void maybeUpdateLayoutState() { if (updateLayoutStateNeeded != 0) { updateLayoutState(); updateLayoutStateNeeded = 0; } }
int startIndex = list.locationToIndex(new Point(clip.x, clip.y)); int endIndex = list.locationToIndex(new Point(clip.x + clip.width,
int startIndex = locationToIndex(list, new Point(clip.x, clip.y)); int endIndex = locationToIndex(list, new Point(clip.x + clip.width,
public void paint(Graphics g, JComponent c) { int nrows = list.getModel().getSize(); if (nrows == 0) return; maybeUpdateLayoutState(); ListCellRenderer render = list.getCellRenderer(); ListModel model = list.getModel(); ListSelectionModel sel = list.getSelectionModel(); int lead = sel.getLe...
private static Color getColor(String s)
private static Color getColor(String colorName)
private static Color getColor(String s) { String s2 = (String)colorMap.get(s.toLowerCase()); if( s2 == null ) s2 = s; try { return Color.decode(s2); } catch(NumberFormatException nfe) { return null; } }
String s2 = (String)colorMap.get(s.toLowerCase()); if( s2 == null ) s2 = s;
colorName = colorName.toLowerCase();
private static Color getColor(String s) { String s2 = (String)colorMap.get(s.toLowerCase()); if( s2 == null ) s2 = s; try { return Color.decode(s2); } catch(NumberFormatException nfe) { return null; } }
catch(NumberFormatException nfe)
} catch (Exception nex)
private static Color getColor(String s) { String s2 = (String)colorMap.get(s.toLowerCase()); if( s2 == null ) s2 = s; try { return Color.decode(s2); } catch(NumberFormatException nfe) { return null; } }
"Table.focusCellHighlightBorder", getControlShadow(),
"Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(getControlShadow()),
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get...
setSelectionMode(SINGLE_TREE_SELECTION);
setSelectionMode(DISCONTIGUOUS_TREE_SELECTION);
public DefaultTreeSelectionModel() { setSelectionMode(SINGLE_TREE_SELECTION); listenerList = new EventListenerList(); }
throw new BAD_PARAM("Little endian is not yet supported", FAILED, CompletionStatus.COMPLETED_NO );
{ Big_Endian = false; c.setBigEndian(false); }
public void _read(cdrInput c) throws IOException, BAD_PARAM { int endian; endian = c.read_long(); if (endian != 0) throw new BAD_PARAM("Little endian is not yet supported", FAILED, CompletionStatus.COMPLETED_NO ); _read_no_endian(c); }
if (n_profiles == 0) { Id = null; Internet = null; return; }
public void _read_no_endian(cdrInput c) throws IOException, BAD_PARAM { Id = c.read_string(); int n_profiles = c.read_long(); for (int i = 0; i < n_profiles; i++) { int tag = c.read_long(); cdrBufInput profile = c.read_encapsulation(); if (tag == Internet_prof...
ULongSeqHolder h = new ULongSeqHolder(); h._read(input); return h.value;
int[] value = new int[ input.read_long() ]; input.read_ulong_array(value, 0, value.length); return value;
public static int[] read(InputStream input) { ULongSeqHolder h = new ULongSeqHolder(); h._read(input); return h.value; }
ULongSeqHolder h = new ULongSeqHolder(value); h._write(output);
output.write_long(value.length); output.write_ulong_array(value, 0, value.length);
public static void write(OutputStream output, int[] value) { ULongSeqHolder h = new ULongSeqHolder(value); h._write(output); }
Collection<String> resolvers = ResolverImpl.getDnsServers(); if( resolvers == null ) System.out.println("No DNS servers found."); else {
public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception { ParsedArguments cmdLine = HELP_INFO.parse(commandLine.toStringArray()); if (cmdLine.size() == 0) { Collection<String> resolvers = ResolverImpl.getDnsServers(); if( resolvers == null )...
for (String dnsServer : resolvers) { System.out.println(dnsServer);
ResolverImpl.printDnsServers();
public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception { ParsedArguments cmdLine = HELP_INFO.parse(commandLine.toStringArray()); if (cmdLine.size() == 0) { Collection<String> resolvers = ResolverImpl.getDnsServers(); if( resolvers == null )...
} }
public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception { ParsedArguments cmdLine = HELP_INFO.parse(commandLine.toStringArray()); if (cmdLine.size() == 0) { Collection<String> resolvers = ResolverImpl.getDnsServers(); if( resolvers == null )...
try { return (url.openConnection() != null ? DUMMY_CLIP : null); } catch (IOException ioe) { return null; }
return Applet.newAudioClip(url);
public AudioClip getAudioClip(URL url) { try { return (url.openConnection() != null ? DUMMY_CLIP : null); } catch (IOException ioe) { return null; } }
case KeyEvent.VK_X: { console.getManager().unregisterConsole(console); break;}
case KeyEvent.VK_Q: { console.getManager().unregisterConsole(console); break;}
public void keyPressed(KeyboardEvent e) { int k = e.getKeyCode(); if(e.isControlDown()) switch (k) { case KeyEvent.VK_UP: {if(fy > 0) fy --; break;} case KeyEvent.VK_DOWN: {if(fy < my() - cym) fy ++; break;} case KeyEvent.VK_LEFT: {if(fx > 0) fx ...
if(c == 0) return;
if(c == 0 && k != KeyEvent.VK_DELETE) return;
public void keyPressed(KeyboardEvent e) { int k = e.getKeyCode(); if(e.isControlDown()) switch (k) { case KeyEvent.VK_UP: {if(fy > 0) fy --; break;} case KeyEvent.VK_DOWN: {if(fy < my() - cym) fy ++; break;} case KeyEvent.VK_LEFT: {if(fx > 0) fx ...
if(!f.exists()) return; BufferedReader br = new BufferedReader(new FileReader(f)); int c; StringBuilder sb = new StringBuilder(); while((c = br.read()) != -1){ if(c == '\n'){ sb.append((char) c);
if(f.exists()){ BufferedReader br = new BufferedReader(new FileReader(f)); int c; StringBuilder sb = new StringBuilder(); while((c = br.read()) != -1){ if(c == '\n'){ sb.append((char) c); ls.add(sb); sb = new StringBuilder(); } else { sb.append((char) c); } } if(sb.length() > 0)
public void loadFile(File f) throws IOException { ls.clear(); if(!f.exists()) return; BufferedReader br = new BufferedReader(new FileReader(f)); int c; StringBuilder sb = new StringBuilder(); while((c = br.read()) != -1){ if(c == '\n'){ sb.append(...
sb = new StringBuilder(); } else { sb.append((char) c); }
public void loadFile(File f) throws IOException { ls.clear(); if(!f.exists()) return; BufferedReader br = new BufferedReader(new FileReader(f)); int c; StringBuilder sb = new StringBuilder(); while((c = br.read()) != -1){ if(c == '\n'){ sb.append(...
if(sb.length() > 0) ls.add(sb);
public void loadFile(File f) throws IOException { ls.clear(); if(!f.exists()) return; BufferedReader br = new BufferedReader(new FileReader(f)); int c; StringBuilder sb = new StringBuilder(); while((c = br.read()) != -1){ if(c == '\n'){ sb.append(...
public ImageReaderIterator(Iterator it)
public ImageReaderIterator(Iterator it, Object readerExtension)
public ImageReaderIterator(Iterator it) { this.it = it; }
this.readerExtension = readerExtension;
public ImageReaderIterator(Iterator it) { this.it = it; }
return ((ImageReaderSpi) it.next()).createReaderInstance();
return ((ImageReaderSpi) it.next()).createReaderInstance(readerExtension);
public Object next() { try { return ((ImageReaderSpi) it.next()).createReaderInstance(); } catch (IOException e) { return null; } }
public ImageWriterIterator(Iterator it)
public ImageWriterIterator(Iterator it, Object writerExtension)
public ImageWriterIterator(Iterator it) { this.it = it; }
this.writerExtension = writerExtension;
public ImageWriterIterator(Iterator it) { this.it = it; }
return ((ImageWriterSpi) it.next()).createWriterInstance();
return ((ImageWriterSpi) it.next()).createWriterInstance(writerExtension);
public Object next() { try { return ((ImageWriterSpi) it.next()).createWriterInstance(); } catch (IOException e) { return null; } }
if (provider instanceof ImageReaderSpi)
if (provider instanceof ImageWriterSpi)
public boolean filter(Object provider) { if (provider instanceof ImageReaderSpi) { ImageReaderSpi spi = (ImageReaderSpi) provider; String[] formatNames = spi.getFormatNames(); for (int i = formatNames.length - 1; i >= 0; --i) if (formatName.equals(formatNames[i])) return true; } retu...
ImageReaderSpi spi = (ImageReaderSpi) provider;
ImageWriterSpi spi = (ImageWriterSpi) provider;
public boolean filter(Object provider) { if (provider instanceof ImageReaderSpi) { ImageReaderSpi spi = (ImageReaderSpi) provider; String[] formatNames = spi.getFormatNames(); for (int i = formatNames.length - 1; i >= 0; --i) if (formatName.equals(formatNames[i])) return true; } retu...
if (provider instanceof ImageReaderSpi)
if (provider instanceof ImageWriterSpi)
public boolean filter(Object provider) { if (provider instanceof ImageReaderSpi) { ImageWriterSpi spi = (ImageWriterSpi) provider; String[] mimetypes = spi.getMIMETypes(); for (int i = mimetypes.length - 1; i >= 0; --i) if (MIMEType.equals(mimetypes[i])) ...
if (provider instanceof ImageReaderSpi)
if (provider instanceof ImageWriterSpi)
public boolean filter(Object provider) { if (provider instanceof ImageReaderSpi) { ImageWriterSpi spi = (ImageWriterSpi) provider; String[] suffixes = spi.getFileSuffixes(); for (int i = suffixes.length - 1; i >= 0; --i) if (fileSuffix.equals(suffixes[i])) ...
new ReaderFormatFilter(formatName));
new ReaderFormatFilter(formatName), formatName);
public static Iterator getImageReadersByFormatName(String formatName) { if (formatName == null) throw new IllegalArgumentException("formatName may not be null"); return getReadersByFilter(ImageReaderSpi.class, new ReaderFormatFilter(formatName)); }
new ReaderMIMETypeFilter(MIMEType));
new ReaderMIMETypeFilter(MIMEType), MIMEType);
public static Iterator getImageReadersByMIMEType(String MIMEType) { if (MIMEType == null) throw new IllegalArgumentException("MIMEType may not be null"); return getReadersByFilter(ImageReaderSpi.class, new ReaderMIMETypeFilter(MIMEType)); }
new ReaderSuffixFilter(fileSuffix));
new ReaderSuffixFilter(fileSuffix), fileSuffix);
public static Iterator getImageReadersBySuffix(String fileSuffix) { if (fileSuffix == null) throw new IllegalArgumentException("formatName may not be null"); return getReadersByFilter(ImageReaderSpi.class, new ReaderSuffixFilter(fileSuffix)); }
new WriterFormatFilter(formatName));
new WriterFormatFilter(formatName), formatName);
public static Iterator getImageWritersByFormatName(String formatName) { if (formatName == null) throw new IllegalArgumentException("formatName may not be null"); return getWritersByFilter(ImageWriterSpi.class, new WriterFormatFilter(formatName)); }
new WriterMIMETypeFilter(MIMEType));
new WriterMIMETypeFilter(MIMEType), MIMEType);
public static Iterator getImageWritersByMIMEType(String MIMEType) { if (MIMEType == null) throw new IllegalArgumentException("MIMEType may not be null"); return getWritersByFilter(ImageWriterSpi.class, new WriterMIMETypeFilter(MIMEType)); }
new WriterSuffixFilter(fileSuffix));
new WriterSuffixFilter(fileSuffix), fileSuffix);
public static Iterator getImageWritersBySuffix(String fileSuffix) { if (fileSuffix == null) throw new IllegalArgumentException("fileSuffix may not be null"); return getWritersByFilter(ImageWriterSpi.class, new WriterSuffixFilter(fileSuffix)); }
ServiceRegistry.Filter filter)
ServiceRegistry.Filter filter, Object readerExtension)
private static Iterator getReadersByFilter(Class type, ServiceRegistry.Filter filter) { try { Iterator it = getRegistry().getServiceProviders(type, filter, true); return new ImageReaderIterator(it); } catch (IllegalArgumentException e) { ...
return new ImageReaderIterator(it);
return new ImageReaderIterator(it, readerExtension);
private static Iterator getReadersByFilter(Class type, ServiceRegistry.Filter filter) { try { Iterator it = getRegistry().getServiceProviders(type, filter, true); return new ImageReaderIterator(it); } catch (IllegalArgumentException e) { ...
ServiceRegistry.Filter filter)
ServiceRegistry.Filter filter, Object writerExtension)
private static Iterator getWritersByFilter(Class type, ServiceRegistry.Filter filter) { try { Iterator it = getRegistry().getServiceProviders(type, filter, true); return new ImageWriterIterator(it); } catch (IllegalArgumentException e) { return Collections.EMPTY_SET...
return new ImageWriterIterator(it);
return new ImageWriterIterator(it, writerExtension);
private static Iterator getWritersByFilter(Class type, ServiceRegistry.Filter filter) { try { Iterator it = getRegistry().getServiceProviders(type, filter, true); return new ImageWriterIterator(it); } catch (IllegalArgumentException e) { return Collections.EMPTY_SET...
if (types[i].equals(output.getClass()))
if (types[i].isInstance(output))
public void setOutput(Object output) { if (output != null) { // Check if its a valid output object. boolean found = false; Class[] types = null; if (originatingProvider != null) types = originatingProvider.getOutputTypes(); if (types != null) for (int i = types.length - 1; i >= 0; --i) if (types[i]....
if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
String ctxName = ctx.getLocalName(); if (ctxName == null) { ctxName = ctx.getNodeName(); } if (!"tr".equalsIgnoreCase(ctxName))
Node getRow(final int index) { int i = 0; Node thead = getChildElement("thead"); if (thead != null) { for (Node ctx = thead.getFirstChild(); ctx != null; ctx = ctx.getNextSibling()) { if (!"tr".equalsIgnoreCase(ctx.getLocalName())) { c...
} else { setText(""); setIcon(null); }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { FileView v = getFileView(getFileChooser()); File f = (File) value; setText(v.getName(f)); setIcon(v.getIcon(f)); setOpaque(true); if (isSelected) ...
if (file == null || !file.isFile())
if (file == null)
public void propertyChange(PropertyChangeEvent e) { JFileChooser filechooser = getFileChooser(); String n = e.getPropertyName(); if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY)) { int mode = -1; if (filechooser.isMultiSelectionEnabled()) ...
directoryLabel = save; dirLabel.setText(directoryLabel);
public void propertyChange(PropertyChangeEvent e) { JFileChooser filechooser = getFileChooser(); String n = e.getPropertyName(); if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY)) { int mode = -1; if (filechooser.isMultiSelectionEnabled()) ...
bounds.x += icon.getIconWidth() + 4;
{ int padding = icon.getIconWidth() + 4; bounds.x += padding; bounds.width -= padding; }
void editFile(int index) { Rectangle bounds = list.getCellBounds(index, index); list.scrollRectToVisible(bounds); editFile = (File) list.getModel().getElementAt(index); if (editFile.canWrite()) { startEditing = true; editField = new JTextField(editFile.getName()); ...
scrollPane.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_NEVER); fileList.setLayoutOrientation(JList.VERTICAL_WRAP);
protected JPanel createList(JFileChooser fc) { if (fileList == null) { fileListPanel = new JPanel(new BorderLayout()); fileList = new JList(getModel()); scrollPane = new JScrollPane(fileList); // FIXME: fileList.setLayoutOrientation(JList.VERTICAL_WRAP); fileList.setCellRenderer(ne...
scrollPane.setViewport(new JViewport());
protected JPanel createList(JFileChooser fc) { if (fileList == null) { fileListPanel = new JPanel(new BorderLayout()); fileList = new JList(getModel()); scrollPane = new JScrollPane(fileList); // FIXME: fileList.setLayoutOrientation(JList.VERTICAL_WRAP); fileList.setCellRenderer(ne...
Dimension bup = buttonPanel.getMinimumSize(); Dimension fl = fileList.getMinimumSize(); return new Dimension((tp.width + bp.width + bup.width + fl.width), (tp.height + bp.height + bup.height + fl.height));
Dimension fl = fileListPanel.getMinimumSize(); return new Dimension(fl.width, tp.height + bp.height + fl.height);
public Dimension getMinimumSize(JComponent c) { Dimension tp = topPanel.getMinimumSize(); Dimension bp = bottomPanel.getMinimumSize(); Dimension bup = buttonPanel.getMinimumSize(); Dimension fl = fileList.getMinimumSize(); return new Dimension((tp.width + bp.width + bup.width + fl.width), ...
Dimension bup = buttonPanel.getPreferredSize(); Dimension fl = fileList.getPreferredSize(); return new Dimension((tp.width + bp.width + bup.width + fl.width), (tp.height + bp.height + bup.height + fl.height));
Dimension fl = fileListPanel.getPreferredSize(); return new Dimension(fl.width, tp.height + bp.height + fl.height);
public Dimension getPreferredSize(JComponent c) { Dimension tp = topPanel.getPreferredSize(); Dimension bp = bottomPanel.getPreferredSize(); Dimension bup = buttonPanel.getPreferredSize(); Dimension fl = fileList.getPreferredSize(); return new Dimension((tp.width + bp.width + bup.width + fl.wid...
topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST);
dirLabel = new JLabel(directoryLabel); topPanel.add(dirLabel, BorderLayout.WEST);
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
dirPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
fc.add(createList(fc), BorderLayout.CENTER);
JPanel list = createList(fc); list.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); fc.add(list, BorderLayout.CENTER);
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
JPanel filterPanel = new JPanel(new VerticalMidLayout()); filterPanel.add(fileFilterCombo);
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
row2.add(filterPanel);
row2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); row2.add(fileFilterCombo);
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
buttonPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 0));
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
bottomPanel.add(buttonPanel);
bottomPanel.add(buttonPanel, BorderLayout.SOUTH); bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 8, 8));
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
fc.add(getAccessoryPanel(), BorderLayout.EAST);
public void installComponents(JFileChooser fc) { fc.setLayout(new BorderLayout()); topPanel = new JPanel(new BorderLayout()); topPanel.add(new JLabel(directoryLabel), BorderLayout.WEST); this.controls = new JPanel(); addControlButtons(); JPanel dirPanel = new JPanel(new VerticalMidLayout()); ...
directoryLabel = "Look In: ";
look = "Look In: "; save = "Save In: "; if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) directoryLabel = save; else directoryLabel = look;
protected void installStrings(JFileChooser fc) { super.installStrings(fc); directoryLabel = "Look In: "; fileLabel = "File Name: "; filterLabel = "Files of Type: "; this.cancelButtonMnemonic = 0; this.cancelButtonText = "Cancel"; this.cancelButtonToolTipText = "Abort file chooser di...
scrollPane.setViewport(new JViewport());
JPanel updateTable() { DefaultTableModel mod = (DefaultTableModel) fileTable.getModel(); ListModel lm = fileList.getModel(); DateFormat dt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); File curr = null; int size = lm.getSize(); ...
scrollPane.getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
JPanel updateTable() { DefaultTableModel mod = (DefaultTableModel) fileTable.getModel(); ListModel lm = fileList.getModel(); DateFormat dt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); File curr = null; int size = lm.getSize(); ...
{
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ProcessingInstructionNode(name); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
}
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ProcessingInstructionNode(name); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
{
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { String data = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); if (children != null) ...
}
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { String data = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); if (children != null) ...
StringBuffer buf = new StringBuffer(getClass().getName());
StringBuffer buf = new StringBuffer("processing-instruction");
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); buf.append(']'); return buf.toString(); }
if (selection.length == 0) return;
public void processKeyEvent(KeyEvent e) { MenuElement[] selection = (MenuElement[]) selectedPath.toArray(new MenuElement[selectedPath.size()]); MenuElement[] path; for (int index = selection.length - 1; index >= 0; index--) { MenuElement el = selection[index]; // This m...
public UDPProtocol(IPv4Service ipService) throws NetworkException { this.ipService = ipService; this.icmp = new ICMPUtils(ipService); try { dsiFactory = new UDPDatagramSocketImplFactory(this); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException { DatagramSocket.s...
public UDPProtocol(IPv4Service ipService) throws NetworkException { this.ipService = ipService; this.icmp = new ICMPUtils(ipService); try { dsiFactory = new UDPDatagramSocketImplFactory(this); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException { DatagramSocket.s...
public UDPProtocol(IPv4Service ipService) throws NetworkException { this.ipService = ipService; this.icmp = new ICMPUtils(ipService); try { dsiFactory = new UDPDatagramSocketImplFactory(this); try { AccessController.doPrivileged(new PrivilegedExceptionAction...
catch (IOException ex) { throw new NetworkException(ex); } }
public UDPProtocol(IPv4Service ipService) throws NetworkException { this.ipService = ipService; this.icmp = new ICMPUtils(ipService); try { dsiFactory = new UDPDatagramSocketImplFactory(this); try { AccessController.doPrivileged(new PrivilegedExceptionAction...
if (title == null || title.charAt(index) != mnemonicKey)
if (title == null || mnemonicKey == 0 || title.charAt(index) != mnemonicKey)
public void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException { if (index < -1 || title != null && index >= title.length()) throw new IllegalArgumentException(); if (title == null || title.charAt(index) != mnemonicKey) index = -1; underlinedChar...
{
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) { sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); } TemplateNode ret = new ForEachNode(select.clone(stylesheet), s...
}
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys.size(); List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) { sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); } TemplateNode ret = new ForEachNode(select.clone(stylesheet), s...
{
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { // Set current template to null Template saved = stylesheet.currentTemplate; stylesheet.currentT...
}
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { // Set current template to null Template saved = stylesheet.currentTemplate; stylesheet.currentT...
{
public boolean references(QName var) { if (select != null && select.references(var)) { return true; } if (sortKeys != null) { for (Iterator i = sortKeys.iterator(); i.hasNext(); ) { if (((SortKey) i.next()).references(var)) { return t...
}
public boolean references(QName var) { if (select != null && select.references(var)) { return true; } if (sortKeys != null) { for (Iterator i = sortKeys.iterator(); i.hasNext(); ) { if (((SortKey) i.next()).references(var)) { return t...
StringBuffer buf = new StringBuffer(getClass().getName());
StringBuffer buf = new StringBuffer("for-each");
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("select="); buf.append(select); buf.append(']'); return buf.toString(); }