jaxx.runtime.swing.navigation
Class NavigationTreeHandlerWithCardLayout

java.lang.Object
  extended by javax.swing.tree.DefaultTreeSelectionModel
      extended by jaxx.runtime.swing.navigation.NavigationTreeHandler
          extended by jaxx.runtime.swing.navigation.NavigationTreeHandlerWithCardLayout
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.TreeSelectionModel

public abstract class NavigationTreeHandlerWithCardLayout
extends NavigationTreeHandler

Simple NavigationTreeHandler 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
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jaxx.runtime.swing.navigation.NavigationTreeHandler
NavigationTreeHandler.Strategy
 
Field Summary
 
Fields inherited from class jaxx.runtime.swing.navigation.NavigationTreeHandler
context, contextHelper, strategy
 
Fields inherited from class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionMode
 
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
 
Constructor Summary
NavigationTreeHandlerWithCardLayout(java.lang.String contextPrefix, JAXXObject context, NavigationTreeHandler.Strategy strategy)
           
 
Method Summary
protected  boolean closeUI(java.awt.Component component)
           
protected  java.awt.Component createUI(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(NavigationTreeNode node)
           
protected  void openUI(java.awt.Component newUI, NavigationTreeNode node)
          Ouvre l'ui associée au noeud sélectionné dans l'arbre de navigation.
 
Methods inherited from class jaxx.runtime.swing.navigation.NavigationTreeHandler
addSelectedBeanInContext, createUIContext, getContext, getContextHelper, getNavigationTreeModel, selectNodeUI, setSelectionPath, treateError
 
Methods inherited from class javax.swing.tree.DefaultTreeSelectionModel
addPropertyChangeListener, addSelectionPath, addSelectionPaths, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removePropertyChangeListener, removeSelectionPath, removeSelectionPaths, removeTreeSelectionListener, resetRowSelection, setRowMapper, setSelectionMode, setSelectionPaths, toString, updateLeadIndex
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavigationTreeHandlerWithCardLayout

public NavigationTreeHandlerWithCardLayout(java.lang.String contextPrefix,
                                           JAXXObject context,
                                           NavigationTreeHandler.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 NavigationTreeHandler
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(NavigationTreeNode node)
Specified by:
getUI in class NavigationTreeHandler
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,
                      NavigationTreeNode node)
               throws java.lang.Exception
Description copied from class: NavigationTreeHandler
Ouvre l'ui associée au noeud sélectionné dans l'arbre de navigation.

Specified by:
openUI in class NavigationTreeHandler
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(java.awt.Component component)
                   throws java.lang.Exception
Specified by:
closeUI in class NavigationTreeHandler
Parameters:
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(NavigationTreeNode node)
                               throws java.lang.Exception
Description copied from class: NavigationTreeHandler
Instancie une nouvelle ui associé à un noeud de l'arbre de navigation

Specified by:
createUI in class NavigationTreeHandler
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-2010 CodeLutin. All Rights Reserved.