Class DelegateTabContainerHandler
java.lang.Object
org.nuiton.jaxx.application.swing.tab.DelegateTabContainerHandler
- All Implemented Interfaces:
TabContainerHandler
public class DelegateTabContainerHandler extends Object implements TabContainerHandler
Created on 11/25/13.
- Since:
- 2.8
- Author:
- Tony Chemit - chemit@codelutin.com
-
Constructor Summary
Constructors Constructor Description DelegateTabContainerHandler(JTabbedPane tabbedPane) -
Method Summary
Modifier and Type Method Description TabHandlergetTabHandler(int index)Returns the tab handler of the tab i.JTabbedPanegetTabPanel()voidinit()booleanonTabChanged(int currentIndex, int newIndex)Method called when the user selects a tab.booleanremoveTab(int i)Removes the tab ivoidsetCustomTab(int index, TabContentModel model)Sets aCustomTabas tab component.
-
Constructor Details
-
Method Details
-
getTabPanel
- Specified by:
getTabPanelin interfaceTabContainerHandler
-
init
public void init()- Specified by:
initin interfaceTabContainerHandler
-
onTabChanged
public boolean onTabChanged(int currentIndex, int newIndex)Description copied from interface:TabContainerHandlerMethod called when the user selects a tab.- Specified by:
onTabChangedin interfaceTabContainerHandler- Returns:
falseif you want to prevent the tab change,trueotherwise
-
getTabHandler
Description copied from interface:TabContainerHandlerReturns the tab handler of the tab i.- Specified by:
getTabHandlerin interfaceTabContainerHandler- Parameters:
index- the index of the tab- Returns:
- the tab handler of the index i if the handler implements
the
TabHandlerinterface,nullotherwise
-
setCustomTab
Description copied from interface:TabContainerHandlerSets aCustomTabas tab component.- Specified by:
setCustomTabin interfaceTabContainerHandler
-
removeTab
public boolean removeTab(int i)Description copied from interface:TabContainerHandlerRemoves the tab i- Specified by:
removeTabin interfaceTabContainerHandler- Parameters:
i- the index of the tab to remove- Returns:
falseif you want to prevent the tab close,trueotherwise
-