org.nuiton.jaxx.tab
Class TabFactory

java.lang.Object
  extended by org.nuiton.jaxx.tab.TabFactory

public abstract class TabFactory
extends Object

Une usine pour les Tabs, leur configs et leur modèles

Author:
tony
See Also:
TabContentConfig, TabModel

Field Summary
protected  Map<String,JAXXTab> cache
          dictionary of instanciated actions
protected  Map<String,TabContentConfig> configs
          dictionary of configs
protected static org.apache.commons.logging.Log log
          to use log facility, just put in your code: log.info(\"...\");
protected  Map<String,TabModel> models
          dictionary of instanciated models
 
Constructor Summary
protected TabFactory()
           
 
Method Summary
protected  JComponent addTabHeader(JTabbedPane container, String tabName, TabContentConfig config, JAXXTab comp)
           
protected  void checkRegistredConfig(String tabName)
           
 void closeTab(JTabbedPane container, String tabName)
           
 TabContentConfig getConfig(String tabName)
           
 TabModel getModel(String tabName, Object... params)
           
 int getTabIndex(JTabbedPane container, JComponent comp)
           
 JAXXTab getUI(String tabName)
           
protected abstract  Map<String,TabContentConfig> initFactory()
           
protected  void initJAXXTab(TabContentConfig config, JAXXTab instance)
           
protected abstract  void initTab(JAXXTab tab, String tabName, TabContentConfig config)
           
protected  TabModel initTabModel(TabContentConfig config, Object... params)
           
 Set<String> keySet()
           
protected  JAXXTab newTab(String tabName)
           
protected  void registerTab(JTabbedPane container, String tabName, TabContentConfig config, JAXXTab comp)
           
 void resetCache()
           
 void showTab(JTabbedPane container, String tabName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
to use log facility, just put in your code: log.info(\"...\");


configs

protected Map<String,TabContentConfig> configs
dictionary of configs


cache

protected Map<String,JAXXTab> cache
dictionary of instanciated actions


models

protected Map<String,TabModel> models
dictionary of instanciated models

Constructor Detail

TabFactory

protected TabFactory()
Method Detail

initFactory

protected abstract Map<String,TabContentConfig> initFactory()

initTab

protected abstract void initTab(JAXXTab tab,
                                String tabName,
                                TabContentConfig config)

newTab

protected JAXXTab newTab(String tabName)

keySet

public Set<String> keySet()

getConfig

public TabContentConfig getConfig(String tabName)

getUI

public JAXXTab getUI(String tabName)

getModel

public TabModel getModel(String tabName,
                         Object... params)

initTabModel

protected TabModel initTabModel(TabContentConfig config,
                                Object... params)
                         throws InstantiationException,
                                IllegalAccessException
Throws:
InstantiationException
IllegalAccessException

showTab

public void showTab(JTabbedPane container,
                    String tabName)

closeTab

public void closeTab(JTabbedPane container,
                     String tabName)

getTabIndex

public int getTabIndex(JTabbedPane container,
                       JComponent comp)

resetCache

public void resetCache()

addTabHeader

protected JComponent addTabHeader(JTabbedPane container,
                                  String tabName,
                                  TabContentConfig config,
                                  JAXXTab comp)

registerTab

protected void registerTab(JTabbedPane container,
                           String tabName,
                           TabContentConfig config,
                           JAXXTab comp)

initJAXXTab

protected void initJAXXTab(TabContentConfig config,
                           JAXXTab instance)
                    throws NoSuchFieldException,
                           IllegalAccessException
Throws:
NoSuchFieldException
IllegalAccessException

checkRegistredConfig

protected void checkRegistredConfig(String tabName)


Copyright © 2008-2010 CodeLutin. All Rights Reserved.