Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Maximize/Restore events(How to get the view maximize & restore events(not the Window/shell event))
Maximize/Restore events [message #854613] Tue, 24 April 2012 05:11 Go to next message
srilatha yatham is currently offline srilatha yathamFriend
Messages: 4
Registered: April 2012
Junior Member
Hi,

I am new to Eclipse RCP development. I have 2 problems.
1. I have an application, which has 4 views that are displayed in 4 quadrants. I need to provide maximized view for all the 4 views. I don't know how to capture the maximize/restore event for views, for the shell the event listeners are working fine. But i need to capture the events for views. Please let me know a way to capture the event.

2. I set closeable="false" for all the views, but it is providing close(X) for all the views.


Thanks
Srilatha
Re: Maximize/Restore events [message #855936 is a reply to message #854613] Wed, 25 April 2012 08:10 Go to previous messageGo to next message
srilatha yatham is currently offline srilatha yathamFriend
Messages: 4
Registered: April 2012
Junior Member
Resolved the problem by adding perspective listener to the workbench window, for capturing the maximize/minimize/restore events. And also used IWorkbenchPage's getPartState() for checking the state of the views.
Re: Maximize/Restore events [message #857197 is a reply to message #855936] Thu, 26 April 2012 10:31 Go to previous messageGo to next message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hi srilatha yatham,

I had a similar issue a few days ago : www.eclipse.org/forums/index.php/t/333941/

Which event do you actually capture?
Is it:
public void perspectiveChanged(IWorkbenchPage page,
            IPerspectiveDescriptor perspective,
            IWorkbenchPartReference partRef, String changeId);

of the IPerspectiveListener4?

I used your hint with the perspective listener, but unfortunately it fires the event before the perspective is maximized and therefore I have to wait for a second and then can restore another view than the maximized one.
Does anyone know an event which is fired after a IWorkbenchpart is maximized?

Regards,

Simon
Re: Maximize/Restore events [message #864863 is a reply to message #857197] Mon, 30 April 2012 05:45 Go to previous message
srilatha yatham is currently offline srilatha yathamFriend
Messages: 4
Registered: April 2012
Junior Member
Hi Simon,

Yes i am using the perspectiveChanged() for tracking events. I am using GridLayout for my views, my problem was when i maximize the view content is not getting maximized. So for setting the heightHint and widthHint of GridData, i need to capture the maximize and minimize events. If i maximize/minimize the view, the perspectiveChanged is fired and the no. of viewReferences vary accordingly. So with the use of no. of ViewReferences and one toggling flag i am able to capture those events. But for showing the content maximized or restored, i am hiding and showing views. This is weird, but i have no other go. If you could suggest me some other kind of solution, it would be helpful for me.

Thanks in Advance
Srilatha.

[Updated on: Mon, 30 April 2012 05:46]

Report message to a moderator

Previous Topic:Custom Contectmenu with toolbar
Next Topic:p2 update on read-only file system
Goto Forum:
  


Current Time: Sat Nov 29 00:11:46 GMT 2014

Powered by FUDForum. Page generated in 0.16032 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software