public class ScriptTreeModel extends Object implements TreeModel
- root
- vcs
- categories
- files
| Modifier and Type | Field and Description |
|---|---|
protected org.jdesktop.swingx.tree.TreeModelSupport |
modelSupport |
static int |
OPERATION_ADD
Add node operation
|
static int |
OPERATION_DELETE
Delete Node operation
|
static int |
OPERATION_MODIFY
Modify node operation
|
protected Map<VCS,List<File>> |
rootFiles
Categories files for VCS.
|
protected List<VCS> |
vcsList
VCS list.
|
| Constructor and Description |
|---|
ScriptTreeModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeModelListener(TreeModelListener l) |
void |
fileAdded(File file)
Notify for file addition.
|
void |
fileDeleted(File file)
Notify for file deletion.
|
void |
fileModified(File file)
Notify for file modification.
|
Object |
getChild(Object parent,
int index) |
int |
getChildCount(Object parent) |
int |
getIndexOfChild(Object parent,
Object child) |
protected TreePath |
getRecursiveTreePath(File file,
TreePath path)
Find file in tree, and return tree path.
|
Object |
getRoot() |
TreePath |
getTreePathFor(File file)
Find tree path for a file
|
protected List<File> |
getVersionnableSortedFiles(File[] filesArray)
Filter input file array and return only sorted collection with only directories.
|
boolean |
isLeaf(Object node) |
void |
removeTreeModelListener(TreeModelListener l) |
protected boolean |
updateChildren(File file,
TreePath path,
int operation)
Notify for tree operation.
|
void |
valueForPathChanged(TreePath path,
Object newValue) |
protected org.jdesktop.swingx.tree.TreeModelSupport modelSupport
public static final int OPERATION_ADD
public static final int OPERATION_MODIFY
public static final int OPERATION_DELETE
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModelpublic int getChildCount(Object parent)
getChildCount in interface TreeModelpublic int getIndexOfChild(Object parent, Object child)
getIndexOfChild in interface TreeModelpublic void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModelpublic void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged in interface TreeModelprotected List<File> getVersionnableSortedFiles(File[] filesArray)
filesArray - file arraypublic void fileAdded(File file)
file - added filepublic void fileModified(File file)
file - modified filepublic void fileDeleted(File file)
file - deleted fileprotected boolean updateChildren(File file, TreePath path, int operation)
file - path - path to updateoperation - operation #OPERATION_DELETE #OPERATION_MODIFYtrue if path has been updatedpublic TreePath getTreePathFor(File file)
file - to searchCopyright © 1999-2012 CodeLutin. All Rights Reserved.