public class Panel extends AbstractUIComponent
This class offers a set of "getXxx" methods for retrieving the different kinds of UIComponent instances laid out in a GUI panel.
It also provides a set of generic find/get methods, with the following naming logic:
getPanel(String)
method only components of type JPanel JInternalFrame, etc. will be
considered.Modifier and Type | Field and Description |
---|---|
static Class[] |
SWING_CLASSES |
static String |
TYPE_NAME |
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey
public static final String TYPE_NAME
public static final Class[] SWING_CLASSES
public Panel(Container container)
public String getDescriptionTypeName()
UIComponent
UIComponent.getDescription()
.public Container getAwtComponent()
UIComponent
public Container getAwtContainer()
public Button getButton(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Button getButton() throws ItemNotFoundException, ComponentAmbiguityException
public Button getButton(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public ToggleButton getToggleButton(String name) throws ItemNotFoundException, ComponentAmbiguityException
public ToggleButton getToggleButton() throws ItemNotFoundException, ComponentAmbiguityException
public ToggleButton getToggleButton(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public CheckBox getCheckBox(String name) throws ItemNotFoundException, ComponentAmbiguityException
public CheckBox getCheckBox() throws ItemNotFoundException, ComponentAmbiguityException
public CheckBox getCheckBox(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public Panel getPanel() throws ItemNotFoundException, ComponentAmbiguityException
public Panel getPanel(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Panel getPanel(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public ProgressBar getProgressBar(String name) throws ItemNotFoundException, ComponentAmbiguityException
public ProgressBar getProgressBar() throws ItemNotFoundException, ComponentAmbiguityException
public ProgressBar getProgressBar(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public Desktop getDesktop(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Desktop getDesktop() throws ItemNotFoundException, ComponentAmbiguityException
public Desktop getDesktop(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public TextBox getTextBox(String name) throws ItemNotFoundException, ComponentAmbiguityException
public TextBox getTextBox() throws ItemNotFoundException, ComponentAmbiguityException
public TextBox getTextBox(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public TextBox getInputTextBox(String name) throws ComponentAmbiguityException, ItemNotFoundException
"Input text boxes" are defined as subclasses of the JTextComponent class - in other words, JLabel components are excluded from the search. Please note that the is is not necessarily visible from the user, since JTextComponent subclasses can be customized to look as ordinary, read-only labels.
public TextBox getInputTextBox() throws ComponentAmbiguityException, ItemNotFoundException
ComponentAmbiguityException
ItemNotFoundException
getInputTextBox(String)
public TabGroup getTabGroup(String name) throws ItemNotFoundException, ComponentAmbiguityException
public TabGroup getTabGroup() throws ItemNotFoundException, ComponentAmbiguityException
public TabGroup getTabGroup(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public ComboBox getComboBox(String name) throws ItemNotFoundException, ComponentAmbiguityException
public ComboBox getComboBox() throws ItemNotFoundException, ComponentAmbiguityException
public ComboBox getComboBox(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public Spinner getSpinner() throws ItemNotFoundException, ComponentAmbiguityException
public Spinner getSpinner(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Spinner getSpinner(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public DateSpinner getDateSpinner() throws ItemNotFoundException, ComponentAmbiguityException
public DateSpinner getDateSpinner(String componentName)
public DateSpinner getDateSpinner(ComponentMatcher matcher)
public ListSpinner getListSpinner() throws ItemNotFoundException, ComponentAmbiguityException
public ListSpinner getListSpinner(String componentName)
public ListSpinner getListSpinner(ComponentMatcher matcher)
public NumberSpinner getNumberSpinner() throws ItemNotFoundException, ComponentAmbiguityException
public NumberSpinner getNumberSpinner(String componentName)
public NumberSpinner getNumberSpinner(ComponentMatcher matcher)
public Slider getSlider() throws ItemNotFoundException, ComponentAmbiguityException
public Slider getSlider(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Slider getSlider(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public Table getTable(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Table getTable() throws ItemNotFoundException, ComponentAmbiguityException
public Table getTable(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public Tree getTree(String name) throws ItemNotFoundException, ComponentAmbiguityException
public Tree getTree() throws ItemNotFoundException, ComponentAmbiguityException
public Tree getTree(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public RadioButton getRadioButton(String name) throws ItemNotFoundException, ComponentAmbiguityException
public RadioButton getRadioButton() throws ItemNotFoundException, ComponentAmbiguityException
public RadioButton getRadioButton(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public ListBox getListBox(String name) throws ItemNotFoundException, ComponentAmbiguityException
public ListBox getListBox() throws ItemNotFoundException, ComponentAmbiguityException
public ListBox getListBox(ComponentMatcher matcher) throws ItemNotFoundException, ComponentAmbiguityException
public PasswordField getPasswordField() throws ItemNotFoundException, ComponentAmbiguityException
public PasswordField getPasswordField(ComponentMatcher matcher)
public PasswordField getPasswordField(String componentName)
public UIComponent[] getUIComponents(Class uiComponentClass)
public UIComponent[] getUIComponents(Class uiComponentClass, String name)
public UIComponent[] getUIComponents(ComponentMatcher matcher)
public <T extends UIComponent> T findUIComponent(Class<T> uiComponentClass) throws ComponentAmbiguityException
ComponentAmbiguityException
public <T extends UIComponent> T findUIComponent(Class<T> uiComponentClass, String name) throws ComponentAmbiguityException
ComponentAmbiguityException
public UIComponent findUIComponent(ComponentMatcher matcher) throws ComponentAmbiguityException
ComponentAmbiguityException
public Component[] getSwingComponents(ComponentMatcher matcher)
public <T extends Component> T findSwingComponent(Class<T> swingComponentClass) throws ComponentAmbiguityException
ComponentAmbiguityException
public <T extends Component> T findSwingComponent(Class<T> swingComponentClass, String componentName) throws ComponentAmbiguityException
ComponentAmbiguityException
public Component findSwingComponent(ComponentMatcher matcher) throws ComponentAmbiguityException
ComponentAmbiguityException
public <T extends UIComponent> Assertion containsUIComponent(Class<T> uicomponentClass)
public <T extends Component> Assertion containsSwingComponent(Class<T> swingComponentClass)
public <T extends UIComponent> Assertion containsUIComponent(Class<T> uiComponentClass, String name)
public <T extends Component> Assertion containsSwingComponent(Class<T> swingComponentClass, String name)
public Assertion containsComponent(ComponentMatcher matcher)
Copyright © 2004–2016. All rights reserved.