Examples of JOptionPane


Examples of javax.swing.JOptionPane

          DefaultMutableTreeNode dmtn_ref=createIfNeed(ref, dmtn_ip);
          Integer lL = this.getLogLvl(connString);
          ht_logLvl.put(dmtn_ref, lL);
          // ask for old log management choice :
          if (oldLogChoice==OLDLOG_THIS_TIME | oldLogChoice==OLDLOG_NOT_THIS_TIME) {
            JOptionPane jop = new JOptionPane("Do you want old log from gateway :\n"+jmxsurl+" ?", JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, new String[] {OLDLOG_THIS_TIME, OLDLOG_NOT_THIS_TIME, OLDLOG_ALWAYS, OLDLOG_NEVER}, OLDLOG_THIS_TIME);
            JDialog dialog = jop.createDialog(jp, "Old log management");
      //dialog.setModal(true);
      dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
      dialog.show();
      oldLogChoice = (String) jop.getValue();
      if (oldLogChoice==JOptionPane.UNINITIALIZED_VALUE) {
              oldLogChoice=OLDLOG_THIS_TIME; // *1)
      }
    }
          if (oldLogChoice==OLDLOG_THIS_TIME | oldLogChoice==OLDLOG_ALWAYS) {
View Full Code Here

Examples of javax.swing.JOptionPane

     
//      ggPosCombo.removeAllItems();
//      // XXX sync
//      ggPosCombo.addItem( new StringItem( new Param( doc.timeline.getPosition() / doc.timeline.getRate(), ParamSpace.TIME | ParamSpace.SECS | ParamSpace.HHMMSS ).toString(), "Current" ));

      final JOptionPane op = new JOptionPane( msgPane, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION );
//      result = JOptionPane.showOptionDialog( BasicWindowHandler.getWindowAncestor( lbTime ), msgPane,
//        app.getResourceString( "inputDlgGoToTime" ),
//        JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null );
      result = BasicWindowHandler.showDialog( op, BasicWindowHandler.getWindowAncestor( lbTime ), app.getResourceString( "inputDlgGoToTime" ));
     
View Full Code Here

Examples of javax.swing.JOptionPane

        consc.edit.cancel();
      }
      if( proc.getReturnCode() == FAILED ) {
        final Object message = proc.getClientArg( "error" );
        if( message != null ) {
          final JOptionPane op = new JOptionPane( message, JOptionPane.ERROR_MESSAGE );
//          JOptionPane.showMessageDialog( getWindow(), message, plugIn == null ? null : plugIn.getName(), JOptionPane.ERROR_MESSAGE );
          BasicWindowHandler.showDialog( op, getWindow(), plugIn == null ? null : plugIn.getName() );
        }
      }
    }
View Full Code Here

Examples of javax.swing.JOptionPane

      final String btnString1 = "Enter";
      final String btnString2 = "Cancel";
      Object[] options = {btnString1, btnString2};

      optionPane = new JOptionPane(array,
                                   JOptionPane.QUESTION_MESSAGE,
                                   JOptionPane.YES_NO_OPTION,
                                   null,
                                   options,
                                   options[0]);
View Full Code Here

Examples of javax.swing.JOptionPane

public class FEST250_findJOptionPaneWithNullParent extends EDTSafeTestCase {
  private Robot robot;

  @Before
  public void setUp() {
    JOptionPane optionPane = execute(new GuiQuery<JOptionPane>() {
      @Override
      protected JOptionPane executeInEDT() {
        return new JOptionPane("Hello World!");
      }
    });
    JOptionPaneLauncher.launch(optionPane);
    robot = BasicRobot.robotWithCurrentAwtHierarchy();
  }
View Full Code Here

Examples of javax.swing.JOptionPane

  public @Nonnull JOptionPaneFixture optionPane(@Nonnull Timeout timeout) {
    TypeMatcher matcher = new TypeMatcher(JOptionPane.class, requireShowing());
    String description = "option pane to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher);
    pause(condition, timeout);
    JOptionPane optionPane = (JOptionPane) condition.found();
    return new JOptionPaneFixture(robot(), checkNotNull(optionPane));
  }
View Full Code Here

Examples of javax.swing.JOptionPane

* @author Alex Ruiz
*/
public class JOptionPaneDriver_requireTitleAsPattern_Test extends JOptionPaneDriver_TestCase {
  @Test
  public void should_pass_if_title_matches_pattern() {
    JOptionPane optionPane = informationMessage();
    pack(optionPane, title());
    driver.requireTitle(optionPane, Pattern.compile("JOptionP.*"));
  }
View Full Code Here

Examples of javax.swing.JOptionPane

    driver.requireTitle(optionPane, Pattern.compile("JOptionP.*"));
  }

  @Test
  public void should_fail_if_title_does_not_match_pattern() {
    JOptionPane optionPane = informationMessage();
    pack(optionPane, title());
    try {
      driver.requireTitle(optionPane, Pattern.compile("Yoda"));
      failWhenExpectingException();
    } catch (AssertionError e) {
View Full Code Here

Examples of javax.swing.JOptionPane

* @author Alex Ruiz
*/
public class JOptionPaneDriver_requireMessage_Test extends JOptionPaneDriver_TestCase {
  @Test
  public void should_pass_if_message_is_equal_to_expected() {
    JOptionPane optionPane = messageWithValue("Leia");
    pack(optionPane, title());
    driver.requireMessage(optionPane, "Leia");
  }
View Full Code Here

Examples of javax.swing.JOptionPane

    driver.requireMessage(optionPane, "Leia");
  }

  @Test
  public void should_pass_if_message_matches_pattern() {
    JOptionPane optionPane = messageWithValue("Leia");
    pack(optionPane, title());
    driver.requireMessage(optionPane, "Le.*");
  }
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.