本文整理了Java中javax.swing.filechooser.FileFilter
类的一些代码示例,展示了FileFilter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileFilter
类的具体详情如下:
包路径:javax.swing.filechooser.FileFilter
类名称:FileFilter
暂无
代码示例来源:origin: org.netbeans.api/org-openide-filesystems
@Override
public int compare(FileFilter o1, FileFilter o2) {
return o1.getDescription().compareTo(o2.getDescription());
}
});
代码示例来源:origin: EvoSuite/evosuite
public boolean accept(File f) {
boolean shown = true;
if(f != null && fileFilter != null) {
shown = fileFilter.accept(f);
}
return shown;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
public java.io.FileFilter getIOFileFilter() {
return new java.io.FileFilter() {
public boolean accept(File file) {
return UrlFileFilter.this.accept(file);
}
};
}
}
代码示例来源:origin: nl.cloudfarming.client/sensor-api
@Override
public boolean accept(File pathname) {
for (FileFilter filter : filters) {
if (filter.accept(pathname)) {
return true;
}
}
return false;
}
代码示例来源:origin: openmicroscopy/bioformats
/** Accepts files with the proper filename prefix. */
@Override
public boolean accept(File f) {
for (int i=0; i<filts.length; i++) {
if (filts[i].accept(f)) return true;
}
return false;
}
代码示例来源:origin: knowm/XChart
if (fileChooser.getFileFilter() == null) {
BitmapEncoder.saveBitmap(chart, theFileToSave.getCanonicalPath(), BitmapFormat.PNG);
} else if (fileChooser.getFileFilter().getDescription().equals("*.jpg,*.JPG")) {
BitmapEncoder.saveJPGWithQuality(
chart,
BitmapEncoder.addFileExtension(theFileToSave.getCanonicalPath(), BitmapFormat.JPG),
1.0f);
} else if (fileChooser.getFileFilter().getDescription().equals("*.png,*.PNG")) {
BitmapEncoder.saveBitmap(chart, theFileToSave.getCanonicalPath(), BitmapFormat.PNG);
} else if (fileChooser.getFileFilter().getDescription().equals("*.bmp,*.BMP")) {
BitmapEncoder.saveBitmap(chart, theFileToSave.getCanonicalPath(), BitmapFormat.BMP);
} else if (fileChooser.getFileFilter().getDescription().equals("*.gif,*.GIF")) {
BitmapEncoder.saveBitmap(chart, theFileToSave.getCanonicalPath(), BitmapFormat.GIF);
} else if (fileChooser.getFileFilter().getDescription().equals("*.svg,*.SVG")) {
VectorGraphicsEncoder.saveVectorGraphic(
chart, theFileToSave.getCanonicalPath(), VectorGraphicsFormat.SVG);
} else if (fileChooser.getFileFilter().getDescription().equals("*.eps,*.EPS")) {
VectorGraphicsEncoder.saveVectorGraphic(
chart, theFileToSave.getCanonicalPath(), VectorGraphicsFormat.EPS);
} else if (fileChooser.getFileFilter().getDescription().equals("*.pdf,*.PDF")) {
VectorGraphicsEncoder.saveVectorGraphic(
chart, theFileToSave.getCanonicalPath(), VectorGraphicsFormat.PDF);
代码示例来源:origin: ome/formats-bsd
/** Accepts files with the proper filename prefix. */
@Override
public boolean accept(File f) {
for (int i=0; i<filts.length; i++) {
if (filts[i].accept(f)) return true;
}
return false;
}
代码示例来源:origin: freeplane/freeplane
public int compare(FileFilter f1, FileFilter f2) {
return f1.getDescription().compareToIgnoreCase(f2.getDescription());
}
};
代码示例来源:origin: scifio/scifio
/** Accepts files with the proper filename prefix. */
@Override
public boolean accept(final File file) {
for (final FileFilter filter : fileFilters) {
if (filter.accept(file)) return true;
}
return false;
}
代码示例来源:origin: freeplane/freeplane
private FileFilter findExportFileFilterByDescription(List<FileFilter> fileFilters, String exportTypeDescription) {
for (FileFilter fileFilter : fileFilters) {
if (fileFilter.getDescription().equals(exportTypeDescription))
return fileFilter;
}
return null;
}
代码示例来源:origin: io.scif/scifio
/** Accepts files with the proper filename prefix. */
@Override
public boolean accept(final File file) {
for (final FileFilter filter : fileFilters) {
if (filter.accept(file)) return true;
}
return false;
}
代码示例来源:origin: openmicroscopy/bioformats
/** Compares two FileFilter objects alphanumerically. */
@Override
public int compareTo(Object o) {
return desc.compareToIgnoreCase(((FileFilter) o).getDescription());
}
代码示例来源:origin: datacleaner/DataCleaner
@Override
public boolean accept(final File f) {
for (final FileFilter fileFilter : fileFilters) {
if (fileFilter.accept(f)) {
return true;
}
}
return false;
}
代码示例来源:origin: io.scif/scifio
/** Compares two FileFilter objects alphanumerically. */
@Override
public int compareTo(final Object o) {
return desc.compareToIgnoreCase(((FileFilter) o).getDescription());
}
代码示例来源:origin: org.orbisgis/orbisgis-view
@Override
public boolean accept(File file) {
return fileFilter.accept(file);
}
代码示例来源:origin: io.scif/scifio
/** Compares two FileFilter objects alphanumerically. */
@Override
public int compareTo(final FileFilter o) {
return desc.compareTo(o.getDescription());
}
代码示例来源:origin: sc.fiji/FS_Align_TrakEM2
public boolean accept(File file) {
return javaxFileFilter.accept(file);
}
}
代码示例来源:origin: ome/formats-bsd
/** Compares two FileFilter objects alphanumerically. */
@Override
public int compareTo(Object o) {
return desc.compareTo(((FileFilter) o).getDescription());
}
代码示例来源:origin: edu.toronto.cs.savant/savant-core
@Override
public boolean accept(File dir, String name) {
return filter.accept(new File(dir, name));
}
}
代码示例来源:origin: ome/formats-bsd
/** Compares two FileFilter objects alphanumerically. */
@Override
public int compareTo(Object o) {
return desc.compareToIgnoreCase(((FileFilter) o).getDescription());
}
内容来源于网络,如有侵权,请联系作者删除!