Package com.eteks.sweethome3d.swing

Examples of com.eteks.sweethome3d.swing.WizardPane


    Thread.sleep(100);
    // Check choice button text changed
    assertFalse("Choice button text didn't change",
        imageChoiceOrChangeButtonText.equals(imageChoiceOrChangeButton.getText()));
    // Click on next button
    WizardPane view = (WizardPane)TestUtilities.findComponent(wizardDialog, WizardPane.class);
    // Retrieve wizard view next button
    final JButton nextFinishOptionButton = (JButton)TestUtilities.getField(view, "nextFinishOptionButton");
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
    tester.click(nextFinishOptionButton);
    // Check current step is scale
View Full Code Here


    JSpinner heightSpinner = (JSpinner)TestUtilities.getField(panel, "heightSpinner");
   
    // Check current step is image
    tester.waitForIdle();
    assertStepShowing(panel, true, false);   
    WizardPane view = (WizardPane)TestUtilities.findComponent(textureWizardDialog, WizardPane.class);
    // Check wizard view next button is disabled
    final JButton nextFinishOptionButton = (JButton)TestUtilities.getField(view, "nextFinishOptionButton");
    assertFalse("Next button is enabled", nextFinishOptionButton.isEnabled());
   
    // 4. Choose tested image
View Full Code Here

      @Override
      public void finish() {
        finished [0] = true;
      }
    };
    WizardPane view = (WizardPane)controller.getView();
    // Retrieve view back and next buttons
    final JButton backOptionButton = (JButton)TestUtilities.getField(view, "backOptionButton");
    final JButton nextFinishOptionButton = (JButton)TestUtilities.getField(view, "nextFinishOptionButton");
    String nextFinishOptionButtonText = nextFinishOptionButton.getText();
    // Check view displays first step view
    assertEquals("First step view class isn't correct",
        ControllerTest.FirstStepView.class,
        ((BorderLayout)((JPanel)view.getMessage()).getLayout()).getLayoutComponent(BorderLayout.CENTER).getClass());
    // Check back button is disabled and next button is enabled
    assertFalse("Back button isn't disabled", backOptionButton.isEnabled());
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
   
    // 2. Click on nextFinishButton
    JComponentTester tester = new JComponentTester();
    tester.invokeAndWait(new Runnable() {
        public void run() {
          nextFinishOptionButton.doClick();
        }
      });
    // Check view displays second step view
    assertEquals("Second step view class isn't correct",
        ControllerTest.SecondStepView.class,
        ((BorderLayout)((JPanel)view.getMessage()).getLayout()).getLayoutComponent(BorderLayout.CENTER).getClass());
    // Check back button is enabled and next button is disabled
    assertTrue("Back button isn't enabled", backOptionButton.isEnabled());
    assertFalse("Next button isn't disabled", nextFinishOptionButton.isEnabled());
    // Check next button text changed
    assertFalse("Next button text didn't changed",
        nextFinishOptionButton.getText().equals(nextFinishOptionButtonText));
   
    // 3. Click on backButton
    tester.invokeAndWait(new Runnable() {
        public void run() {
          backOptionButton.doClick();
        }
      });
    // Check view displays first step view
    assertEquals("First step view class isn't correct",
        ControllerTest.FirstStepView.class,
        ((BorderLayout)((JPanel)view.getMessage()).getLayout()).getLayoutComponent(BorderLayout.CENTER).getClass());
    // Check back button is disabled and next button is enabled
    assertFalse("Back button isn't disabled", backOptionButton.isEnabled());
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
    // Check next button text changed back to its first value
    assertEquals("Next button text didn't changed",
        nextFinishOptionButtonText, nextFinishOptionButton.getText());
   

    // 4. Click on nextFinishButton
    tester.invokeAndWait(new Runnable() {
        public void run() {
          nextFinishOptionButton.doClick();
        }
      });
    // Check view displays second step view
    assertEquals("Second step view class isn't correct",
        ControllerTest.SecondStepView.class,
        ((BorderLayout)((JPanel)view.getMessage()).getLayout()).getLayoutComponent(BorderLayout.CENTER).getClass());
    // Check the check box in second step view isn't selected
    final JCheckBox yesCheckBox = (JCheckBox)TestUtilities.findComponent(view, JCheckBox.class);
    assertFalse("Check box is selected", yesCheckBox.isSelected());
    // Select the check box in second step view
    tester.invokeAndWait(new Runnable() {
View Full Code Here

    Thread.sleep(1000);
    // Check choice button text changed
    assertFalse("Choice button text didn't change",
        modelChoiceOrChangeButtonText.equals(modelChoiceOrChangeButton.getText()));
    // Click on next button
    WizardPane view = (WizardPane)TestUtilities.findComponent(frame, WizardPane.class);
    // Retrieve wizard view next button
    final JButton nextFinishOptionButton = (JButton)TestUtilities.getField(view, "nextFinishOptionButton");
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());   
    tester.invokeAndWait(new Runnable() {
        public void run() {
View Full Code Here

TOP

Related Classes of com.eteks.sweethome3d.swing.WizardPane

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.