jaxx.runtime.swing.navigation
Class NavigationTreeSelectionAdapterWithCardLayout

java.lang.Object
  extended by jaxx.runtime.swing.navigation.NavigationTreeSelectionAdapter
      extended by jaxx.runtime.swing.navigation.NavigationTreeSelectionAdapterWithCardLayout
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TreeSelectionListener

public abstract class NavigationTreeSelectionAdapterWithCardLayout
extends NavigationTreeSelectionAdapter

Simple NavigationTreeSelectionAdapter implementation with a CardLayout2 to manage components to associated with tree's nodes.

For each node, the ui associated has a constraints in a cardlayout which is the node context path.

A single container managed by the cardlayout is used to display the components associated with tree's nodes.

Author:
chemit

Nested Class Summary
 
Nested classes/interfaces inherited from class jaxx.runtime.swing.navigation.NavigationTreeSelectionAdapter
NavigationTreeSelectionAdapter.Strategy
 
Field Summary
 
Fields inherited from class jaxx.runtime.swing.navigation.NavigationTreeSelectionAdapter
context, defaultUIClass, defaultUIHandlerClass, GO_BACK_DEF, NAVIGATION_SELECTED_BEAN, NAVIGATION_SELECTED_NODE_ENTRY_DEF, NAVIGATION_SELECTED_PATH_ENTRY_DEF, strategy
 
Constructor Summary
NavigationTreeSelectionAdapterWithCardLayout(java.lang.Class<? extends JAXXObject> defaultUIClass, java.lang.Class<? extends JAXXAction> defaultUIHandlerClass, JAXXObject context, NavigationTreeSelectionAdapter.Strategy strategy)
           
 
Method Summary
protected  boolean closeUI(javax.swing.event.TreeSelectionEvent event, java.awt.Component component)
           
protected  java.awt.Component createUI(NavigationTreeModel.NavigationTreeNode node)
          Instancie une nouvelle ui associé à un noeud de l'arbre de navigation
protected abstract  javax.swing.JPanel getContentContainer()
          All components associated with a tree's node is displayed in a single container.
protected abstract  CardLayout2 getContentLayout()
          the cardlayout managing components associated with tree node.
protected  java.awt.Component getCurrentUI()
           
protected  java.awt.Component getUI(NavigationTreeModel.NavigationTreeNode node)
           
protected  void openUI(java.awt.Component newUI, NavigationTreeModel.NavigationTreeNode node)
          Ouvre l'ui associée au noeud sélectionné dans l'arbre de navigation.
 
Methods inherited from class jaxx.runtime.swing.navigation.NavigationTreeSelectionAdapter
addSelectedBeanInContext, getNavigationTreeModel, getNodeConstraints, goBackToPreviousNode, prepareNode, returnToPreviousNode, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationTreeSelectionAdapterWithCardLayout

public NavigationTreeSelectionAdapterWithCardLayout(java.lang.Class<? extends JAXXObject> defaultUIClass,
                                                    java.lang.Class<? extends JAXXAction> defaultUIHandlerClass,
                                                    JAXXObject context,
                                                    NavigationTreeSelectionAdapter.Strategy strategy)
Method Detail

getContentContainer

protected abstract javax.swing.JPanel getContentContainer()
All components associated with a tree's node is displayed in a single container.

Returns:
the containter of components

getContentLayout

protected abstract CardLayout2 getContentLayout()
the cardlayout managing components associated with tree node. The constraints of each component is the node contextPath.

Returns:
the layout used to display components associated with tree's nodes.

getCurrentUI

protected java.awt.Component getCurrentUI()
Specified by:
getCurrentUI in class NavigationTreeSelectionAdapter
Returns:
le composent actuellement visible associé au noeud courant ou au noeud précédent lors d'un changement de noeud.

getUI

protected java.awt.Component getUI(NavigationTreeModel.NavigationTreeNode node)
Specified by:
getUI in class NavigationTreeSelectionAdapter
Parameters:
node - le noeud associé à l'ui à retrouver
Returns:
l'ui associé au novueau noeud sélectionné

openUI

protected void openUI(java.awt.Component newUI,
                      NavigationTreeModel.NavigationTreeNode node)
               throws java.lang.Exception
Description copied from class: NavigationTreeSelectionAdapter
Ouvre l'ui associée au noeud sélectionné dans l'arbre de navigation.

Specified by:
openUI in class NavigationTreeSelectionAdapter
Parameters:
newUI - l'ui associé au noeud sélectionné à ouvrir
node - le node de l'ui a ouvrir
Throws:
java.lang.Exception - if any

closeUI

protected boolean closeUI(javax.swing.event.TreeSelectionEvent event,
                          java.awt.Component component)
                   throws java.lang.Exception
Specified by:
closeUI in class NavigationTreeSelectionAdapter
Parameters:
event - l'evenement de selection de noeud
component - le composent actuellement visible
Returns:
true si le composent a bien été fermé, false sinon
Throws:
java.lang.Exception - if any

createUI

protected java.awt.Component createUI(NavigationTreeModel.NavigationTreeNode node)
                               throws java.lang.Exception
Description copied from class: NavigationTreeSelectionAdapter
Instancie une nouvelle ui associé à un noeud de l'arbre de navigation

Specified by:
createUI in class NavigationTreeSelectionAdapter
Parameters:
node - le noeud associé à l'ui à créer
Returns:
la nouvelle ui associée au noeud
Throws:
java.lang.Exception - if any


Copyright © 2008-2009 CodeLutin. All Rights Reserved.