本文整理了Java中javax.swing.JFileChooser.isAcceptAllFileFilterUsed()
方法的一些代码示例,展示了JFileChooser.isAcceptAllFileFilterUsed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.isAcceptAllFileFilterUsed()
方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:isAcceptAllFileFilterUsed
暂无
代码示例来源:origin: orbisgis/orbisgis
/**
* Recover the dialog state on the last save state, using the dialog identifier.
* The following properties may be overwritten
* - Current directory
* - Current filter
*/
@Override
public void loadState() {
// Load persistence data
String currentFolder = UIFactory.getFileDialogPersistence().getProperty(id+":folder");
if(currentFolder!=null) {
setCurrentDirectory(new File(currentFolder));
}
String currentFilter = UIFactory.getFileDialogPersistence().getProperty(id+":filter");
if(currentFilter!=null && !setCurrentFilter(Integer.valueOf(currentFilter))) {
// If the filter is not found, do not use filter, if allowed
if(getFileChooser().isAcceptAllFileFilterUsed()) {
getFileChooser().setFileFilter(getFileChooser().getAcceptAllFileFilter());
}
}
}
/**
代码示例来源:origin: pvto/konte-art
public void saveWithName()
{
setFileChooser();
if (getPath() != null)
{
getFc().setCurrentDirectory(new File(getPath()));
}
int retVal = getFc().showSaveDialog(this);
if (retVal == 0) { // ok
File f = getFc().getSelectedFile();
getFc().isAcceptAllFileFilterUsed();
if (f != null)
{
if (getFc().getFileFilter() != getFc().getAcceptAllFileFilter() &&
!f.getName().toLowerCase().endsWith(".c3dg"))
{
f = new File(f.getAbsolutePath() + ".c3dg");
}
EditViewCombo ev = (EditViewCombo) tabs.getSelectedComponent();
ev.setFile(f);
this.setPath(f.getAbsolutePath().replaceFirst(f.getName() + "$", ""));
save();
tabs.setTitleAt(tabs.getSelectedIndex(), f.getName());
addLatest(" " + f.getAbsolutePath());
updateLatestMenu();
saveProps();
}
}
}
代码示例来源:origin: pvto/konte-art
if (retVal == 0) { // ok
File f = getFc().getSelectedFile();
getFc().isAcceptAllFileFilterUsed();
if (f != null)
内容来源于网络,如有侵权,请联系作者删除!