Examples of showOpenDialog()


Examples of javax.swing.JFileChooser.showOpenDialog()

                // see MySwingWorker.construct -> it could be that site is not accessible
                // -> then the ui should not freeze
            } else {
                JFileChooser fc = new JFileChooser();
                fc.setDialogTitle(tr.get(ID + ".fileDialog"));
                int resultFC = fc.showOpenDialog(aw.getControl());
                if (resultFC != JFileChooser.APPROVE_OPTION) {
                    bar.setMessage(tr.get(ID + ".noFileSelected"));
                    return;
                }
                file = fc.getSelectedFile();
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

                    tr.get(ID + ".downloadQuestion"), JOptionPane.YES_NO_OPTION);
            if (resultDownload == JOptionPane.YES_OPTION) {
            } else {
                JFileChooser fc = new JFileChooser();
                fc.setDialogTitle(tr.get(ID + ".fileDialog"));
                int res = fc.showOpenDialog(getApplicationWindow().getControl());
                if (res != JFileChooser.APPROVE_OPTION) {
                    bar.setMessage(tr.get(ID + ".noFileSelected"));
                    return;
                }
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

    public void actionPerformed(ActionEvent event) {
      Object src = event.getSource();
      if (src == open) {
        JFileChooser chooser = JFileChoosers.createSelected(lastFile);
        chooser.setDialogTitle(Strings.get("openButton"));
        int choice = chooser.showOpenDialog(HexFrame.this);
        if (choice == JFileChooser.APPROVE_OPTION) {
          File f = chooser.getSelectedFile();
          try {
            HexFile.open(model, f);
            lastFile = f;
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

      Object src = event.getSource();
      if (src == templateButton) {
        JFileChooser chooser = JFileChoosers.create();
        chooser.setDialogTitle(Strings.get("selectDialogTitle"));
        chooser.setApproveButtonText(Strings.get("selectDialogButton"));
        int action = chooser.showOpenDialog(getPreferencesFrame());
        if (action == JFileChooser.APPROVE_OPTION) {
          File file = chooser.getSelectedFile();
          FileInputStream reader = null;
          InputStream reader2 = null;
          try {
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

  private void doLoad() {
    JFileChooser chooser = proj.createChooser();
    File oldSelected = factory.getCurrentImage(instance);
    if (oldSelected != null) chooser.setSelectedFile(oldSelected);
    chooser.setDialogTitle(Strings.get("ramLoadDialogTitle"));
    int choice = chooser.showOpenDialog(frame);
    if (choice == JFileChooser.APPROVE_OPTION) {
      File f = chooser.getSelectedFile();
      try {
        factory.loadImage(circState.getInstanceState(instance), f);
      } catch (IOException e) {
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

  /**
   * Call the FileChooser for the executable
   */
  private void changeFile() {
    JFileChooser chooser = new JFileChooser(new File(mFile.getText()));
    if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
      mFile.setText(chooser.getSelectedFile().getAbsolutePath());
    }
  }
 
  /**
 
View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

    /**
     * invoked when the user clicks the Button to open an FileChooser - Dialog
     */
    private void pathButtonPressed(ActionEvent e) {
        JFileChooser f = new JFileChooser();
        if (f.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
            mData.setProgramPath(f.getSelectedFile().toString());
            mPathTextField.setText(mData.getProgramPath());
        }
    }

View Full Code Here

Examples of javax.swing.JFileChooser.showOpenDialog()

      public void actionPerformed(ActionEvent e) {
        JFileChooser jfc = new JFileChooser();
        jfc.setName("请选择本地存放文件夹");
        jfc.setDialogTitle("请选择本地存放文件夹");
        jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int rc = jfc.showOpenDialog(frmEverbox);
        if(rc == JFileChooser.APPROVE_OPTION )
          rootpathField.setText(jfc.getSelectedFile().getAbsolutePath());
      }
    });
    sl_panel.putConstraint(SpringLayout.NORTH, selectRootPathButton, -4, SpringLayout.NORTH, label_3);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.