Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » CalendarField item selection notification
CalendarField item selection notification [message #1219697] Thu, 05 December 2013 12:55 Go to next message
Dominic Hanlan is currently offline Dominic HanlanFriend
Messages: 98
Registered: July 2009
Member
Hi,

I am using the SWT CalendarField. Great!! But how do I detect calendar item selections. I have tried various listeners but they all seem to relate to the date changing.

What I'm trying to do is change the visible menu items depending on the selected item. This works when using a menu system on a table as I get the selected row.

Any ideas??

/Dominic
Re: CalendarField item selection notification [message #1219707 is a reply to message #1219697] Thu, 05 December 2013 13:56 Go to previous messageGo to next message
Dominic Hanlan is currently offline Dominic HanlanFriend
Messages: 98
Registered: July 2009
Member
Hi,

I can see that using the menu method;

protected void execPrepareAction() throws ProcessingException


I can get the required behavior. I guess I'm more used to a single selection point and setting all the menu conditions. This way I have to replicate the decision code for every menu.

Regards

Re: CalendarField item selection notification [message #1219867 is a reply to message #1219707] Fri, 06 December 2013 11:18 Go to previous message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 310
Registered: August 2011
Senior Member
Hi,

yes it is per menu item. Example:

@Override
protected void execPrepareAction() throws ProcessingException {
   ICalendarItem item = getCalendar().getSelectedItem(ICalendarItem.class);
   this.setEnabled(item.getSubject != null);
}
Previous Topic:Canceling a processing request (Busy handler custom implementation?)
Next Topic:How to run an applet in RAP client
Goto Forum:
  


Current Time: Sun Dec 21 02:08:34 GMT 2014

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

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