Examples of MyFileChooser


Examples of gnu.testlet.javax.swing.JFileChooser.MyFileChooser

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness
  {
    MyFileChooser fc = new MyFileChooser();
    MyMetalFileChooserUI ui = new MyMetalFileChooserUI(fc);
    fc.setUI(ui);
    ComboBoxModel m = ui.createFilterComboBoxModel();
    harness.check(m.getSize(), 1);
    harness.check(m.getElementAt(0), fc.getFileFilter());
   
    ComboBoxModel m2 = ui.createFilterComboBoxModel();
    harness.check(m != m2);
  }
View Full Code Here

Examples of versusSNP.gui.widgets.MyFileChooser

    this.ensureName = ensureName;
  }
 
  public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals(UICaption.dialog_caption_browse)) {
      MyFileChooser chooser = new MyFileChooser(Parameter.path_program_blastall);
      if (filters.length != 0) {
        for (MyFileFilter filter : filters)
          chooser.addChoosableFileFilter(filter);
        chooser.setFileFilter(filters[0]);
      }
      loopFileChooser(chooser);
    }
  }
View Full Code Here

Examples of versusSNP.gui.widgets.MyFileChooser

    this.operationType = operationType;
  }

  public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals(UICaption.dialog_caption_browse)) {
      MyFileChooser chooser = new MyFileChooser(Parameter.path_previous_dir);
      if (filters.length != 0) {
        for (MyFileFilter filter : filters)
          chooser.addChoosableFileFilter(filter);
        chooser.setFileFilter(filters[0]);
      }
      if (isDirectory) chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
      if (operationType == JFileChooser.SAVE_DIALOG) {
        if (chooser.showSaveDialog(null)==JFileChooser.APPROVE_OPTION) {
          if (txtField != null)
            txtField.setText(chooser.getSelectedFile().getAbsolutePath());
        }
      } else {
        if (chooser.showOpenDialog(null)==JFileChooser.APPROVE_OPTION) {
          if (txtField != null)
            txtField.setText(chooser.getSelectedFile().getAbsolutePath());
        }
       
      }
    }
  }
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.