com.leafdigital.ui.api
Interface WidgetOwner

All Known Subinterfaces:
Dialog, Page, Window

public interface WidgetOwner

Interface (implemented by windows and dialogs) for the 'owner' of widgets, to be identified by string IDs.


Method Summary
 CallbackHandler getCallbackHandler()
           
 RadioButton getGroupSelected(java.lang.String group)
           
 Widget getWidget(java.lang.String id)
          Returns a widget within this window.
 boolean isCreated()
          Returns true if the WidgetOwner has been fully created.
 void setWidgetID(java.lang.String id, Widget w)
          Called by the UI singleton to record widget IDs.
 

Method Detail

getWidget

Widget getWidget(java.lang.String id)
Returns a widget within this window. This method only works if the widget was created as part of the XML setContents method. Other widgets do not have IDs unless manually assigned.

Parameters:
id - Desired ID
Returns:
Widget
Throws:
BugException - If the widget cannot be found

setWidgetID

void setWidgetID(java.lang.String id,
                 Widget w)
Called by the UI singleton to record widget IDs. You can also call this manually to assign new widget IDs.

All IDs are cleared when either setContents method is used.

Parameters:
id - ID for widget
w - Widget
Throws:
BugException - If the widget ID is already in use

getGroupSelected

RadioButton getGroupSelected(java.lang.String group)
Parameters:
group - Name of group.
Returns:
Selected widget within that group, or null if none

getCallbackHandler

CallbackHandler getCallbackHandler()
Returns:
Callback handler for the given window

isCreated

boolean isCreated()
Returns true if the WidgetOwner has been fully created. If this returns false, you shouldn't call any callbacks.

Returns:
True if it's safe to run callbacks


Copyright © 2011 Samuel Marshall. All rights reserved.