siuying.gm.app.gmailer4j.model
Class ConvTreeModel

java.lang.Object
  extended by siuying.gm.app.gmailer4j.model.ConvTreeModel
All Implemented Interfaces:
javax.swing.tree.TreeModel

public class ConvTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel

A tree model represent a tree of conversation

Version:
0.1
Author:
siuying

Constructor Summary
ConvTreeModel()
           
ConvTreeModel(GMConversation conv)
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener l)
          addTreeModelListener
protected  void fireTreeNodesChanged(java.lang.Object root)
           
protected  void fireTreeNodesInserted(java.lang.Object root)
           
protected  void fireTreeNodesRemoved(java.lang.Object root)
           
protected  void fireTreeStructureChanged(java.lang.Object root)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
          getChild
 int getChildCount(java.lang.Object parent)
          getChildCount
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
          getIndexOfChild
 java.lang.Object getRoot()
          getRoot
 boolean isLeaf(java.lang.Object node)
          isLeaf
 void removeTreeModelListener(javax.swing.event.TreeModelListener l)
          removeTreeModelListener
 java.lang.String toString()
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
          valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConvTreeModel

public ConvTreeModel()

ConvTreeModel

public ConvTreeModel(GMConversation conv)
Method Detail

getRoot

public java.lang.Object getRoot()
getRoot

Specified by:
getRoot in interface javax.swing.tree.TreeModel
Returns:
Object

getChildCount

public int getChildCount(java.lang.Object parent)
getChildCount

Specified by:
getChildCount in interface javax.swing.tree.TreeModel
Parameters:
parent - Object
Returns:
int

isLeaf

public boolean isLeaf(java.lang.Object node)
isLeaf

Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Parameters:
node - Object
Returns:
boolean

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener

Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - TreeModelListener

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener

Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - TreeModelListener

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
getChild

Specified by:
getChild in interface javax.swing.tree.TreeModel
Parameters:
parent - Object
index - int
Returns:
Object

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
getIndexOfChild

Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
Parameters:
parent - Object
child - Object
Returns:
int

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
valueForPathChanged

Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel
Parameters:
path - TreePath
newValue - Object

fireTreeStructureChanged

protected void fireTreeStructureChanged(java.lang.Object root)

fireTreeNodesInserted

protected void fireTreeNodesInserted(java.lang.Object root)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(java.lang.Object root)

fireTreeNodesChanged

protected void fireTreeNodesChanged(java.lang.Object root)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object