Thread: [Microba-controls] Clearing calendar selection or choosing month
Brought to you by:
michaelbaranov
From: Greg C. <cau...@gm...> - 2008-08-12 14:01:08
|
Hi I would like to clear the calendar selection (the blue on the calendar) without resetting the month. So if you look at this picture you can see 3 calendars but only the first calendar should have a date selected http://www.patientos.org/forum_temp/v82highlight.png But when I set the other calendars dates to null it flips the month drop down selection back to the current month instead of sticking with the two future months. Is this possible? I guess if I can choose a month without selecting a date would achieve the same goal. thanks! Greg |
From: Michael B. <mic...@gm...> - 2008-08-12 17:45:41
|
Greg, I'm not sure if it can be easily done. In fact it's a *very* specific behavior, but I know what you need. I can try to fix this for you. The question is what API do you think is right for this? Michael. > Hi I would like to clear the calendar selection (the blue on the > calendar) without resetting the month. So if you look at this picture > you can see 3 calendars but only the first calendar should have a date > selected > > http://www.patientos.org/forum_temp/v82highlight.png > > But when I set the other calendars dates to null it flips the month > drop down selection back to the current month instead of sticking with > the two future months. > > Is this possible? I guess if I can choose a month without selecting a > date would achieve the same goal. > > thanks! > > Greg > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > |
From: Greg C. <cau...@gm...> - 2008-08-12 18:12:09
|
Awefully nice of you if you can. I was thinking of a few options on CalendarPane a) setDate(null) change so it does not change the currently selected month of course that might affect your community b) setMonth(int month) which just changes the month and the calendar but does not select a date. Perhaps that is a little funky behaviour though so how about c) clearSelection() which clears the selection but hang on now you have got me thinking c) is probably already possible... actually no I just checked - I thought I might be able to change the foreground color selection to white to hide it - but it looks like the color map cannot be modified at runtime? On 8/12/08, Michael Baranov <mic...@gm...> wrote: > Greg, > I'm not sure if it can be easily done. In fact it's a *very* specific > behavior, but I know what you need. > I can try to fix this for you. The question is what API do you think is > right for this? > > Michael. > > Hi I would like to clear the calendar selection (the blue on the > > calendar) without resetting the month. So if you look at this picture > > you can see 3 calendars but only the first calendar should have a date > > selected > > > > http://www.patientos.org/forum_temp/v82highlight.png > > > > But when I set the other calendars dates to null it flips the month > > drop down selection back to the current month instead of sticking with > > the two future months. > > > > Is this possible? I guess if I can choose a month without selecting a > > date would achieve the same goal. > > > > thanks! > > > > Greg > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win great prizes > > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > -- Greg Caulton Principal PatientOS Inc. Cell: (857) 869-0394 Fax: (857) 241-3022 |
From: Michael B. <mic...@gm...> - 2008-08-12 18:29:42
|
Greg, DatePicker is derived from CalendarPane so I don't want DatePicker to inherit methods that are not related to it from CalendarPane. However, I see a way -- use UI delegate which are different for DatePicker and CalendarPane. The code might look something like this: CalendarPanelUI ui = (CalendarPanelUI) cPanel.getUI(); ui.observeMonth(2009, Calendar.MAY); What about this? This will take care of your special needs... Michael. > Awefully nice of you if you can. I was thinking of a few options on > CalendarPane > > a) setDate(null) change so it does not change the currently selected month > of course that might affect your community > > b) setMonth(int month) which just changes the month and the calendar > but does not select a date. Perhaps that is a little funky behaviour > though so how about > > c) clearSelection() which clears the selection > > but hang on now you have got me thinking c) is probably already > possible... actually no I just checked - I thought I might be able to > change the foreground color selection to white to hide it - but it > looks like the color map cannot be modified at runtime? |
From: Greg C. <cau...@gm...> - 2008-08-12 18:41:51
|
Looks good to me ! I assume that is still a code change for you ( I don't have a CalendarPanelUI right) On 8/12/08, Michael Baranov <mic...@gm...> wrote: > Greg, > DatePicker is derived from CalendarPane so I don't want DatePicker to > inherit methods that are not related to it from CalendarPane. However, I > see a way -- use UI delegate which are different for DatePicker and > CalendarPane. The code might look something like this: > > CalendarPanelUI ui = (CalendarPanelUI) cPanel.getUI(); > ui.observeMonth(2009, Calendar.MAY); > > What about this? This will take care of your special needs... > Michael. > > Awefully nice of you if you can. I was thinking of a few options on > > CalendarPane > > > > a) setDate(null) change so it does not change the currently selected month > > of course that might affect your community > > > > b) setMonth(int month) which just changes the month and the calendar > > but does not select a date. Perhaps that is a little funky behaviour > > though so how about > > > > c) clearSelection() which clears the selection > > > > but hang on now you have got me thinking c) is probably already > > possible... actually no I just checked - I thought I might be able to > > change the foreground color selection to white to hide it - but it > > looks like the color map cannot be modified at runtime? > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > -- Greg Caulton Principal PatientOS Inc. Cell: (857) 869-0394 Fax: (857) 241-3022 |
From: Michael B. <mic...@gm...> - 2008-08-12 19:05:21
|
OK, I'll fix this for you. If I don't show up by the end of the week please bump it. Michael. > Looks good to me ! I assume that is still a code change for you ( I > don't have a CalendarPanelUI right) |
From: Michael B. <mic...@gm...> - 2008-08-12 18:33:10
|
Greg, a quick follow-up: The method still might be of value for the DatePicker -- it may forward the request to the dropdown CalendarPane! Michael. |
From: Greg C. <cau...@gm...> - 2008-08-13 23:11:14
|
Works perfectly for me ! I am able to clear the selection, flip to a month without having a date selected - very cool stuff. thanks! Greg On 8/13/08, Michael Baranov <mic...@gm...> wrote: > Greg, > Please test this. Make sure it works as expected both for DatePicker and > CalendarPane itself. > > Michael. > > > Looks good to me ! I assume that is still a code change for you ( I > > don't have a CalendarPanelUI right) > > > > On 8/12/08, Michael Baranov <mic...@gm...> wrote: > > > > > > > Greg, > > > DatePicker is derived from CalendarPane so I don't want DatePicker to > > > inherit methods that are not related to it from CalendarPane. However, I > > > see a way -- use UI delegate which are different for DatePicker and > > > CalendarPane. The code might look something like this: > > > > > > CalendarPanelUI ui = (CalendarPanelUI) cPanel.getUI(); > > > ui.observeMonth(2009, Calendar.MAY); > > > > > > What about this? This will take care of your special needs... > > > Michael. > > > > > > > > > > Awefully nice of you if you can. I was thinking of a few options on > > > > CalendarPane > > > > > > > > a) setDate(null) change so it does not change the currently selected > month > > > > of course that might affect your community > > > > > > > > b) setMonth(int month) which just changes the month and the calendar > > > > but does not select a date. Perhaps that is a little funky behaviour > > > > though so how about > > > > > > > > c) clearSelection() which clears the selection > > > > > > > > but hang on now you have got me thinking c) is probably already > > > > possible... actually no I just checked - I thought I might be able to > > > > change the foreground color selection to white to hide it - but it > > > > looks like the color map cannot be modified at runtime? > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > > Build the coolest Linux based applications with Moblin SDK & win great > prizes > > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > _______________________________________________ > > > Microba-controls mailing list > > > Mic...@li... > > > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > > > > > > > > > > > > > > > -- Greg Caulton Principal PatientOS Inc. Cell: (857) 869-0394 Fax: (857) 241-3022 |