Package javax.swing

Examples of javax.swing.JFileChooser.addPropertyChangeListener()


                    super.approveSelection();
                }
            }
        };
        chooser.setDialogTitle(NbBundle.getMessage(GraphFileExporterUI.class, "GraphFileExporterUI_filechooser_title"));
        chooser.addPropertyChangeListener(JFileChooser.FILE_FILTER_CHANGED_PROPERTY, new PropertyChangeListener() {

            public void propertyChange(PropertyChangeEvent evt) {
                DialogFileFilter fileFilter = (DialogFileFilter) evt.getNewValue();

                //Options panel enabling
View Full Code Here


                        chooser.setSelectedFile(selectedFile);
                    }
                }
            }
        });
        chooser.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, new PropertyChangeListener() {

            public void propertyChange(PropertyChangeEvent evt) {
                if (evt.getNewValue() != null) {
                    selectedFile = (File) evt.getNewValue();
                }
View Full Code Here

                    super.approveSelection();
                }
            }
        };
        chooser.setDialogTitle(NbBundle.getMessage(VectorialFileExporterUI.class, "VectorialFileExporterUI_filechooser_title"));
        chooser.addPropertyChangeListener(JFileChooser.FILE_FILTER_CHANGED_PROPERTY, new PropertyChangeListener() {

            public void propertyChange(PropertyChangeEvent evt) {
                DialogFileFilter fileFilter = (DialogFileFilter) evt.getNewValue();

                //Options panel enabling
View Full Code Here

                        chooser.setSelectedFile(selectedFile);
                    }
                }
            }
        });
        chooser.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, new PropertyChangeListener() {

            public void propertyChange(PropertyChangeEvent evt) {
                if (evt.getNewValue() != null) {
                    selectedFile = (File) evt.getNewValue();
                }
View Full Code Here

   */
  public void test(TestHarness harness)      
  {
    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    fc.addPropertyChangeListener(this);
    harness.check(fc.isAcceptAllFileFilterUsed(), true);
    MyFileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    events.clear();
   
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.getApproveButtonMnemonic(), 0);
   
    jfc.setApproveButtonMnemonic(79);
    harness.check(jfc.getApproveButtonMnemonic(), 79);
    harness.check(event.getPropertyName(),
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    JFileChooser fc = new JFileChooser();
    fc.addPropertyChangeListener(this);
    harness.check(fc.getCurrentDirectory(), new File(System.getProperty("user.home")));
   
    File d = new File(harness.getTempDirectory());
    fc.setCurrentDirectory(d);
    harness.check(fc.getCurrentDirectory(), d);
View Full Code Here

  public void test1(TestHarness harness)
  {
    harness.checkPoint("test1");
    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    fc.addPropertyChangeListener(this);
    harness.check(fc.getFileFilter(), acceptAllFilter);
   
    FileFilter ff1 = new MyFileFilter(true);
    fc.setFileFilter(ff1);
    harness.check(fc.getFileFilter(), ff1);
View Full Code Here

  public void test2(TestHarness harness)
  {
    harness.checkPoint("test2");
    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    fc.addPropertyChangeListener(this);
    harness.check(fc.getFileFilter(), acceptAllFilter);
   
    fc.setFileFilter(null);
    harness.check(fc.getFileFilter(), null);
    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.getControlButtonsAreShown(), true);
   
    jfc.setControlButtonsAreShown(false);
    harness.check(jfc.getControlButtonsAreShown(), false);
    harness.check(event.getPropertyName(),
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.