com.leafdigital.ui.api
Interface Button

All Superinterfaces:
SupportsBaseGroup, Widget

public interface Button
extends Widget, SupportsBaseGroup

Interface for buttons.


Method Summary
 void focus()
          Focuses this control.
 boolean isEnabled()
           
 void setDefault(boolean isDefault)
          If true, sets this as the default button.
 void setEnabled(boolean enabled)
          Enables/disables the button.
 void setLabel(java.lang.String text)
          Sets the button's text label.
 void setOnAction(java.lang.String callback)
          Sets the action method called when button is clicked.
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 
Methods inherited from interface com.leafdigital.ui.api.SupportsBaseGroup
setBaseGroup
 

Method Detail

setLabel

void setLabel(java.lang.String text)
Sets the button's text label.

Parameters:
text - Text for label

setOnAction

@UICallback
void setOnAction(java.lang.String callback)
Sets the action method called when button is clicked.

Parameters:
callback - Name of method
Throws:
BugException - If method doesn't exist etc.

setDefault

void setDefault(boolean isDefault)
If true, sets this as the default button.

Parameters:
isDefault - True to make this default button

setEnabled

void setEnabled(boolean enabled)
Enables/disables the button.

Parameters:
enabled - New enabled value

isEnabled

boolean isEnabled()
Returns:
True if button is enabled

focus

void focus()
Focuses this control.



Copyright © 2011 Samuel Marshall. All rights reserved.