本文整理了Java中javax.swing.JFileChooser.setApproveButtonMnemonic()
方法的一些代码示例,展示了JFileChooser.setApproveButtonMnemonic()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.setApproveButtonMnemonic()
方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:setApproveButtonMnemonic
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4
private JFileChooser getJFileChooser(){
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooserName")); //NOI18N
chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setApproveButtonMnemonic("Choose_Button_Mnemonic".charAt(0)); //NOI18N
chooser.setMultiSelectionEnabled(false);
chooser.setApproveButtonToolTipText(NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooserName")); //NOI18N
chooser.getAccessibleContext().setAccessibleName(NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooserName")); //NOI18N
chooser.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooserName")); //NOI18N
// set the current directory
chooser.setSelectedFile(new File(locationTextField.getText().trim()));
return chooser;
}
代码示例来源:origin: bcdev/beam
private static JFileChooser createDirectoryChooser() {
final JFileChooser fileChooser = new JFileChooser();
fileChooser.setAcceptAllFileFilterUsed(false);
fileChooser.setFileFilter(new FileFilter() {
@Override
public boolean accept(final File f) {
return f.isDirectory();
}
@Override
public String getDescription() {
return "Directories"; /* I18N */
}
});
fileChooser.setDialogTitle("Select Directory"); /* I18N */
fileChooser.setMultiSelectionEnabled(false);
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.setApproveButtonText("Select"); /* I18N */
fileChooser.setApproveButtonMnemonic('S');
return fileChooser;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
m_FileChooser.setApproveButtonMnemonic('S');
m_FileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
m_FileChooser.addActionListener(new ActionListener() {
代码示例来源:origin: senbox-org/snap-desktop
private static JFileChooser createDirectoryChooser() {
final JFileChooser fileChooser = new SnapFileChooser();
fileChooser.setAcceptAllFileFilterUsed(false);
fileChooser.setFileFilter(new FileFilter() {
@Override
public boolean accept(final File f) {
return f.isDirectory();
}
@Override
public String getDescription() {
return "Directories"; /* I18N */
}
});
fileChooser.setDialogTitle("Select Directory"); /* I18N */
fileChooser.setMultiSelectionEnabled(false);
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.setApproveButtonText("Select"); /* I18N */
fileChooser.setApproveButtonMnemonic('S');
return fileChooser;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81
static void decorateChooser(JFileChooser chooser,String fname,String title) {
chooser.setDialogTitle(title); //NOI18N
chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setApproveButtonMnemonic(NbBundle.getMessage(Util.class,
"Choose_Button_Mnemonic").charAt(0)); //NOI18N
chooser.setMultiSelectionEnabled(false);
chooser.setAcceptAllFileFilterUsed(false);
chooser.setApproveButtonToolTipText(NbBundle.getMessage(Util.class,
"LBL_Chooser_Name")); //NOI18N
chooser.getAccessibleContext().
setAccessibleName(NbBundle.getMessage(Util.class,
"LBL_Chooser_Name")); //NOI18N
chooser.getAccessibleContext().
setAccessibleDescription(NbBundle.getMessage(Util.class,
"LBL_Chooser_Name")); //NOI18N
if (null != fname && fname.length() > 0) {
File sel = new File(fname);
if (sel.isDirectory())
chooser.setCurrentDirectory(sel);
else
chooser.setSelectedFile(sel);
}
}
代码示例来源:origin: fcrepo3/fcrepo
public void actionPerformed(ActionEvent evt) {
JFileChooser browse;
if (Administrator.getLastDir() == null) {
browse = new JFileChooser();
} else {
browse = new JFileChooser(Administrator.getLastDir());
}
browse.setApproveButtonText("Import");
browse.setApproveButtonMnemonic('I');
browse
.setApproveButtonToolTipText("Imports the selected file.");
browse.setDialogTitle("Import New Datastream Content...");
int returnVal =
browse.showOpenDialog(Administrator.getDesktop());
if (returnVal == JFileChooser.APPROVE_OPTION) {
m_fileField.setText(browse.getSelectedFile().getPath());
}
}
});
代码示例来源:origin: Waikato/weka-trunk
m_FileChooser.setApproveButtonMnemonic('S');
m_FileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
m_FileChooser.addActionListener(new ActionListener() {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4
private JFileChooser getJFileChooser(){
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("LBL_Chooser_Name"); //NOI18N
chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setApproveButtonMnemonic("Choose_Button_Mnemonic".charAt(0)); //NOI18N
chooser.setMultiSelectionEnabled(false);
chooser.addChoosableFileFilter(new dirFilter());
chooser.setAcceptAllFileFilterUsed(false);
chooser.setApproveButtonToolTipText("LBL_Chooser_Name"); //NOI18N
chooser.getAccessibleContext().setAccessibleName("LBL_Chooser_Name"); //NOI18N
chooser.getAccessibleContext().setAccessibleDescription("LBL_Chooser_Name"); //NOI18N
return chooser;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2me-cdc-platform
DetectPanel.class,"TXT_SelectJavadoc"),new String[] {"ZIP","JAR"})); //NOI18N
chooser.setApproveButtonText(NbBundle.getMessage(DetectPanel.class,"CTL_SelectJD"));
chooser.setApproveButtonMnemonic(NbBundle.getMessage(DetectPanel.class,"MNE_SelectJD").charAt(0));
model = (DefaultListModel) javadocList.getModel();
} else if (volumeType.equalsIgnoreCase("src")) { //NOI18N
DetectPanel.class,"TXT_SelectSources"),new String[] {"ZIP","JAR"})); //NOI18N
chooser.setApproveButtonText(NbBundle.getMessage(DetectPanel.class,"CTL_SelectSRC"));
chooser.setApproveButtonMnemonic(NbBundle.getMessage(DetectPanel.class,"MNE_SelectSRC").charAt(0));
model = (DefaultListModel) sourcesList.getModel();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4
chooser.setApproveButtonMnemonic (approveButtonNameMne.charAt(0));
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2me-cdc-platform
chooser.setApproveButtonMnemonic (approveButtonNameMne.charAt(0));
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.setFileFilter (new SimpleFileFilter(message,new String[] {"ZIP","JAR"})); //NOI18N
代码示例来源:origin: dcaoyuan/nbscala
chooser.setApproveButtonMnemonic (approveButtonNameMne.charAt(0));
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-tomcat5
chooser.setApproveButtonMnemonic (approveButtonNameMne.charAt(0));
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81
chooser.setApproveButtonText(approveButtonName);
if (null != approveButtonNameMne) {
chooser.setApproveButtonMnemonic (approveButtonNameMne.charAt(0));
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
fileChooser.setMultiSelectionEnabled(false);
fileChooser.setDialogType(JFileChooser.OPEN_DIALOG);
fileChooser.setApproveButtonMnemonic(NbBundle.getMessage(ImportDiffAction.class, "Import").charAt(0)); // NO I18N
fileChooser.setApproveButtonText(NbBundle.getMessage(ImportDiffAction.class, "Import")); // NO I18N
fileChooser.setCurrentDirectory(new File(HgModuleConfig.getDefault().getImportFolder()));
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
chooser.setApproveButtonMnemonic(NbBundle.getMessage(ExportDiffSupport.class, "MNE_Export_ExportAction").charAt(0));
chooser.addActionListener(new ActionListener() {
@Override
代码示例来源:origin: fcrepo3/fcrepo
browse.setApproveButtonMnemonic('E');
browse
.setApproveButtonToolTipText("Exports to the selected directory.");
代码示例来源:origin: org.xworker/xworker_core
comp.setApproveButtonMnemonic(approveButtonMnemonic);
内容来源于网络,如有侵权,请联系作者删除!