Examples of Dialog


Examples of com.tll.client.ui.Dialog

      final SimplePanel p = new SimplePanel();
      p.setWidth("300px");
      p.setHeight("300px");
      p.add(btnHide);

      dlg = new Dialog(btnShow, showOverlay);
      dlg.setText("A Dialog");
      dlg.setWidget(p);
    }
View Full Code Here

Examples of gwtquery.plugins.ui.widgets.Dialog

        tab_counter++;
      }
    };

    // modal dialog init: custom buttons and a "close" callback reseting the form inside
    final Dialog dialog = $("#dialog").as(Ui).dialog(Dialog.Options.create().autoOpen(false).modal(true)//
    .buttons(Buttons.create() //
    .define("Add", new Function() {
      public boolean f(Event e) {
        addTab.f((Element) null);
        $("#dialog").as(Ui).dialog().close();
        return false;
      }
    }) //
    .define("Cancel", new Function() {
      public boolean f(Event e) {
        $("#dialog").as(Ui).dialog().close();
        return false;
      }
    })));

    dialog.bind(Dialog.Event.open, new Function() {
      public void f(Element e) {
        tab_title_input.focus();
      };
    })//
    .bind(Dialog.Event.close, new Function() {
      public void f(Element e) {
        FormElement form = $("form", dialog.elements()[0]).elements()[0].cast();
        form.reset();
      };
    });

    // addTab button: just opens the dialog
    $("#add_tab").as(Ui).button().click(new Function() {
      public boolean f(Event e) {
        dialog.open();
        return false;
      };
    });

  }
View Full Code Here

Examples of java.awt.Dialog

   */
  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

Examples of java.awt.Dialog

    }
   
  }

  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

Examples of java.awt.Dialog

        } 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

Examples of java.awt.Dialog

    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

Examples of java.awt.Dialog

        } 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

Examples of java.awt.Dialog

      });
    // 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

Examples of java.awt.Dialog

        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

Examples of java.awt.Dialog

                                }
                            }
                        });
                        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
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.