jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.TabItem
Search:
 
Filters

Class jsbeans.TabItem

See also: TabFolder
TabItem represents an element inside an TabFolder.

Constructor

jsbeans.TabItem ( tabFolder , [default_tab_item] )
Parameters:
tabFolder <TabFolder> the parent container
[default_tab_item] <boolean> true if this TabItem is the one opened by default. Optional.

Methods

getContent

String getContent ( )
Returns the content of this TabItem directly of via a function invocation.
Returns: String
the actual content. If the content is a function as of the one set via setContent, it will be invoked and returning value will be used.

getIndex

Integer getIndex ( )
Returns the index of this TabItem
Returns: Integer

getText

String getText ( )
Returns the title of this TabItem
Returns: String

setContent

void setContent ( content )
Sets the content of this TabItem directly of via a function.
Sample:
function contentManager(item) {
// item.toString() == "jsbeans.TabItem"
return "A <strong>content</strong>"; // it may be an AJAX call
}
tabItem.setContent(contentManager);
Parameters:
content <String | Function> if content is a Function if will be invoked with this as argument.
Returns: void

setText

void setText ( text )
Sets the title of this TabItem
Parameters:
text <String>
Returns: void

setUserClass

void setUserClass ( extraClass )
Sets extra style classes at this TabItem. For visual customization.
Parameters:
extraClass <String> one or more style classes
Returns: void

toString

String toString ( )
Replacer for native toString.
Returns "jsbeans.TabItem"
Returns: String
the string "jsbeans.TabItem"


Copyright © 2016 Francesco Mele. All rights reserved.