jaxx.runtime.swing.nav
Interface NavBridge<M,N extends NavNode<M,N>>

Type Parameters:
M - Type of model to bridge
N - Type of nodes of the model
All Known Implementing Classes:
NavTreeBridge, NavTreeTableBridge

public interface NavBridge<M,N extends NavNode<M,N>>

Contract of the bridge used by NavHelper to hold model and ui.

Since:
2.1
Author:
tchemit

Method Summary
 void addTreeModelListener(TreeModelListener l)
           
 N getChild(Object parent, int index)
           
 int getChildCount(Object parent)
           
 int getIndexOfChild(Object parent, Object child)
           
<T extends EventListener>
T[]
getListeners(Class<T> listenerType)
           
 M getModel()
           
 TreeNode[] getPathToRoot(TreeNode aNode)
           
 N getRoot()
           
 TreeModelListener[] getTreeModelListeners()
           
 void insertNodeInto(N newChild, N parent, int index)
           
 boolean isLeaf(Object node)
           
 void nodeChanged(TreeNode node)
           
 void nodesChanged(TreeNode node, int[] childIndices)
           
 void nodeStructureChanged(TreeNode node)
           
 void nodesWereInserted(N parent, int[] indices)
           
 void nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)
           
 void nodeWereInserted(N parentNode, int childIndice, N node)
           
 void notifyChildNodesInserted(N node)
          Notifies that all childs nodes of node were inserted.
 void notifyNodeInserted(N node)
          Notifies that the node was inserted.
 void reload(N node)
           
 void removeNodeFromParent(N node)
           
 void removeTreeModelListener(TreeModelListener l)
           
 void setModel(M delegate)
           
 void setRoot(N node)
           
 void valueForPathChanged(TreePath path, Object newValue)
           
 

Method Detail

getModel

M getModel()

getRoot

N getRoot()

isLeaf

boolean isLeaf(Object node)

getChildCount

int getChildCount(Object parent)

getChild

N getChild(Object parent,
           int index)

getIndexOfChild

int getIndexOfChild(Object parent,
                    Object child)

getPathToRoot

TreeNode[] getPathToRoot(TreeNode aNode)

setRoot

void setRoot(N node)

insertNodeInto

void insertNodeInto(N newChild,
                    N parent,
                    int index)

removeNodeFromParent

void removeNodeFromParent(N node)

reload

void reload(N node)

valueForPathChanged

void valueForPathChanged(TreePath path,
                         Object newValue)

nodeStructureChanged

void nodeStructureChanged(TreeNode node)

nodeChanged

void nodeChanged(TreeNode node)

nodesChanged

void nodesChanged(TreeNode node,
                  int[] childIndices)

nodesWereInserted

void nodesWereInserted(N parent,
                       int[] indices)

nodeWereInserted

void nodeWereInserted(N parentNode,
                      int childIndice,
                      N node)

nodesWereRemoved

void nodesWereRemoved(TreeNode node,
                      int[] childIndices,
                      Object[] removedChildren)

notifyNodeInserted

void notifyNodeInserted(N node)
Notifies that the node was inserted.

Note: The method recurses on childs (always notify parent before child)

Parameters:
node - node inserted

notifyChildNodesInserted

void notifyChildNodesInserted(N node)
Notifies that all childs nodes of node were inserted.

Note: The method recurses on childs (always notify parent before child)

Parameters:
node - node where all childs where inserted

addTreeModelListener

void addTreeModelListener(TreeModelListener l)

removeTreeModelListener

void removeTreeModelListener(TreeModelListener l)

getTreeModelListeners

TreeModelListener[] getTreeModelListeners()

getListeners

<T extends EventListener> T[] getListeners(Class<T> listenerType)

setModel

void setModel(M delegate)


Copyright © 2008-2010 CodeLutin. All Rights Reserved.