Button
relu91 edited this page May 14, 2014
·
1 revision
The Button control displays a simple Button which can be clicked by the user. Button creation is dynamically possible from Java with the ButtonBuilder class as well as from XML using Niftys Standard <control></control> Tag.
The following table describes all Button parameters.
Name | Datatype | Default | Description |
label | String | "" | The button label text. |
The Button supports EventBus notification for any action that activates the Button (Mouse click or Keyboard Activation). In that case a ButtonClickedEvent is published using the id of the Button as the Topic for the Event. Please Note that the ButtonClickedEvent is just an empty class. If you receive it then the button has been activated.
// Using the builder pattern
control(new ButtonBuilder("appendButton", "Append"));
<!-- simple button. please note: event notification requires an id -->
<control id="appendButton" name="button" label="Append" />