As Josh mentioned in the previous post, you need to modify code in the TreeViewerAgent
i.e. package agents.treeviewer except for 4
> 1. Remove the icons preceding the names of the project and datasets.
Open the IconManager file in agents.treeviewer, replace
- Code: Select all
relPaths[PROJECT] = "nuvola_folder_darkblue_open16.png";
by
- Code: Select all
relPaths[PROJECT] = "";
same for DATASET, PROJET_ANNOTATED and DATASET_ANNOTATED.
You are done.
>2. The project names are displayed in red and the names of datasets are displayed in blue.
Open the TreeCellRenderer file in agents.treeviewer.util,
Then add something like
- Code: Select all
if (ho instanceof ProjectData) setForeground(Color.RED);
else if (ho instanceof DatasetData)
setForeground(Color.BLUE);
>3. The names (project or dataset) can be modified by users.
cf. a previous post you submitted answered by will, go to the right panel and click on the edit button.
>4. The names of the images are not modifiable.
Open the file PropertiesUI in agents.metadata.editor
To do what you want, modify the method
- Code: Select all
buildUI()
>5. The button “Create a Dataset” is active only if one of the project components (datasets or images) is selected.
Open the CreateAction and CreateTopContainerAction in agents.treeviewer.actions.
To do what you want, modify the method
- Code: Select all
onDisplayChange(TreeImageDisplay selectedDisplay)
>6. A dataset can be deleted if and only if it does not contain an image.
>7. A project can be deleted if and only if it does not contain a Dataset.
Open the DeleteAction in agents.treeviewer.actions.
Modify the method
- Code: Select all
onDisplayChange(TreeImageDisplay selectedDisplay)
>8. When deleting a Dataset, i need to show a confirmation box.
Deletion is asynchronous, to notify the user when it is completed
Go to TreeViewerComponent in agents.treeviewer.view and
and add the code for the confirmation box
in the method
- Code: Select all
onNodesDeleted(Collection<DeletableObject> notDeleted)
That's it.
Jmarie