|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.treetable.AbstractTreeTableModel
org.chorem.jtimer.ui.treetable.ProjectsAndTasksModel
public class ProjectsAndTasksModel
Cette classe gere l'affichage d'une liste de project dans l'arbre/table Cela permet au programme principal de manipuler la liste et d'oublier la gestion de l'arbre...
Field Summary | |
---|---|
protected List<String> |
columnIdentifiers
Tree column identifiers. |
protected TimerDataManager |
dataManager
Data. |
static int |
OPERATION_ADD
Add node operation |
static int |
OPERATION_DELETE
Delete Node operation |
static int |
OPERATION_MODIFY
Modify node operation |
protected ProjectsAndTasksTable |
projectsAndTaskTable
Tree managed by this model |
protected boolean |
showClosedTask
Show closed task property. |
Fields inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel |
---|
modelSupport, root |
Constructor Summary | |
---|---|
ProjectsAndTasksModel(ProjectsAndTasksTable projectsAndTaskTable,
TimerCore core,
List<String> columnIdentifiers)
Constructor. |
Method Summary | |
---|---|
void |
addProject(TimerProject project)
Add project event. |
void |
addTask(TimerTask task)
Add task event. |
void |
dataLoaded(Collection<TimerProject> projects)
All data loaded. |
void |
deleteProject(TimerProject project)
Delete project. |
void |
deleteTask(TimerTask task)
Delete task. |
Object |
getChild(Object parent,
int index)
|
int |
getChildCount(Object parent)
|
int |
getColumnCount()
|
String |
getColumnName(int column)
|
protected List<TimerTask> |
getFiteredSubListFor(Object parent)
Recupere la sous liste: data.getProjectsList() si parent = root getSubTasks() sinon |
int |
getIndexOfChild(Object parent,
Object child)
|
protected org.jdesktop.swingx.tree.TreeModelSupport |
getModelSupport()
Accessor to tree model support. |
Object |
getValueAt(Object object,
int column)
|
boolean |
isCellEditable(Object object,
int column)
|
boolean |
isLeaf(Object node)
|
void |
modifyProject(TimerProject project)
Modify project. |
void |
modifyTask(TimerTask task)
Modify task. |
void |
moveTask(TimerTask task)
Post move task. |
protected void |
notifyTaskChanged(TimerTask task,
int operation)
Notification de changement de donnees. |
void |
postChangeClosedState(TimerTask task)
Post change task state. |
void |
postMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Post merge task. |
void |
preChangeClosedState(TimerTask task)
Pre change task state. |
void |
preDeleteProject(TimerProject project)
Before delete project. |
void |
preDeleteTask(TimerTask task)
Before delete task. |
void |
preMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Pre merge task. |
void |
preMoveTask(TimerTask task)
Pre move task. |
void |
setAnnotation(TimerTask task,
Date date,
String annotation)
Add annotation. |
void |
setShowClosed(boolean showClosedTask)
Change closed task property. |
void |
setTaskTime(TimerTask task,
Date date,
Long time)
Set task time. |
void |
startTask(TimerTask task)
Start task. |
void |
stopTask(TimerTask task)
Stop task. |
protected boolean |
updateChildren(TimerTask task,
TreePath path,
int operation)
Recursively try to update node. |
Methods inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel |
---|
addTreeModelListener, getColumnClass, getHierarchicalColumn, getRoot, getTreeModelListeners, removeTreeModelListener, setValueAt, valueForPathChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPERATION_ADD
public static final int OPERATION_MODIFY
public static final int OPERATION_DELETE
protected ProjectsAndTasksTable projectsAndTaskTable
protected TimerDataManager dataManager
protected List<String> columnIdentifiers
protected boolean showClosedTask
Constructor Detail |
---|
public ProjectsAndTasksModel(ProjectsAndTasksTable projectsAndTaskTable, TimerCore core, List<String> columnIdentifiers)
projectsAndTaskTable
- tablecore
- timer corecolumnIdentifiers
- column identifiersMethod Detail |
---|
protected org.jdesktop.swingx.tree.TreeModelSupport getModelSupport()
public int getColumnCount()
getColumnCount
in interface org.jdesktop.swingx.treetable.TreeTableModel
public String getColumnName(int column)
getColumnName
in interface org.jdesktop.swingx.treetable.TreeTableModel
getColumnName
in class org.jdesktop.swingx.treetable.AbstractTreeTableModel
public Object getValueAt(Object object, int column)
getValueAt
in interface org.jdesktop.swingx.treetable.TreeTableModel
public boolean isCellEditable(Object object, int column)
isCellEditable
in interface org.jdesktop.swingx.treetable.TreeTableModel
isCellEditable
in class org.jdesktop.swingx.treetable.AbstractTreeTableModel
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
protected List<TimerTask> getFiteredSubListFor(Object parent)
parent
- parent to task sublist
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
isLeaf
in class org.jdesktop.swingx.treetable.AbstractTreeTableModel
protected void notifyTaskChanged(TimerTask task, int operation)
task
- task to updateoperation
- operationprotected boolean updateChildren(TimerTask task, TreePath path, int operation)
task
- the task to updatepath
- current pathoperation
- operation (add, modify, delete)
public void addProject(TimerProject project)
DataEventListener
addProject
in interface DataEventListener
project
- project to addpublic void addTask(TimerTask task)
DataEventListener
addTask
in interface DataEventListener
task
- task to addpublic void dataLoaded(Collection<TimerProject> projects)
DataEventListener
dataLoaded
in interface DataEventListener
projects
- projects collectionpublic void preDeleteProject(TimerProject project)
DataEventListener
preDeleteProject
in interface DataEventListener
project
- deleted projectpublic void preDeleteTask(TimerTask task)
DataEventListener
preDeleteTask
in interface DataEventListener
task
- deleted taskpublic void deleteProject(TimerProject project)
DataEventListener
deleteProject
in interface DataEventListener
project
- deleted projectpublic void deleteTask(TimerTask task)
DataEventListener
deleteTask
in interface DataEventListener
task
- deleted taskpublic void modifyProject(TimerProject project)
DataEventListener
modifyProject
in interface DataEventListener
project
- modified projectpublic void modifyTask(TimerTask task)
DataEventListener
modifyTask
in interface DataEventListener
task
- modified taskpublic void setAnnotation(TimerTask task, Date date, String annotation)
DataEventListener
setAnnotation
in interface DataEventListener
task
- task where annotation is changeddate
- dateannotation
- new annotation valuepublic void setTaskTime(TimerTask task, Date date, Long time)
DataEventListener
setTaskTime
in interface DataEventListener
task
- task where time is changeddate
- datetime
- task timepublic void postChangeClosedState(TimerTask task)
DataEventListener
postChangeClosedState
in interface DataEventListener
task
- taskpublic void preChangeClosedState(TimerTask task)
DataEventListener
preChangeClosedState
in interface DataEventListener
task
- taskpublic void startTask(TimerTask task)
DataEventListener
startTask
in interface DataEventListener
task
- started taskpublic void stopTask(TimerTask task)
DataEventListener
stopTask
in interface DataEventListener
task
- stoped taskpublic void setShowClosed(boolean showClosedTask)
showClosedTask
- closed task propertypublic void moveTask(TimerTask task)
DataEventListener
moveTask
in interface DataEventListener
task
- taskpublic void preMoveTask(TimerTask task)
DataEventListener
preMoveTask
in interface DataEventListener
task
- taskpublic void postMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
DataEventListener
postMergeTasks
in interface DataEventListener
destinationTask
- task where all other task will be mergedotherTasks
- other tasks to mergepublic void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
DataEventListener
preMergeTasks
in interface DataEventListener
destinationTask
- task where all other task will be mergedotherTasks
- other tasks to merge
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |