Package javax.swing

Examples of javax.swing.JList$AccessibleJList


  }

  @Test
  public void should_try_to_find_drop_down_list_until_it_is_found() {
    showDropDownListWithDelay();
    JList list = finder.findDropDownList();
    assertThat(list).isNotNull();
    assertThatListContains(list, "first", "second", "third");
  }
View Full Code Here


    });
  }

  @Test
  public void should_return_null_if_drop_down_was_not_found() {
    JList list = finder.findDropDownList();
    assertThat(list).isNull();
  }
View Full Code Here

  }

  @Test
  public void should_return_null_if_active_drop_down_does_not_belong_to_JComboBox() {
    robot.rightClick(window.textField);
    JList list = finder.findDropDownList();
    assertThat(list).isNull();
  }
View Full Code Here

public class JComboBoxDriver_dropDownList_Test extends JComboBoxDriver_TestCase {
  @Test
  public void should_return_drop_down_list() {
    showWindow();
    driver.click(comboBox);
    JList dropDownList = driver.dropDownList();
    assertThat(contentsOf(dropDownList)).isEqualTo(array("first", "second", "third"));
  }
View Full Code Here

  @Override
  void beforeShowingWindow() {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        list = new JList(array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight"));
        scrollPane = new JScrollPane(list);
        scrollPane.setPreferredSize(new Dimension(300, 100));
        window().add(scrollPane);
      }
    });
View Full Code Here

      });
    }

    private MyWindow(int orientation, Class<?> testClass) {
      super(testClass);
      splitPane = new JSplitPane(orientation, new JList(), new JList());
      splitPane.setDividerLocation(150);
      splitPane.setPreferredSize(new Dimension(300, 300));
      add(splitPane);
    }
View Full Code Here

    @RunsInEDT
    public JList createNew() {
      return execute(new GuiQuery<JList>() {
        @Override
        protected JList executeInEDT() {
          JList list = new JList();
          if (!isNullOrEmpty(items)) {
            list.setModel(modelWith(items));
          }
          list.setName(name);
          if (selectedIndices != null) {
            list.setSelectedIndices(selectedIndices);
          }
          list.setSelectionMode(selectionMode);
          return list;
        }
      });
    }
View Full Code Here

    final JScrollPane scrollPane = new JScrollPane();

    private MyWindow() {
      super(JScrollPaneFixture_constructor_withRobotAndName_Test.class);
      JList view = new JList(array("One", "Two", "Three"));
      view.setPreferredSize(new Dimension(100, 50));
      scrollPane.setName("scrollPane");
      scrollPane.setViewportView(view);
      addComponents(scrollPane);
    }
View Full Code Here

      splitPane.setRightComponent(list("Three"));
      addComponents(splitPane);
    }

    private static JList list(@Nonnull Object... elements) {
      JList list = new JList(elements);
      list.setPreferredSize(new Dimension(100, 50));
      return list;
    }
View Full Code Here

      });
    }

    private MyWindow() {
      super(JSplitPaneSetDividerLocationTask_setDividerLocation_Test.class);
      splitPane = new JSplitPane(VERTICAL_SPLIT, new JList(), new JList());
      splitPane.setDividerLocation(150);
      splitPane.setPreferredSize(new Dimension(300, 300));
      add(splitPane);
    }
View Full Code Here

TOP

Related Classes of javax.swing.JList$AccessibleJList

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.