The NavigationButton class implements a control that is intended for use in navigation menu -style user interfaces. A navigation button is typically used to let users move between views.
[NavigationButton] new NavigationButton(String id, String image, String text)
Creates a new instance of the NavigationButton class.
id
Unique identifier for the control. Can be retrieved using the id property defined in the UIElement class that this control inherits from. Useful for example to identify the source of an event in event callback functions or to apply a CSS rule to only this particular control. The identifier can be null, in which case no id will be set for the control.
image
Icon image that is displayed on the face of the button. No size is enforced but the image should be about 30x30 pixels. PNG images with transparency are recommended. If null is passed for the image then no image will be displayed.
text
Text that is displayed on the face of the button. Typically this should be the view that the widget navigates to when the button is pressed. The value is an XHTML string.
A new instance of the NavigationButton class.
[String] NavigationButton.getText(void)
Retrieves the current text of the button. The value is an XHTML string.
This method does not take any arguments.
The current text of the button.
[void] NavigationButton.setText(String text)
Sets the text of the button. The text is displayed on the face of the button and typically should indicate where the widget navigates when the button is pressed. The value is an XHTML string.
text
The text to be displayed on the face of the button. Passing null results in no text.
This method does not return a value.
[String] NavigationButton.getImage(void)
Retrieves the icon image URL of the button.
This method does not take any arguments.
The icon image URL of the button or null if none.
[void] NavigationButton.setImage(String image)
Sets the icon image URL for the button. Passing null to this method hides the icon image.
image
The URL of the icon image to display on the button or null for no image.
This method does not return a value.