Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicFileChooserUI.installUI()


  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    fc.setDialogType(JFileChooser.OPEN_DIALOG);
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    ui.installUI(fc);
    harness.check(ui.getApproveButtonMnemonic(fc), 79);
    fc.setDialogType(JFileChooser.SAVE_DIALOG);
    harness.check(ui.getApproveButtonMnemonic(fc), 83);
    fc.setApproveButtonMnemonic(99);   
    harness.check(ui.getApproveButtonMnemonic(fc), 99);
View Full Code Here


  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    fc.setDialogType(JFileChooser.OPEN_DIALOG);
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    ui.installUI(fc);
    harness.check(ui.getApproveButtonToolTipText(fc), "Open selected file");
    fc.setDialogType(JFileChooser.SAVE_DIALOG);
    harness.check(ui.getApproveButtonToolTipText(fc), "Save selected file");
    fc.setApproveButtonToolTipText("Hello World!");   
    harness.check(ui.getApproveButtonToolTipText(fc), "Hello World!");
View Full Code Here

  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    harness.check(ui.getDialogTitle(fc), null);
    ui.installUI(fc);
    harness.check(ui.getDialogTitle(fc), "Open");
    fc.setDialogType(JFileChooser.SAVE_DIALOG);
    harness.check(ui.getDialogTitle(fc), "Save");
    fc.setDialogTitle("XYZ");
    harness.check(ui.getDialogTitle(fc), "XYZ");
View Full Code Here

  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    fc.setDialogType(JFileChooser.OPEN_DIALOG);
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    ui.installUI(fc);
    harness.check(ui.getApproveButtonText(fc), "Open");
    fc.setDialogType(JFileChooser.SAVE_DIALOG);
    harness.check(ui.getApproveButtonText(fc), "Save");
    fc.setApproveButtonText("Hello World!");   
    harness.check(ui.getApproveButtonText(fc), "Hello World!");
View Full Code Here

  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    harness.check(ui.getDirectoryName(), null);
    ui.installUI(fc);
    harness.check(ui.getDirectoryName(), null);
    ui.setDirectoryName("XYZ");
    harness.check(ui.getDirectoryName(), null);
    fc.setCurrentDirectory(new File("ABC"));
    harness.check(ui.getDirectoryName(), null);
View Full Code Here

  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    harness.check(ui.getFileView(fc) != null);
    ui.installUI(fc);
    FileView fv = ui.getFileView(fc);
    harness.check(fv != null);
   
    // the file chooser setting is ignored
    FileView myFV = new FileView() {};
View Full Code Here

  public void test(TestHarness harness)
  {
    JFileChooser fc = new JFileChooser();
    BasicFileChooserUI ui = new BasicFileChooserUI(fc);
    harness.check(ui.getFileName(), null);
    ui.installUI(fc);
    harness.check(ui.getFileName(), null);
    ui.setFileName("XYZ");
    harness.check(ui.getFileName(), null);
    fc.setCurrentDirectory(new File("ABC"));
    harness.check(ui.getFileName(), null);
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.