Package javax.swing

Examples of javax.swing.JFileChooser.addPropertyChangeListener()


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.getFileView(), null);
   
    FileView fv1 = new FileView() {};
    jfc.setFileView(fv1);
    harness.check(jfc.getFileView(), fv1);
View Full Code Here


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.getFileSystemView(), FileSystemView.getFileSystemView());
   
    FileSystemView fsv1 = new MyFileSystemView();
    jfc.setFileSystemView(fsv1);
    harness.check(jfc.getFileSystemView(), fsv1);
View Full Code Here

    JFileChooser fc = new JFileChooser();
    FileSystemView fsv = fc.getFileSystemView();
    File[] roots = fsv.getRoots();
    File root = roots[0];
    fc.setCurrentDirectory(root);
    fc.addPropertyChangeListener(this);
    fc.changeToParentDirectory();
    harness.check(fc.getCurrentDirectory(),
            new File(System.getProperty("user.home")));
    harness.check(events.size(), 1);
  }
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.getApproveButtonText(), null);
   
    jfc.setApproveButtonText("XYZ");
    harness.check(jfc.getApproveButtonText(), "XYZ");
    harness.check(event.getPropertyName(),
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.getApproveButtonToolTipText(), null);
   
    jfc.setApproveButtonToolTipText("XYZ");
    harness.check(jfc.getApproveButtonToolTipText(), "XYZ");
    harness.check(event.getPropertyName(),
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.getDialogTitle(), null);
   
    jfc.setDialogTitle("XYZ");
    harness.check(jfc.getDialogTitle(), "XYZ");
    harness.check(event.getPropertyName(),
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser jfc = new JFileChooser();
    jfc.addPropertyChangeListener(this);
    harness.check(jfc.isFileHidingEnabled(), true);
   
    jfc.setFileHidingEnabled(false);
    harness.check(jfc.isFileHidingEnabled(), false);
    harness.check(event.getPropertyName(),
View Full Code Here

  public void test1(TestHarness harness)
  {
    harness.checkPoint("test1");
    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    fc.addPropertyChangeListener(this);
    fc.removeChoosableFileFilter(acceptAllFilter);
    FileFilter[] filters = fc.getChoosableFileFilters();
    harness.check(filters.length, 0);
    harness.check(events.size(), 2);
    PropertyChangeEvent e1 = (PropertyChangeEvent) events.get(0);
View Full Code Here

    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    fc.setFileFilter(acceptAllFilter);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(acceptAllFilter);
    harness.check(removed);
    FileFilter[] filters = fc.getChoosableFileFilters();
    harness.check(filters.length, 1);
    harness.check(events.size(), 2);
View Full Code Here

    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    fc.setFileFilter(acceptAllFilter);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(f1);
    harness.check(removed);
    FileFilter[] filters = fc.getChoosableFileFilters();
    harness.check(filters.length, 1);
    harness.check(events.size(), 1);
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.