Java 3D Sidebar
 All Classes Namespaces Functions Variables
OnSidebarActionListener Interface Reference

Interface definition for a callback when an action happens in a widget. More...

Public Member Functions

void onSidebarAction (Widget widget, int action, Bundle extras)
 Called when action was triggered from a widget. More...
 

Detailed Description

Interface definition for a callback when an action happens in a widget.

Example:

ButtonWidget buttonWidget;
...
buttonWidget.setOnSidebarActionListener(new OnSidebarActionListener() {
 
 public void onSidebarAction(Widget widget, int action, Bundle extras) {
    if(action == ButtonWidget.EVENT_BUTTON_1_CLICKED)
        // button 1 was clicked
 } 
});

Member Function Documentation

void onSidebarAction ( Widget  widget,
int  action,
Bundle  extras 
)

Called when action was triggered from a widget.

Parameters
widgetinstance of widget that triggered the callback
actionID of the action. Action IDs are defined as final static members of Widget classes
extrasif not null, contains additional data of the callback

Referenced by Widget.invokeOnSidebarActionCallback().