|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.ui.script.model.ScriptTreeModel
public class ScriptTreeModel
Tree model for scripts edition. Tree model is structured as this :
- root
- vcs
- categories
- files
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
ScriptTreeModel()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jdesktop.swingx.tree.TreeModelSupport modelSupport
protected List<VCS> vcsList
protected Map<VCS,List<File>> rootFiles
public static final int OPERATION_ADD
public static final int OPERATION_MODIFY
public static final int OPERATION_DELETE
| Constructor Detail |
|---|
public ScriptTreeModel()
| Method Detail |
|---|
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModel
public Object getChild(Object parent,
int index)
getChild in interface TreeModelpublic int getChildCount(Object parent)
getChildCount in interface TreeModel
public int getIndexOfChild(Object parent,
Object child)
getIndexOfChild in interface TreeModelpublic Object getRoot()
getRoot in interface TreeModelpublic boolean isLeaf(Object node)
isLeaf in interface TreeModelpublic void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModel
public void valueForPathChanged(TreePath path,
Object newValue)
valueForPathChanged in interface TreeModelprotected List<File> getVersionnableSortedFiles(File[] filesArray)
filesArray - file array
public void fileAdded(File file)
file - added filepublic void fileModified(File file)
file - modified filepublic void fileDeleted(File file)
file - deleted file
protected boolean updateChildren(File file,
TreePath path,
int operation)
file - path - path to updateoperation - operation #OPERATION_DELETE #OPERATION_MODIFY
true if path has been updatedpublic TreePath getTreePathFor(File file)
file - to search
protected TreePath getRecursiveTreePath(File file,
TreePath path)
file - path - path to update
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||