Package java.awt

Examples of java.awt.Dialog$AccessibleAWTDialog


    /*
     * Class under test for void JDialog(Dialog, boolean)
     */
    public void testJDialogDialogboolean() {
        Dialog owner = new Dialog(new Frame());
        // test with corrent owner, modal == false
        dialog = new JDialog(owner, false);
        // title == null, isModal() == false
        checkDialogCorrectness(dialog, null, false);
        assertTrue("owner is set", dialog.getOwner() == owner);
View Full Code Here


    /*
     * Class under test for void JDialog(Dialog)
     */
    public void testJDialogDialog() {
        Dialog owner = new Dialog(new Frame());
        // test with corrent owner
        dialog = new JDialog(owner);
        // title == null, isModal() == false
        checkDialogCorrectness(dialog, null, false);
        assertTrue("owner is set", dialog.getOwner() == owner);
View Full Code Here

  /**
   * Closes the dialog.
   */
  protected void closeDialog() {
    if (m_FileChooser instanceof Container) {
      Dialog dlg = PropertyDialog.getParentDialog((Container) m_FileChooser);
      if (dlg != null)
  dlg.setVisible(false);
    }
  }
View Full Code Here

   *
   * @param c    the container to start with
   * @return    the parent dialog if one exists or null if not
   */
  public static Dialog getParentDialog(Container c) {
    Dialog  result;
    Container  parent;

    result = null;

    parent = c;
View Full Code Here

    {
        EvolutionMonitor<String> monitor = new EvolutionMonitor<String>();
        monitor.showInDialog(null, "MonitorDialog", false);
        robot.waitForIdle();
        // There ought to be a visible dialog containing the evolution monitor.
        Dialog dialog = robot.finder().find(DialogMatcher.withTitle("MonitorDialog").andShowing());
        assert monitor.getGUIComponent().isShowing() : "Evolution monitor should be showing.";
        DialogFixture dialogFixture = new DialogFixture(robot, dialog);
        dialogFixture.close();
        robot.waitForIdle();
        assert !monitor.getGUIComponent().isShowing() : "Evolution monitor should not be showing.";
View Full Code Here

    public void performAction() {
        WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
        wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
        wizardDescriptor.setTitle("Your wizard dialog title here");
        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
        dialog.setVisible(true);
        dialog.toFront();
        boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
        if (!cancelled) {
            // do something
        }
    }
View Full Code Here

                FileObject destinationFolder = primaryFile.getParent();

                wizardDescriptor.putProperty("ARCHIVE_OPTIONS_ARCHIVE_NAME", archiveName);
                wizardDescriptor.putProperty("ARCHIVE_OPTIONS_ARCHIVE_DESTINATION", destinationFolder);

                Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
                dialog.setVisible(true);
                dialog.toFront();
                boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
                if (!cancelled) {
                    // do something
                    try {
                        //First get the archive name. (ArchiveName + ext)
View Full Code Here

        frame2.setBounds(150, 0, 100, 100);
        frame2.setVisible(true);
        Util.waitForIdle(null);

        Frame frame3 = new Frame("frame 3");
        final Dialog dialog = new Dialog(frame3, "dialog", true);
        dialog.setBounds(300, 0, 100, 100);
        EventQueue.invokeLater(new Runnable() {
                public void run() {
                    dialog.setVisible(true);
                }
            });
        try {
            EventQueue.invokeAndWait(new Runnable() { public void run() {} });
            Util.waitForIdle(null);
            EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        dialog.dispose();
                    }
                });
        }
        catch (InterruptedException ie) {
            throw new RuntimeException(ie);
View Full Code Here

            }
        });
        chooseFileNativeButton = new JButton("Open\u2026");
        chooseFileNativeButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Dialog dialog = new FileDialog(
                        getParentFrame(), "Open File (Native)");
                dialog.setResizable(true);
                dialog.setVisible(true);
            }
        });
        chooseFileSwingButton = new JButton("Open\u2026");
        chooseFileSwingButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

    @Test
    public void testShouldIgnoreOnRecordingArtifacts() {
        JFrame frame = new JFrame();
        assertTrue(!WindowMonitor.getInstance().shouldIgnore(frame));
        Dialog recordingArtifact = new MockRecordingArtifactWindow("Recording Artifact");
        assertTrue(WindowMonitor.getInstance().shouldIgnore(recordingArtifact));
        Window recordingArtifactChild = new MockWindow("child of recording artifact", recordingArtifact);
        assertTrue(WindowMonitor.getInstance().shouldIgnore(recordingArtifactChild));
    }
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.