Page 1 of 2

Working with Tabs

PostPosted: Wed Aug 26, 2009 1:27 pm
by dskanth
Hi, i would like to know, how can we configure tabs in Omero. How can i modify the tabs, add new tabs to the interface.

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 8:43 am
by dskanth
which files do i need to modify ?

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 9:17 am
by jburel
Are you referring to insight?
If this is the case, what can of new tabs do you need?

jmarie

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 9:31 am
by dskanth
Thanks for replying....
In visio insight (client), i see a Projects panel, and some items grouped under it.
Now in similar way, i want few additional panels below Projects panel. See the attached screenshot. ;)

For the Projects panel, i want to include 3 buttons - Create Project, Create Dataset, Delete Project/Dataset. These buttons (tiny icons) are to be placed near the other toolbar icons we have.

Also i want to modify few functionalities...

1. Remove the icons preceding the names of the project and datasets.
2. The project names are displayed in red and the names of datasets are displayed in blue.
3. The names (project or dataset) can be modified by users.
4. The names of the images are not modifiable.
5. The button “Create a Dataset” is active only if one of the project components (datasets or images) is selected.
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.
8. When deleting a Dataset, i need to show a confirmation box.

Please someone guide me in the right direction..... :)

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 10:56 am
by jburel
At this stage of the project, we offer a very limited number of UI configuration possibilities from the configuration files.
If you are confortable modifying the Java code, I can point you in the right direction.

Jmarie

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 11:03 am
by dskanth
Yes, i would like to know the coding changes that are needed to achieve these changes.
Iam well versed with java code.

Re: Working with Tabs

PostPosted: Thu Aug 27, 2009 4:17 pm
by cxallan
dskanth wrote:Yes, i would like to know the coding changes that are needed to achieve the above requirements.
Anyway, i just want to get the modifications i desire. Please help. :P


The source code is in a Subversion repository. You can find the links here:

http://www.openmicroscopy.org/site/community/links

You will need some Java and Swing knowledge to make these changes and you will have to familiarize yourself with the code before we can help you. Once you have done so and have specific questions, let us know.

Re: Working with Tabs

PostPosted: Fri Aug 28, 2009 4:35 am
by dskanth
I have knowledge of java and swings, though i have not used it for a long time.
Please you can guide me, so that i can do my level best.

Re: Working with Tabs

PostPosted: Fri Aug 28, 2009 6:55 am
by jmoore
Have you found the Insight trac for developers yet? You might want to start with some of these pages:

- https://trac.openmicroscopy.org.uk/shoo ... tationView
- https://trac.openmicroscopy.org.uk/shoo ... BuildAgent
- https://trac.openmicroscopy.org.uk/shoo ... dAgentView

Javadoc is available here: http://hudson.openmicroscopy.org.uk/job ... T/javadoc/ and if I'm not mistaken, you are interested in: org.openmicroscopy.shoola.agents.treeviewer.

Cheers,
~Josh

Re: Working with Tabs

PostPosted: Fri Aug 28, 2009 8:17 am
by jburel
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