本文整理了Java中javax.swing.JFileChooser.setToolTipText()
方法的一些代码示例,展示了JFileChooser.setToolTipText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.setToolTipText()
方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:setToolTipText
暂无
代码示例来源:origin: skylot/jadx
public void openFile() {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setAcceptAllFileFilterUsed(true);
String[] exts = {"apk", "dex", "jar", "class", "zip", "aar", "arsc"};
String description = "supported files: " + Arrays.toString(exts).replace('[', '(').replace(']', ')');
fileChooser.setFileFilter(new FileNameExtensionFilter(description, exts));
fileChooser.setToolTipText(NLS.str("file.open_action"));
String currentDirectory = settings.getLastOpenFilePath();
if (!currentDirectory.isEmpty()) {
fileChooser.setCurrentDirectory(new File(currentDirectory));
}
int ret = fileChooser.showDialog(mainPanel, NLS.str("file.open_title"));
if (ret == JFileChooser.APPROVE_OPTION) {
settings.setLastOpenFilePath(fileChooser.getCurrentDirectory().getPath());
openFile(fileChooser.getSelectedFile());
}
}
代码示例来源:origin: skylot/jadx
private void saveAll(boolean export) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.setToolTipText(NLS.str("file.save_all_msg"));
String currentDirectory = settings.getLastSaveFilePath();
if (!currentDirectory.isEmpty()) {
fileChooser.setCurrentDirectory(new File(currentDirectory));
}
int ret = fileChooser.showDialog(mainPanel, NLS.str("file.select"));
if (ret == JFileChooser.APPROVE_OPTION) {
JadxArgs decompilerArgs = wrapper.getArgs();
decompilerArgs.setExportAsGradleProject(export);
if (export) {
decompilerArgs.setSkipSources(false);
decompilerArgs.setSkipResources(false);
} else {
decompilerArgs.setSkipSources(settings.isSkipSources());
decompilerArgs.setSkipResources(settings.isSkipResources());
}
settings.setLastSaveFilePath(fileChooser.getCurrentDirectory().getPath());
ProgressMonitor progressMonitor = new ProgressMonitor(mainPanel, NLS.str("msg.saving_sources"), "", 0, 100);
progressMonitor.setMillisToPopup(0);
wrapper.saveAll(fileChooser.getSelectedFile(), progressMonitor);
}
}
代码示例来源:origin: freeplane/freeplane
/**
* This constructor does <i>not</i> the export per itself.
* It populates the {@link #fileChooser} field
* (especially the {@link JFileChooser#getChoosableFileFilters() choosable
* file filters}).
*/
ExportDialog(List<FileFilter> fileFilters, Map<FileFilter, IExportEngine> exportEngines, String dialogTitle) {
super();
this.exportEngines = exportEngines;
fileChooser.setAcceptAllFileFilterUsed(false); // the user can't select an "All Files filter"
fileChooser.setDialogTitle(TextUtils.getText(dialogTitle));
fileChooser.setToolTipText(TextUtils.getText("select_file_export_to"));
for (FileFilter filter : fileFilters) {
fileChooser.addChoosableFileFilter(filter);
}
preselectFileFilter();
}
代码示例来源:origin: es.gob.afirma/afirma-ui-core-jse
fileChooser.setToolTipText(JSEUIMessages.getString("JSEUIManager.81")); //$NON-NLS-1$
代码示例来源:origin: nu.zoom/portunis
chooser.setMultiSelectionEnabled(false);
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.setToolTipText(messages.getMessage("keystore.import.cert.tooltip"));
chooser.setDialogTitle(messages.getMessage("keystore.import.cert"));
int option = chooser.showOpenDialog(workbench.getDialogOwner());
内容来源于网络,如有侵权,请联系作者删除!