Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
mlabuda edited this page Feb 14, 2014 · 9 revisions

API / Abstract

  • Button / AbstractButton

Implementation(s)

  • PushButton
  • CheckBox
  • RadioButton
  • ToggleButton

Usage

PushButton

Look up a push button with text "Apply"

Button pushButton = new PushButton("Apply");

Click a button

pushButton.click(); 

Short notation

new PushButton("Apply").click();

CheckBox

Look up a check box with text "Confirm"

CheckBox checkBox = new CheckBox("Confirm");

Check if check box is checked

boolean isChecked = checkBox.isChecked(); 

Set check box to checked

checkBox.toggle(true);

RadioButton

Look up a radio button with text "Radio1"

RadioButton radioButton = new RadioButton("Radio1");

Check if radio button is selected

boolean isSelected = radioButton.isSelected();

Select radio button

radioButton.toggle(true);

ToggleButton

Look up a toggle button with text "ToggleButton"

Button toggleButton = new ToggleButton("ToggleButton");

Check if toggle button is checked

boolean isChecked = toggleButton.isSelected();

Check toggle button

togggleButton.toggle(true);

Predefined buttons

There are also some predefined basic eclipse buttons. Whole list of predefined buttons:

  • BackButton
  • CancelButton
  • FinishButton
  • NextButton
  • NoButton
  • OkButton
  • YesButton
Clone this wiki locally