We're Hiring!

Working with Tabs

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Working with Tabs

Postby dskanth » Wed Aug 26, 2009 1:27 pm

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.
Last edited by dskanth on Tue Sep 22, 2009 5:25 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Working with Tabs

Postby dskanth » Thu Aug 27, 2009 8:43 am

which files do i need to modify ?
Last edited by dskanth on Tue Sep 22, 2009 5:25 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Working with Tabs

Postby jburel » Thu Aug 27, 2009 9:17 am

Are you referring to insight?
If this is the case, what can of new tabs do you need?

jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Working with Tabs

Postby dskanth » Thu Aug 27, 2009 9:31 am

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..... :)
Last edited by dskanth on Tue Sep 22, 2009 5:29 am, edited 2 times in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Working with Tabs

Postby jburel » Thu Aug 27, 2009 10:56 am

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
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Working with Tabs

Postby dskanth » Thu Aug 27, 2009 11:03 am

Yes, i would like to know the coding changes that are needed to achieve these changes.
Iam well versed with java code.
Last edited by dskanth on Tue Sep 22, 2009 5:30 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Working with Tabs

Postby cxallan » Thu Aug 27, 2009 4:17 pm

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.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Working with Tabs

Postby dskanth » Fri Aug 28, 2009 4:35 am

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.
Last edited by dskanth on Tue Sep 22, 2009 5:32 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Working with Tabs

Postby jmoore » Fri Aug 28, 2009 6:55 am

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Working with Tabs

Postby jburel » Fri Aug 28, 2009 8:17 am

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
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Next

Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron