de.lessvoid.nifty.controls.tabs
Class TabsControl

java.lang.Object
  extended by de.lessvoid.nifty.controls.AbstractController
      extended by de.lessvoid.nifty.controls.tabs.TabsControl
All Implemented Interfaces:
Controller, NiftyControl, Tabs, org.bushe.swing.event.EventTopicSubscriber<ElementShowEvent>

public class TabsControl
extends AbstractController
implements Tabs, org.bushe.swing.event.EventTopicSubscriber<ElementShowEvent>

Author:
ractoc

Constructor Summary
TabsControl()
           
 
Method Summary
 void addTab(Element tab)
          Adds a single tab to the end of the Tab list.
 void bind(Nifty nifty, Screen screen, Element element, Properties parameter, Attributes controlDefinitionAttributes)
           
 void init(Properties prprts, Attributes atrbts)
           
 boolean inputEvent(NiftyInputEvent inputEvent)
           
 void onEvent(String topic, ElementShowEvent data)
           
 void onStartScreen()
           
 void removeTab(int index)
          Removes the tab at the specified index.
 void removeTab(String tabId)
           
 void setActiveTab(int index)
          Sets the active tab to the specified index.
 void setActiveTab(String tabId)
          Sets the active tab based on the tabId;
 void switchTab(String tabId)
          Method used to switch between tabs.
 
Methods inherited from class de.lessvoid.nifty.controls.AbstractController
bind, disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, onFocus, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 

Constructor Detail

TabsControl

public TabsControl()
Method Detail

bind

public void bind(Nifty nifty,
                 Screen screen,
                 Element element,
                 Properties parameter,
                 Attributes controlDefinitionAttributes)
Specified by:
bind in interface Controller

init

public void init(Properties prprts,
                 Attributes atrbts)
Specified by:
init in interface Controller
Overrides:
init in class AbstractController

onStartScreen

public void onStartScreen()
Specified by:
onStartScreen in interface Controller

inputEvent

public boolean inputEvent(NiftyInputEvent inputEvent)
Specified by:
inputEvent in interface Controller

addTab

public void addTab(Element tab)
Description copied from interface: Tabs
Adds a single tab to the end of the Tab list.

Specified by:
addTab in interface Tabs
Parameters:
tab - Tab to be added.

removeTab

public void removeTab(int index)
Description copied from interface: Tabs
Removes the tab at the specified index.

Specified by:
removeTab in interface Tabs
Parameters:
index - Index of the tab to remove.

removeTab

public void removeTab(String tabId)

setActiveTab

public void setActiveTab(int index)
Description copied from interface: Tabs
Sets the active tab to the specified index.

Specified by:
setActiveTab in interface Tabs
Parameters:
index - The index of the tab to make the active tab.

setActiveTab

public void setActiveTab(String tabId)
Description copied from interface: Tabs
Sets the active tab based on the tabId;

Specified by:
setActiveTab in interface Tabs
Parameters:
tabId - The TabId of the tab to make the active tab.

switchTab

public void switchTab(String tabId)
Method used to switch between tabs. This method is called when the tab caption button is clicked.

Parameters:
tabId - The id of the tab this button is linked to.

onEvent

public void onEvent(String topic,
                    ElementShowEvent data)
Specified by:
onEvent in interface org.bushe.swing.event.EventTopicSubscriber<ElementShowEvent>


Copyright © 2011. All Rights Reserved.