javax.swing.JFileChooser.setApproveButtonToolTipText()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中javax.swing.JFileChooser.setApproveButtonToolTipText()方法的一些代码示例,展示了JFileChooser.setApproveButtonToolTipText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.setApproveButtonToolTipText()方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:setApproveButtonToolTipText

JFileChooser.setApproveButtonToolTipText介绍

暂无

代码示例

代码示例来源: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: 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: 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: ribomation/DroidAtScreen1

@Override
protected void doExecute(Application app, DeviceFrame deviceFrame) {
  if (capturing.get() && runner != null) {
    capturing.set(false);
    runner.interrupt();
    return;
  }
  JFileChooser chooser = new JFileChooser();
  chooser.setCurrentDirectory(app.getSettings().getImageDirectory());
  chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  chooser.setDialogTitle("Select target directory for the images");
  chooser.setApproveButtonText("Images Dir");
  chooser.setApproveButtonToolTipText("All screen-shots will go into this directory, sequentially numbered.");
  int rc = chooser.showOpenDialog(app.getAppFrame());
  if (rc != JFileChooser.APPROVE_OPTION)
    return;
  dir = chooser.getSelectedFile();
  if (!(dir.isAbsolute() && dir.canWrite())) {
    JOptionPane.showMessageDialog(app.getAppFrame(), "Not a writable directory " + dir, "Invalid directory", JOptionPane.ERROR_MESSAGE);
    return;
  }
  images = new LinkedBlockingQueue<ScreenImage>(120);
  device = deviceFrame;
  device.setRecordingListener(this);
  capturing.set(true);
  runner = new Thread(this);
  runner.start();
  setIcon("recording");
}

代码示例来源:origin: fcrepo3/fcrepo

browse.setApproveButtonMnemonic('E');
browse
    .setApproveButtonToolTipText("Exports to the selected directory.");
browse.setDialogTitle("Export to...");
browse.setDialogTitle("Choose export directory...");

代码示例来源:origin: bastienjalbert/topguw

cfile_file.setMultiSelectionEnabled(false);
cfile_file.setDialogTitle("Choose a cfile");
cfile_file.setApproveButtonToolTipText("");
cfile_file.setApproveButtonText("Open");
cfile_file.setBounds(476, -293, 400, 300);

代码示例来源:origin: org.xworker/xworker_core

comp.setApproveButtonToolTipText(approveButtonToolTipText);

相关文章

JFileChooser类方法