The eSWT Button
class
can be used to produce different button types
Figure: CHECK and RADIO style Buttons
Button widget supports the following button types (style parameter in parentheses):
check box (CHECK
)
radio button (RADIO
)
toggle switch (TOGGLE
)
push button (PUSH
)
To check the selection status of check boxes and radio buttons, use
the getSelection()
method. To catch all selections, use SelectionListener
.
Push buttons can be compared to Command
s
because their selection activates the operation immediately. Use SelectionListener
s
to catch a selection of a push button.
Toggle buttons have no special behavior.
For examples of check boxes and radio buttons, see Button
, Slider
Canvas
demo
in the eSWT Showcase.
For an example of push buttons, see Dialog
s demo
in the eSWT Showcase.