Index

Classes

Class

Methods

Class Banana.Controls.TabSlider


Extends Banana.Controls.Panel.

Methods borrowed from class Banana.Controls.Panel:
getTagName
Methods borrowed from class Banana.UiControl:
addControl, addCss, addCssClass, getAttribute, getAttributes, getClientId, getCss, getCssClass, getDimensions, getHtml, getHtmlAttributes, getState, getStyle, getStyleProperty, hasCssClass, registerEvents, removeAttribute, removeCssClass, removeState, setAttribute, setClientId, setCss, setEnabled, setState, setStyle, setVisible, switchCssClass, triggerEvent, unregisterEvents
Methods borrowed from class Banana.Control:
applyToChildren, bind, clear, createComponents, findControl, generateUniqueId, getControls, getDomEventTypes, getFirstUiControl, getId, getPage, getParent, getProxy, hasBind, invalidateDisplay, onPreInvalidateContents, onWindowResize, remove, render, setId, setPage, setParent, unbind, unload, updateDisplay

Defined in: TabSlider.js.

Class Detail
Banana.Controls.TabSlider()

Creates a Tab Slider. A Tabslider is a horizontaly sliding component. Content can be added by using the addContent(content,tabname) method. Optionally setUseUrlHistory can be used to have tabslides available in browser history

Example:

var slider = new Banana.Controls.TabSlider();
slider.setStyle("height:300px; width:800px; border:1px solid black;border:1px solid #666666;");
slider.setUseUrlHistory(true);
slider.setSlideSpeed(1000);
slider.addContent(new Banana.Controls.DropDown(),"dropdown");
slider.addContent(new Banana.Controls.CheckBox(),"checkbox");
Method Detail
{this} addContent(content, tabname)

Adds content which is accessible through a tab link Content can be a control or just plain text. A tabname is required and will appear as a link on top of the control

Parameters:
{mixed} content
can be a control or plain text
{String} tabname
Returns:
{this}
applyAutoHeight()

Auto sets height. Because the tabslider uses absolute positioned divs, we have to set the height manually. this function calculates and sets the height based on the current active tab

repositionPanels(speed)

ensures the correct position of the current active tab

Parameters:
speed
{this} setEasing(easing)

Set easing type "swing" || "linear" See JQuery animate() method for more information

Parameters:
{String} easing
Returns:
{this}
{this} setLinkNextText(text)

sets the text of the next link. clicking on it will advance to the next link

Parameters:
{String} text
Returns:
{this}
{this} setLinkPreviousText(text)

sets the text of the previous link. clicking on it will advance to the previous link

Parameters:
{String} text
Returns:
{this}
{this} setSlideSpeed(speed)

Set transition speed during slide

Parameters:
{int} speed
in ms
Returns:
{this}
{this} setUseAutoHeight()

When true we set the height of the tabslider based on the current active tab. Note that css properties margin and padding are ignored. This is due the fact that the tabslider uses absolute positioned divs. height should be set manually or calculated with javascript.

Parameters:
{boolean}
Returns:
{this}
{this} setUseUrlHistory()

if true we save the active tab in the url. Using browser history will affect current active tab

Parameters:
{boolean}
Returns:
{this}

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 05 2012 22:01:59 GMT+0100 (CET)