本文整理了Java中javax.swing.JFileChooser.isTraversable()
方法的一些代码示例,展示了JFileChooser.isTraversable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.isTraversable()
方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:isTraversable
暂无
代码示例来源:origin: org.gephi/directory-chooser
private void changeTreeDirectory(File dir) {
if (File.separatorChar == '\\' && dir.getPath().endsWith(".lnk")) {
File linkLocation = getShellFolderForFileLinkLoc(dir);
if (linkLocation != null && fileChooser.isTraversable(linkLocation)) {
dir = linkLocation;
} else {
return;
}
}
fileChooser.setCurrentDirectory(dir);
}
代码示例来源:origin: org.gephi/directory-chooser
private File[] getSelectedNodes(TreePath[] paths) {
Vector<File> files = new Vector<>();
for(int i = 0; i < paths.length; i++) {
File file = ((DirectoryNode)paths[i].getLastPathComponent()).getFile();
if(file.isDirectory()
&& fileChooser.isTraversable(file)
&& !fileChooser.getFileSystemView().isFileSystem(file)) {
continue;
}
files.add(file);
}
return files.toArray(new File[files.size()]);
}
代码示例来源:origin: org.codehaus.izpack/izpack-panel
while (!filechooser.isTraversable(initialPath) && prev != initialPath) {
prev = initialPath;
if (initialPath != null)
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/** Informs this instance that the selection has changed. */
public void valueChanged(ListSelectionEvent e)
{
JFileChooser fc= getFileChooser();
File f= fc.getSelectedFile();
if (!e.getValueIsAdjusting()
&& f != null
&& !getFileChooser().isTraversable(f))
{
setFileName(fileNameString(f));
}
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
public Vector getFiles() {
synchronized (fileCache) {
if(files != null) {
return files;
}
files = new Vector();
directories = new Vector();
directories.addElement(filechooser.getFileSystemView()
.createFileObject(filechooser.getCurrentDirectory(), ".."));
for(int i = 0; i < getSize(); i++) {
File f = (File)fileCache.get(i);
if(filechooser.isTraversable(f)) {
directories.add(f);
}
else {
files.add(f);
}
}
return files;
}
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
boolean isTraversable = filechooser.isTraversable(f);
if(isTraversable) {
newDirectories.addElement(f);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
&& chooser.isTraversable(((File) objects[0]))
&& (chooser.getFileSelectionMode()
== JFileChooser.FILES_ONLY
if (file != null
&& file.isDirectory()
&& chooser.isTraversable(file)
&& (chooser.getFileSelectionMode() == JFileChooser.FILES_ONLY
|| !fsv.isFileSystem(file)))
内容来源于网络,如有侵权,请联系作者删除!