Class ScriptTreeModel
java.lang.Object
fr.ifremer.isisfish.ui.script.model.ScriptTreeModel
- All Implemented Interfaces:
TreeModel
Tree model for scripts edition.
Tree model is structured as this :
- root
- vcs
- categories
- files
- Version:
- $Revision$ Last update : $Date$ By : $Author$
- Author:
- chatellier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jdesktop.swingx.tree.TreeModelSupportstatic final intAdd node operationstatic final intDelete Node operationstatic final intModify node operationCategories files for VCS.VCS list. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidNotify for file addition.voidfileDeleted(File file) Notify for file deletion.voidfileModified(File file) Notify for file modification.intgetChildCount(Object parent) intgetIndexOfChild(Object parent, Object child) protected TreePathgetRecursiveTreePath(File file, TreePath path) Find file in tree, and return tree path.getRoot()getTreePathFor(File file) Find tree path for a filegetVersionnableSortedFiles(File[] filesArray) Filter input file array and return only sorted collection with only directories.booleanvoidprotected booleanupdateChildren(File file, TreePath path, int operation) Notify for tree operation.voidvalueForPathChanged(TreePath path, Object newValue)
-
Field Details
-
modelSupport
protected org.jdesktop.swingx.tree.TreeModelSupport modelSupport -
vcsList
VCS list. -
rootFiles
Categories files for VCS. -
OPERATION_ADD
public static final int OPERATION_ADDAdd node operation- See Also:
-
OPERATION_MODIFY
public static final int OPERATION_MODIFYModify node operation- See Also:
-
OPERATION_DELETE
public static final int OPERATION_DELETEDelete Node operation- See Also:
-
-
Constructor Details
-
ScriptTreeModel
public ScriptTreeModel()
-
-
Method Details
-
addTreeModelListener
- Specified by:
addTreeModelListenerin interfaceTreeModel
-
getChild
-
getChildCount
- Specified by:
getChildCountin interfaceTreeModel
-
getIndexOfChild
- Specified by:
getIndexOfChildin interfaceTreeModel
-
getRoot
-
isLeaf
-
removeTreeModelListener
- Specified by:
removeTreeModelListenerin interfaceTreeModel
-
valueForPathChanged
- Specified by:
valueForPathChangedin interfaceTreeModel
-
getVersionnableSortedFiles
Filter input file array and return only sorted collection with only directories.- Parameters:
filesArray- file array- Returns:
- sorted list
-
fileAdded
Notify for file addition.- Parameters:
file- added file
-
fileModified
Notify for file modification.- Parameters:
file- modified file
-
fileDeleted
Notify for file deletion. TODO must be called "before" effective deletion- Parameters:
file- deleted file
-
updateChildren
Notify for tree operation.- Parameters:
file-path- path to updateoperation- operation#OPERATION_DELETE #OPERATION_MODIFY- Returns:
trueif path has been updated
-
getTreePathFor
Find tree path for a file- Parameters:
file- to search- Returns:
- tree path
-
getRecursiveTreePath
Find file in tree, and return tree path.- Parameters:
file-path- path to update- Returns:
- tree path
-