Package javax.swing.filechooser

Examples of javax.swing.filechooser.FileFilter


 
  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);
    harness.check(events.size(), 2);
    PropertyChangeEvent e1 = (PropertyChangeEvent) events.get(0);
    harness.check(e1.getPropertyName(),
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);
View Full Code Here

  public void testGeneral(TestHarness harness)      
  {
    harness.checkPoint("testGeneral()");
    JFileChooser fc = new JFileChooser();
    fc.addPropertyChangeListener(this);
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    FileFilter[] filters = fc.getChoosableFileFilters();
    harness.check(filters.length, 2);
    harness.check(filters[0], fc.getAcceptAllFileFilter());
    harness.check(filters[1], f1);
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);
View Full Code Here

   */
  public void test2(TestHarness harness)
  {
    harness.checkPoint("test2");  
    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);
View Full Code Here

   */
  public void test3(TestHarness harness)
  {
    harness.checkPoint("test3");  
    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);
View Full Code Here

   */
  public void test4(TestHarness harness)
  {
    harness.checkPoint("test4");  
    JFileChooser fc = new JFileChooser();
    FileFilter acceptAllFilter = fc.getAcceptAllFileFilter();
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(acceptAllFilter);
    harness.check(removed);
    FileFilter[] filters = fc.getChoosableFileFilters();
View Full Code Here

   */
  public void test5(TestHarness harness)
  {
    harness.checkPoint("test5");  
    JFileChooser fc = new JFileChooser();
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(f1);
    harness.check(removed);
    FileFilter[] filters = fc.getChoosableFileFilters();
View Full Code Here

   */
  public void test6(TestHarness harness)
  {
    harness.checkPoint("test6");  
    JFileChooser fc = new JFileChooser();
    FileFilter f1 = new MyFileFilter(true);
    fc.addChoosableFileFilter(f1);
    fc.setAcceptAllFileFilterUsed(false);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(f1);
    harness.check(removed);
View Full Code Here

   */
  public void test7(TestHarness harness)
  {
    harness.checkPoint("test7");  
    JFileChooser fc = new JFileChooser();
    FileFilter f1 = new MyFileFilter(true);
    FileFilter f2 = new MyFileFilter(false);
    fc.addChoosableFileFilter(f1);
    fc.addChoosableFileFilter(f2);
    fc.setAcceptAllFileFilterUsed(false);
    fc.addPropertyChangeListener(this);
    boolean removed = fc.removeChoosableFileFilter(f2);
View Full Code Here

TOP

Related Classes of javax.swing.filechooser.FileFilter

Copyright © 2018 www.massapicom. 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.