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 #521104] 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 #521288 is a reply to message #521104] 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
Re: Programmatically Focus on Workarea [message #522294 is a reply to message #521104] Mon, 22 March 2010 07:20 Go to previous message
Matthias is currently offline MatthiasFriend
Messages: 52
Registered: September 2009
Member
Hi Elias,
meanwhile i migrated to Riena 2.0.0 M6. i much appreciate the changes, setting default button now for each widget is great.

about focusing the workarea:
just clicking the navigation draws/shows the workarea but doesn't focus it. only F7 does that.
to be clear, "setting focus" mabye a little bit confusing here: i want to "switch" to the workarea without either clicking into it nor pressing F7.

[Updated on: Mon, 22 March 2010 10:18]

Report message to a moderator

Previous Topic:Default Logging
Next Topic:Programmatically Focus on Workarea
Goto Forum:
  


Current Time: Thu Mar 28 10:25:22 GMT 2024

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

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

Back to the top