Package java.awt

Examples of java.awt.Dialog$AccessibleAWTDialog


   */
  public static Window getLastModalChildOf(Window parent) {
    Window[] children = parent.getOwnedWindows();
    for (Window child : children) {
      if (child instanceof Dialog) {
        Dialog dlg = (Dialog) child;
        if (dlg.isVisible() && dlg.isModal()) {
          return getLastModalChildOf(dlg);
        }
      }
    }

View Full Code Here


    }
   
  }

  public void testPlaceDialog() {
    Dialog d = new JDialog();
    d.setSize(50, 50);
    Container c = new JWindow();
    c.setBounds(100, 200, 100, 50);
   
    Util.placeDialog(d, c);
    assertEquals(125, d.getX());
    assertEquals(200, d.getY());
   
    // Test upper left corner
    c.setBounds(0,0,100,100);
    d.setSize(200, 200);
   
    Util.placeDialog(d, c);
    assertEquals(0, d.getX());
    assertEquals(0, d.getY());
  }
View Full Code Here

        } else {
            if (!parent.isVisible()) {
                parent.setVisible(true);
            }
            parent.toFront();
            pbar = new Dialog(parent, title);
        }

        if (parent != null) {
            parent.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
View Full Code Here

    public Option dialogPrompt(Component parent, String title) {
        java.awt.Frame f = parent == null ? null : (parent instanceof Frame ? (Frame) parent : UIUtil.getFrameAncestor(parent));
        if (f == null) {
            f = UIUtil.getSharedFrame();
        }
        dialog = new Dialog(f, title, true);
        dialog.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent evt) {
                dialog.dispose();
            }
        });
View Full Code Here

        } else {
            if (!parent.isVisible()) {
                parent.setVisible(true);
            }
            parent.toFront();
            pbar = new Dialog(parent, title);
        }

        if (parent != null) {
            parent.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
View Full Code Here

      });
    // Wait for print to PDF file chooser to be shown
    tester.waitForFrameShowing(new AWTHierarchy(), preferences.getLocalizedString(
        HomePane.class, "printToPDFDialog.title"));
    // Check dialog box is displayed
    final Dialog printToPdfDialog = (Dialog)new BasicFinder().find(frame,
        new ClassMatcher (Dialog.class, true));
    assertTrue("Print to pdf dialog not showing", printToPdfDialog.isShowing());
    // Change file in print to PDF file chooser
    final JFileChooserTester fileChooserTester = new JFileChooserTester();
    final JFileChooser fileChooser = (JFileChooser)new BasicFinder().find(printToPdfDialog,
        new ClassMatcher(JFileChooser.class));
    fileChooserTester.actionSetDirectory(fileChooser, System.getProperty("user.dir"));
    fileChooserTester.actionSetFilename(fileChooser, pdfFileBase);
    // Select Ok option to hide dialog box
    fileChooserTester.actionApprove(fileChooser);
    // Wait PDF generation 
    Thread.sleep(2000);
    assertFalse("Print to pdf dialog still showing", printToPdfDialog.isShowing());
    assertTrue("PDF file doesn't exist", pdfFile.exists());
    assertTrue("PDF file is empty", pdfFile.length() > 0);
    pdfFile.delete();
  }
View Full Code Here

        step1.setWizardDescriptor(wizardDescriptor);
        step2.setWizardDescriptor(wizardDescriptor);
        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
        wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
        wizardDescriptor.setTitle(getName());
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
        dialog.setVisible(true);
        dialog.toFront();
        boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
        if (!cancelled) {
            //General parameters:
            File file = (File) wizardDescriptor.getProperty("file");
            Character separator = (Character) wizardDescriptor.getProperty("separator");
View Full Code Here

                                }
                            }
                        });
                        dd.setOptions(new Object[]{okButton, DialogDescriptor.CANCEL_OPTION});
                        dd.setClosingOptions(null);//All options close
                        Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
                        dialog.addWindowListener(new WindowAdapter() {

                            @Override
                            public void windowClosing(WindowEvent e) {
                                ui.unSetup();
                            }
                        });
                        dialog.setVisible(true);
                    } else {
                        executeManipulatorInOtherThread(m);
                    }
                }
            });
View Full Code Here

                                }
                            }
                        });
                        dd.setOptions(new Object[]{okButton, DialogDescriptor.CANCEL_OPTION});
                        dd.setClosingOptions(null);//All options close
                        Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
                        dialog.addWindowListener(new WindowAdapter() {

                            @Override
                            public void windowClosing(WindowEvent e) {
                                ui.unSetup();
                            }
                        });
                        dialog.setVisible(true);
                    } else {
                        executeAttributeColumnsManipulatorInOtherThread(m, table, column);
                    }
                }
            });
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        SpigotWizardIterator wizardIterator = new SpigotWizardIterator();
        WizardDescriptor wizardDescriptor = new WizardDescriptor(wizardIterator);
        wizardDescriptor.setTitleFormat(new MessageFormat("{0} ({1})"));
        wizardDescriptor.setTitle(NbBundle.getMessage(getClass(), "ImportSpigot.wizard.title"));
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
        dialog.setVisible(true);
        dialog.toFront();

        boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
        if (!cancelled) {
            ImporterWizardUI wizardUI = wizardIterator.getCurrentWizardUI();
View Full Code Here

TOP

Related Classes of java.awt.Dialog$AccessibleAWTDialog

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.