We're Hiring!

CLOSED: Task panes instead of 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 pane is empty !

Postby dskanth » Tue Sep 08, 2009 12:29 pm

When i expand the Images taskpane and click on a image, it is not shown in the working pane. (But i could see the images in the working pane, from the Projects taskpane).
Last edited by dskanth on Tue Sep 22, 2009 4:58 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Task panes instead of Tabs

Postby jburel » Sat Sep 12, 2009 8:04 am

Hi
This is probably due to the fact that you have not attached listener to the new UI.
in the TreeViewerWin, we register the tab pane with the controller so that we know
which browser is the current one i.e. project, tags etc.
You will have to attach listener to the taskpane and identify which browser is selected.
This is a bit more difficult than with tab pane if you want to allow multiple taskpane expanded at the same.
If you only have one expanded at the time, that's pretty straightforward
You need to add a property listener to the JXtaskPane and listen
to the collapsed property, Unfortunately the property name is not exposed in JXtaskPane
so I have added a static field UIUtilities.COLLAPSED_PROPERTY_JXTASKPANE to identify the property name.
When this is in place,it should work fine

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

Re: Task panes instead of Tabs

Postby dskanth » Sun Sep 13, 2009 6:03 am

Jmarie, thanks for your reply. I have only one expanded at a time, so it seems ok.
Last edited by dskanth on Tue Sep 22, 2009 5:01 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Task panes instead of Tabs

Postby jburel » Tue Sep 15, 2009 9:00 am

You don't need to create a taskPanelistener
Just taskpane.addPRopertyListener(TreeViewerControl) and do what you want to do when you listen to the property

db =null if you have no browser displaying thumbnail.

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

Re: Task panes instead of Tabs

Postby dskanth » Tue Sep 15, 2009 12:48 pm

Thanks Jmarie, but when i added: taskpane.addPropertyListener(PropertyChangeListener());
it says: The method addPropertyListener(PropertyChangeListener) is undefined for the type JXTaskPane.
Do i need to add UIListeners to all the taskpanes ?
Last edited by dskanth on Tue Sep 22, 2009 5:06 am, edited 3 times in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Task panes instead of Tabs

Postby dskanth » Fri Sep 18, 2009 6:25 am

It seems the UIListeners are not properly attached to the taskpanes.
Last edited by dskanth on Tue Sep 22, 2009 5:03 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Task panes instead of Tabs

Postby jburel » Fri Sep 18, 2009 8:22 am

Of course you need to attach the listener to the each taskpane.
As I said in a previous post, you should only allow one taskpane expanded at a time
so you can determine the active browser.
So when one is expanded, you close the other ones, then set the active browser..
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Task panes instead of Tabs

Postby dskanth » Sat Sep 19, 2009 7:43 am

Hi, now i have added listeners to each taskpane.
I dont understand how to set the active browser. If it is already available, please let me know.
Last edited by dskanth on Tue Sep 22, 2009 5:07 am, edited 1 time in total.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Task panes instead of Tabs

Postby jburel » Mon Sep 21, 2009 8:08 am

You should have a browser in each task pane and attach a property listener
When you expand a task pane, the hosted browser should become your selected browser.
To set the selected browser, use the setSelectedBrowser(Browser) method in the TreeViewer. I thought the name was explicit enough.
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Task panes instead of Tabs

Postby dskanth » Mon Sep 21, 2009 9:04 am

Thanks a lot, now iam able to show the selected browser's items in the working pane.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

PreviousNext

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests