Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Programmatically Focus on Workarea
Programmatically Focus on Workarea [message #584838] Tue, 16 March 2010 13:35 Go to next message
Matthias is currently offline MatthiasFriend
Messages: 52
Registered: September 2009
Member
Hi there,

i couldn't find a way to programmatically set the focus on the workarea after clicking the submodule node in the navigatin area. in other words: i need the behaviour of the Riena Keyboard Navigation "Focus on Workarea - F7", but automatically.
Is it possible to set the focus to a certain ridget afterwards, instead of only the first ridget in the ui? I also couldn't set the default button with setDefaultButton(IActionRidget).

matthias
Re: Programmatically Focus on Workarea [message #584847 is a reply to message #584838] Wed, 17 March 2010 07:01 Go to previous messageGo to next message
Elias Volanakis is currently offline Elias VolanakisFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Matthias,

the F7 shortcut or clicking in the navigation just invokes the view's #setFocus() method (i.e. same as in RCP). If you want to change the behavior just overwrite it and focus somewhere else. Try this:

public void setFocus() {
if (canRestoreFocus()) {
super.setFocus();
} else {
// your stuff
}
}

Regarding setDefaultButton(): please post more details and the version of Riena you are using. A snippet would be best.

Kind regards,
Elias.
--
Elias Volanakis | http://eclipsesource.com
elias (AT) eclipsesource.com | @evolanakis


Elias Volanakis | http://eclipsesource.com
elias (AT) eclipsesource.com | @evolanakis
Re: Programmatically Focus on Workarea [message #584883 is a reply to message #584838] Mon, 22 March 2010 07:20 Go to previous message
Matthias is currently offline MatthiasFriend
Messages: 52
Registered: September 2009
Member
Hi Elias,
thanks for the solution.
meanwhile i migrated to Riena 2.0.0 M3. i much appreciate the changes, setting default button for each widget is a great thing.
Previous Topic:Programmatically Focus on Workarea
Next Topic:'org.hibernate.collection.PersistentSet' is an unknown class
Goto Forum:
  


Current Time: Sat Apr 20 01:20:16 GMT 2024

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

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

Back to the top