com.leafdigital.ui.api
Interface TabPanel

All Superinterfaces:
Panel, Widget, WidgetParent

public interface TabPanel
extends Panel

A Panel with any number of slots (all named 'tab' in XML). Components are laid out in separate tabs. Components should be Pages; it uses their title for the tab names.


Method Summary
 void add(Page p)
          Adds a page to the end.
 void display(java.lang.String id)
          Brings a particular page to the front.
 java.lang.String getDisplayed()
           
 void setOnChange(java.lang.String callback)
          Sets the callback called when the user clicks on a tab.
 
Methods inherited from interface com.leafdigital.ui.api.Panel
remove, removeAll, setBorder
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 
Methods inherited from interface com.leafdigital.ui.api.WidgetParent
getWidgets
 

Method Detail

add

void add(Page p)
Adds a page to the end.

Parameters:
p - New page

display

void display(java.lang.String id)
             throws BugException
Brings a particular page to the front.

Parameters:
id - ID of desired page
Throws:
BugException - If id doesn't exist or isn't a page etc

setOnChange

@UICallback
void setOnChange(java.lang.String callback)
Sets the callback called when the user clicks on a tab. (Not called for manual sets.)

Parameters:
callback - Callback

getDisplayed

java.lang.String getDisplayed()
Returns:
ID of displayed page or null if it doesn't have one


Copyright © 2011 Samuel Marshall. All rights reserved.