Package javax.swing

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


        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

      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

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

  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

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

    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

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

    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

    driver.requireMessage(optionPane, "Le.*");
  }

  @Test
  public void should_pass_if_non_String_message_is_equal_to_expected() {
    JOptionPane optionPane = messageWithValue(new Person("Leia"));
    pack(optionPane, title());
    driver.requireMessage(optionPane, new Person("Leia"));
  }
View Full Code Here

TOP

Related Classes of javax.swing.JOptionPane

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.