Package java.awt

Examples of java.awt.Dialog$AccessibleAWTDialog


  private @Nonnull DialogFixture findDialog(@Nonnull ComponentMatcher matcher, @Nonnull Timeout timeout) {
    String description = "dialog to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher);
    pause(condition, timeout);
    Dialog dialog = (Dialog) condition.found();
    return new DialogFixture(robot(), checkNotNull(dialog));
  }
View Full Code Here


* @author Yvonne Wang
*/
public class DialogFixture_constructor_withRobotAndName_Test extends RobotBasedTestCase {
  @Test
  public void should_lookup_showing_dialog_by_name() {
    Dialog target = dialog().withName("dialog")
                            .withTitle(getClass().getSimpleName())
                            .createAndShow();
    DialogFixture fixture = new DialogFixture(robot, "dialog");
    assertThat(fixture.robot()).isSameAs(robot);
    assertThat(fixture.target()).isSameAs(target);
View Full Code Here

    }
  }

  @Test
  public void should_lookup_showing_dialog_by_name_using_new_Robot() {
    Dialog target = dialog().withName("dialog")
                            .withTitle(getClass().getSimpleName())
                            .createAndShow();
    fixture = new DialogFixture("dialog");
    assertThat(fixture.robot()).isNotNull();
    assertThat(fixture.target()).isSameAs(target);
View Full Code Here

    }
  }

  @Test
  public void should_create_new_Robot_and_use_given_dialog_as_target() {
    Dialog target = dialog().createNew();
    fixture = new DialogFixture(target);
    assertThat(fixture.robot()).isNotNull();
    assertThat(fixture.target()).isSameAs(target);
  }
View Full Code Here

        // TODO Auto-generated constructor stub
    }

    public Object createComponentInstance(Object parent, DomNode element)
    {
        Dialog dlg = null;
        if (parent instanceof Frame)
        {
            dlg = new Dialog((Frame) parent);
        } else
        {
            dlg = new Dialog((Dialog) parent);
        }
        handleChildren(getClient(), dlg, dlg, element);
        return dlg;
    }
View Full Code Here

     *    in which the dialog is displayed; if <code>null</code>,
     *    or if the <code>parentComponent</code> has no
     *    <code>Frame</code>, a default <code>Frame</code> is used
   */
  public static void popupException(Throwable e, Component parent) {
    Dialog dialog = null;
    boolean isModal = false;
    if((parent != null) && (parent instanceof Dialog)) {
      dialog = (Dialog)parent;
      isModal = dialog.isModal();
      dialog.setModal(false);
    }

    JOptionPane.showMessageDialog(
        parent,
        getRelevantStack(e),
        e.getClass().getName(),
        JOptionPane.ERROR_MESSAGE);

    if(isModal)
      dialog.setModal(true);

    outLogger.exception(e);
  }
View Full Code Here

        }

        DialogDescriptor dd = new DialogDescriptor(configuror,
            ConfigurePanel.DIALOG_TITLE);
       
        Dialog dialog = TopManager.getDefault().createDialog(dd);
        dialog.show();
       
        if (dd.getValue() == DialogDescriptor.OK_OPTION) {
            try {
                ParcelDescriptor descriptor = configuror.getConfiguration();
                descriptor.write();
View Full Code Here

     * @return java.awt.Dialog
     */
    private Dialog getAboutDialog() {
        if (iAboutDialog == null) {
            try {
                iAboutDialog = new Dialog(this);
                iAboutDialog.setName("AboutDialog");
                iAboutDialog.setResizable(false);
                iAboutDialog.setLayout(new java.awt.BorderLayout());
                iAboutDialog.setBounds(550, 14, 383, 142);
                iAboutDialog.setModal(true);
View Full Code Here

     * @return java.awt.Dialog
     */
    private Dialog getAboutDialog() {
        if (iAboutDialog == null) {
            try {
                iAboutDialog = new Dialog(this);
                iAboutDialog.setName("AboutDialog");
                iAboutDialog.setResizable(false);
                iAboutDialog.setLayout(new java.awt.BorderLayout());
                iAboutDialog.setBounds(550, 14, 383, 142);
                iAboutDialog.setModal(true);
View Full Code Here

        showCustomizer ( preselectedCategory, null );
    }
   
    public void showCustomizer( String preselectedCategory, String preselectedSubCategory ) {
       
        Dialog dialog = (Dialog)project2Dialog.get (project);
        if ( dialog != null ) {           
            dialog.setVisible(true);
            return;
        }
        else {
            J2SEProjectProperties uiProperties = new J2SEProjectProperties( (J2SEProject)project, updateHelper, evaluator, refHelper, genFileHelper );
            Lookup context = Lookups.fixed(new Object[] {
                project,
                uiProperties,
                new SubCategoryProvider(preselectedCategory, preselectedSubCategory)
            });

            OptionListener listener = new OptionListener( project, uiProperties );
            dialog = ProjectCustomizer.createCustomizerDialog( CUSTOMIZER_FOLDER_PATH, context, preselectedCategory, listener, null );
            dialog.addWindowListener( listener );
            dialog.setTitle( MessageFormat.format(                
                    NbBundle.getMessage( CustomizerProviderImpl.class, "LBL_Customizer_Title" ), // NOI18N
                    new Object[] { ProjectUtils.getInformation(project).getDisplayName() } ) );

            project2Dialog.put(project, dialog);
            dialog.setVisible(true);
        }
    }   
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.