Package javax.swing.plaf.metal

Examples of javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    MetalFileChooserUI ui = new MetalFileChooserUI(fc);
    harness.check(ui.getFileName(), null);
    ui.installUI(fc);
    harness.check(ui.getFileName(), "");
    ui.setFileName("XYZ");
    harness.check(ui.getFileName(), "XYZ");
    ui.setFileName(null);
    harness.check(ui.getFileName(), "");
  }
View Full Code Here


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    MetalFileChooserUI ui = new MetalFileChooserUI(fc);
    harness.check(ui.getFileName(), null);
    ui.installUI(fc);
    harness.check(ui.getFileName(), "");
    ui.setFileName("XYZ");
    harness.check(ui.getFileName(), "XYZ");
    fc.setCurrentDirectory(new File("ABC"));
    harness.check(ui.getFileName(), "XYZ");
  }
View Full Code Here

    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
    JFileChooser fc = new JFileChooser();
    MetalFileChooserUI ui = new MetalFileChooserUI(fc);
   
    // check that the method returns a new instance every time?
    Dimension d1 = ui.getPreferredSize(fc);
    Dimension d2 = ui.getPreferredSize(fc);
    harness.check(d1 != d2);
   
    // does the method look at the filechooser passed in?
    boolean pass = false;
    try
    {
      /*Dimension d3 =*/ ui.getPreferredSize(null);   
    }
    catch (NullPointerException e)
    {
      pass = true;
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel

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.