org.mactor.ui.gui.project
Class ProjectModel

java.lang.Object
  extended by org.mactor.ui.gui.project.ProjectModel
All Implemented Interfaces:
javax.swing.tree.TreeModel

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


Constructor Summary
ProjectModel(java.io.File projectPath)
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void copyAfter(ProjectTreeNode destNode, ProjectTreeNode nodeToCopy)
           
 void copyInto(ProjectTreeNode destNode, ProjectTreeNode nodeToCopy)
           
 void delete(ProjectTreeNode node)
           
 java.lang.Object getChild(java.lang.Object node, int index)
           
 int getChildCount(java.lang.Object node)
           
 int getIndexOfChild(java.lang.Object node, java.lang.Object child)
           
static java.lang.Object[] getPath(ProjectTreeNode node)
           
 ProjectTreeNode getRoot()
           
 void insertAfter(ProjectTreeNode destNode, ProjectTreeNode nodeToInsert)
           
 void insertInto(ProjectTreeNode destNode, ProjectTreeNode nodeToInsert)
           
 boolean isLeaf(java.lang.Object node)
           
 void moveAfter(ProjectTreeNode destNode, ProjectTreeNode nodeToMove)
           
 void moveInto(ProjectTreeNode destNode, ProjectTreeNode nodeToMove)
           
 void notifyNodeNameChanged(ProjectTreeNode tn)
           
 void notifyTreeStructureChanged(ProjectTreeNode node)
           
 void reload(java.io.File projectPath)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectModel

public ProjectModel(java.io.File projectPath)
             throws MactorException
Throws:
MactorException
Method Detail

reload

public void reload(java.io.File projectPath)
            throws MactorException
Throws:
MactorException

getChild

public java.lang.Object getChild(java.lang.Object node,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object node)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object node,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

getRoot

public ProjectTreeNode getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

notifyTreeStructureChanged

public void notifyTreeStructureChanged(ProjectTreeNode node)

notifyNodeNameChanged

public void notifyNodeNameChanged(ProjectTreeNode tn)

getPath

public static java.lang.Object[] getPath(ProjectTreeNode node)

moveAfter

public void moveAfter(ProjectTreeNode destNode,
                      ProjectTreeNode nodeToMove)
               throws MactorException
Throws:
MactorException

delete

public void delete(ProjectTreeNode node)
            throws MactorException
Throws:
MactorException

insertAfter

public void insertAfter(ProjectTreeNode destNode,
                        ProjectTreeNode nodeToInsert)
                 throws MactorException
Throws:
MactorException

copyAfter

public void copyAfter(ProjectTreeNode destNode,
                      ProjectTreeNode nodeToCopy)
               throws MactorException
Throws:
MactorException

moveInto

public void moveInto(ProjectTreeNode destNode,
                     ProjectTreeNode nodeToMove)
              throws MactorException
Throws:
MactorException

insertInto

public void insertInto(ProjectTreeNode destNode,
                       ProjectTreeNode nodeToInsert)
                throws MactorException
Throws:
MactorException

copyInto

public void copyInto(ProjectTreeNode destNode,
                     ProjectTreeNode nodeToCopy)
              throws MactorException
Throws:
MactorException

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object node)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel


Copyright © 2008. All Rights Reserved.