Home » Eclipse Projects » Nebula » Date/Calendar widgets - any validation support?(Ability to prevent selection of certain dates, or paint them in another colour?)
| |
Re: Date/Calendar widgets - any validation support? [message #494942 is a reply to message #494869] |
Tue, 03 November 2009 10:48 |
Justin Dolezy Messages: 68 Registered: July 2009 |
Member |
|
|
Eric Wuillai wrote on Mon, 02 November 2009 19:44 | I'm not able to respond for other Nebula calendars, but this is actually
not possible with DateChooser.
However it should be relatively simple to add. Please post a feature
request in bugzilla if you are interested.
For the alternate painting, DateChooser support the possibility to use a
different foreground color for non-business days. It is implemented by
default in the provided themes (except the new SYSTEM theme I just
commit today). And you can define your own themes with your own colors.
Regards,
Eric
>
|
Hi Eric,
That's great, I'll raise a feature request.
About the non-business days foreground painting - that currently treats weekends as non-business days iirc. I need to extend that so that local public holidays which fall during the week could also be painted as non-business days! Likewise for not being able to select them.. hence the need for a callback so the widget can query the application, if required, to ask if any of the dates in the displayed calendar are non-business days.
Hope I've explained that OK..
Best,
Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #495158 is a reply to message #494942] |
Tue, 03 November 2009 22:58 |
Laurent Marchal Messages: 91 Registered: July 2009 |
Member |
|
|
Hello,
This was my needs too, and I implemented this in my application. I have
created a patch and submitted it for integration, I hope it will be
merged one day.
This should fit your needs.
http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
Patch here :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
Hope this helps.
Laurent Marchal.
Justin Dolezy a écrit :
> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>> I'm not able to respond for other Nebula calendars, but this is actually
>> not possible with DateChooser.
>> However it should be relatively simple to add. Please post a feature
>> request in bugzilla if you are interested.
>>
>> For the alternate painting, DateChooser support the possibility to use a
>> different foreground color for non-business days. It is implemented by
>> default in the provided themes (except the new SYSTEM theme I just
>> commit today). And you can define your own themes with your own colors.
>>
>> Regards,
>> Eric
>> >
>
>
> Hi Eric,
>
> That's great, I'll raise a feature request.
>
> About the non-business days foreground painting - that currently treats
> weekends as non-business days iirc. I need to extend that so that local
> public holidays which fall during the week could also be painted as
> non-business days! Likewise for not being able to select them.. hence
> the need for a callback so the widget can query the application, if
> required, to ask if any of the dates in the displayed calendar are
> non-business days.
>
> Hope I've explained that OK..
>
> Best,
> Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #495772 is a reply to message #495158] |
Fri, 06 November 2009 00:02 |
Eric Wuillai Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi Justin, Laurent,
Laurent, I noticed the patch you proposed in bugzilla, but I was quite
busy the last months to find time to look really at it.
I made several modifications to DateChooser that I published at the
beginning of the week. Now I will look to add other features. I have
some idees to implement something like what is demanded here and will
look the patch you submitted to see how I can take it in account.
Features I would like to add :
- min / max date for the calendar
- a callback with several methods allowing for each date displayed to :
forbid the selection, change colors used, add a decorator indicating an
event on the date, add a tooltip, etc...
Any idee is welcome.
Regards,
Eric
Laurent Marchal a écrit :
> Hello,
>
> This was my needs too, and I implemented this in my application. I
> have created a patch and submitted it for integration, I hope it will be
> merged one day.
>
> This should fit your needs.
> http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
>
>
> Patch here :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
>
> Hope this helps.
> Laurent Marchal.
>
> Justin Dolezy a écrit :
>> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>>> I'm not able to respond for other Nebula calendars, but this is actually
>>> not possible with DateChooser.
>>> However it should be relatively simple to add. Please post a feature
>>> request in bugzilla if you are interested.
>>>
>>> For the alternate painting, DateChooser support the possibility to use a
>>> different foreground color for non-business days. It is implemented by
>>> default in the provided themes (except the new SYSTEM theme I just
>>> commit today). And you can define your own themes with your own colors.
>>>
>>> Regards,
>>> Eric
>>> >
>>
>>
>> Hi Eric,
>>
>> That's great, I'll raise a feature request.
>>
>> About the non-business days foreground painting - that currently
>> treats weekends as non-business days iirc. I need to extend that so
>> that local public holidays which fall during the week could also be
>> painted as non-business days! Likewise for not being able to select
>> them.. hence the need for a callback so the widget can query the
>> application, if required, to ask if any of the dates in the displayed
>> calendar are non-business days.
>>
>> Hope I've explained that OK..
>>
>> Best,
>> Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #495932 is a reply to message #495772] |
Fri, 06 November 2009 17:02 |
Laurent Marchal Messages: 91 Registered: July 2009 |
Member |
|
|
Hello,
The patch I made could fulfill your needs : It allows to forbids the
selection, customize colors used, and customize the tooltip for dates.
There is not support for a custom decorator, because my needs was to use
custom colors to display that there is an event on the date. To do this
I think you will need to add a paintListener on the date's label cell to
and draw a decorator on it.
I'm not sure to fully understand what is the min / max dates feature you
need for the calendar, but I had a kind of need like this. I had to
disable all selection on dates, and only enable selections on dates
where there are some events attached, then also change the color of the
date.
What I do is (with patch applied ;))
setCustomState(null, false); // disable selection on all dates
List<Date> minMaxDateList; // list of dates interval
foreach (Date date : minMaxDateList) {
setCustomState(date, true); // enable the date selection
setCustomColor(date, GREEN); // custom color
}
What I liked in my patch is that the customization was minimal to the
DateChooser.java file (few lines of code), and you can easily add
features (like the decorator) into the class
DateChooserTheme#CustomCellProperty.
I think lots of people would need theses kind of features, I hope we
could find a way to make theses features integrated upstream.
Regards.
Laurent Marchal.
Eric Wuillai a écrit :
> Hi Justin, Laurent,
>
> Laurent, I noticed the patch you proposed in bugzilla, but I was quite
> busy the last months to find time to look really at it.
> I made several modifications to DateChooser that I published at the
> beginning of the week. Now I will look to add other features. I have
> some idees to implement something like what is demanded here and will
> look the patch you submitted to see how I can take it in account.
>
> Features I would like to add :
> - min / max date for the calendar
> - a callback with several methods allowing for each date displayed to :
> forbid the selection, change colors used, add a decorator indicating an
> event on the date, add a tooltip, etc...
>
> Any idee is welcome.
>
> Regards,
> Eric
>
> Laurent Marchal a écrit :
>> Hello,
>>
>> This was my needs too, and I implemented this in my application. I
>> have created a patch and submitted it for integration, I hope it will be
>> merged one day.
>>
>> This should fit your needs.
>> http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
>>
>>
>> Patch here :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
>>
>> Hope this helps.
>> Laurent Marchal.
>>
>> Justin Dolezy a écrit :
>>> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>>>> I'm not able to respond for other Nebula calendars, but this is actually
>>>> not possible with DateChooser.
>>>> However it should be relatively simple to add. Please post a feature
>>>> request in bugzilla if you are interested.
>>>>
>>>> For the alternate painting, DateChooser support the possibility to use a
>>>> different foreground color for non-business days. It is implemented by
>>>> default in the provided themes (except the new SYSTEM theme I just
>>>> commit today). And you can define your own themes with your own colors.
>>>>
>>>> Regards,
>>>> Eric
>>>
>>> Hi Eric,
>>>
>>> That's great, I'll raise a feature request.
>>>
>>> About the non-business days foreground painting - that currently
>>> treats weekends as non-business days iirc. I need to extend that so
>>> that local public holidays which fall during the week could also be
>>> painted as non-business days! Likewise for not being able to select
>>> them.. hence the need for a callback so the widget can query the
>>> application, if required, to ask if any of the dates in the displayed
>>> calendar are non-business days.
>>>
>>> Hope I've explained that OK..
>>>
>>> Best,
>>> Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #598583 is a reply to message #494869] |
Tue, 03 November 2009 10:48 |
Justin Dolezy Messages: 68 Registered: July 2009 |
Member |
|
|
Eric Wuillai wrote on Mon, 02 November 2009 19:44
> I'm not able to respond for other Nebula calendars, but this is actually
> not possible with DateChooser.
> However it should be relatively simple to add. Please post a feature
> request in bugzilla if you are interested.
>
> For the alternate painting, DateChooser support the possibility to use a
> different foreground color for non-business days. It is implemented by
> default in the provided themes (except the new SYSTEM theme I just
> commit today). And you can define your own themes with your own colors.
>
> Regards,
> Eric
> >
Hi Eric,
That's great, I'll raise a feature request.
About the non-business days foreground painting - that currently treats weekends as non-business days iirc. I need to extend that so that local public holidays which fall during the week could also be painted as non-business days! Likewise for not being able to select them.. hence the need for a callback so the widget can query the application, if required, to ask if any of the dates in the displayed calendar are non-business days.
Hope I've explained that OK..
Best,
Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #598590 is a reply to message #598583] |
Tue, 03 November 2009 22:58 |
Laurent Marchal Messages: 91 Registered: July 2009 |
Member |
|
|
Hello,
This was my needs too, and I implemented this in my application. I have
created a patch and submitted it for integration, I hope it will be
merged one day.
This should fit your needs.
http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
Patch here :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
Hope this helps.
Laurent Marchal.
Justin Dolezy a écrit :
> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>> I'm not able to respond for other Nebula calendars, but this is actually
>> not possible with DateChooser.
>> However it should be relatively simple to add. Please post a feature
>> request in bugzilla if you are interested.
>>
>> For the alternate painting, DateChooser support the possibility to use a
>> different foreground color for non-business days. It is implemented by
>> default in the provided themes (except the new SYSTEM theme I just
>> commit today). And you can define your own themes with your own colors.
>>
>> Regards,
>> Eric
>> >
>
>
> Hi Eric,
>
> That's great, I'll raise a feature request.
>
> About the non-business days foreground painting - that currently treats
> weekends as non-business days iirc. I need to extend that so that local
> public holidays which fall during the week could also be painted as
> non-business days! Likewise for not being able to select them.. hence
> the need for a callback so the widget can query the application, if
> required, to ask if any of the dates in the displayed calendar are
> non-business days.
>
> Hope I've explained that OK..
>
> Best,
> Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #598598 is a reply to message #495158] |
Fri, 06 November 2009 00:02 |
Eric Wuillai Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi Justin, Laurent,
Laurent, I noticed the patch you proposed in bugzilla, but I was quite
busy the last months to find time to look really at it.
I made several modifications to DateChooser that I published at the
beginning of the week. Now I will look to add other features. I have
some idees to implement something like what is demanded here and will
look the patch you submitted to see how I can take it in account.
Features I would like to add :
- min / max date for the calendar
- a callback with several methods allowing for each date displayed to :
forbid the selection, change colors used, add a decorator indicating an
event on the date, add a tooltip, etc...
Any idee is welcome.
Regards,
Eric
Laurent Marchal a écrit :
> Hello,
>
> This was my needs too, and I implemented this in my application. I
> have created a patch and submitted it for integration, I hope it will be
> merged one day.
>
> This should fit your needs.
> http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
>
>
> Patch here :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
>
> Hope this helps.
> Laurent Marchal.
>
> Justin Dolezy a écrit :
>> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>>> I'm not able to respond for other Nebula calendars, but this is actually
>>> not possible with DateChooser.
>>> However it should be relatively simple to add. Please post a feature
>>> request in bugzilla if you are interested.
>>>
>>> For the alternate painting, DateChooser support the possibility to use a
>>> different foreground color for non-business days. It is implemented by
>>> default in the provided themes (except the new SYSTEM theme I just
>>> commit today). And you can define your own themes with your own colors.
>>>
>>> Regards,
>>> Eric
>>> >
>>
>>
>> Hi Eric,
>>
>> That's great, I'll raise a feature request.
>>
>> About the non-business days foreground painting - that currently
>> treats weekends as non-business days iirc. I need to extend that so
>> that local public holidays which fall during the week could also be
>> painted as non-business days! Likewise for not being able to select
>> them.. hence the need for a callback so the widget can query the
>> application, if required, to ask if any of the dates in the displayed
>> calendar are non-business days.
>>
>> Hope I've explained that OK..
>>
>> Best,
>> Justin
|
|
|
Re: Date/Calendar widgets - any validation support? [message #598606 is a reply to message #495772] |
Fri, 06 November 2009 17:02 |
Laurent Marchal Messages: 91 Registered: July 2009 |
Member |
|
|
Hello,
The patch I made could fulfill your needs : It allows to forbids the
selection, customize colors used, and customize the tooltip for dates.
There is not support for a custom decorator, because my needs was to use
custom colors to display that there is an event on the date. To do this
I think you will need to add a paintListener on the date's label cell to
and draw a decorator on it.
I'm not sure to fully understand what is the min / max dates feature you
need for the calendar, but I had a kind of need like this. I had to
disable all selection on dates, and only enable selections on dates
where there are some events attached, then also change the color of the
date.
What I do is (with patch applied ;))
setCustomState(null, false); // disable selection on all dates
List<Date> minMaxDateList; // list of dates interval
foreach (Date date : minMaxDateList) {
setCustomState(date, true); // enable the date selection
setCustomColor(date, GREEN); // custom color
}
What I liked in my patch is that the customization was minimal to the
DateChooser.java file (few lines of code), and you can easily add
features (like the decorator) into the class
DateChooserTheme#CustomCellProperty.
I think lots of people would need theses kind of features, I hope we
could find a way to make theses features integrated upstream.
Regards.
Laurent Marchal.
Eric Wuillai a écrit :
> Hi Justin, Laurent,
>
> Laurent, I noticed the patch you proposed in bugzilla, but I was quite
> busy the last months to find time to look really at it.
> I made several modifications to DateChooser that I published at the
> beginning of the week. Now I will look to add other features. I have
> some idees to implement something like what is demanded here and will
> look the patch you submitted to see how I can take it in account.
>
> Features I would like to add :
> - min / max date for the calendar
> - a callback with several methods allowing for each date displayed to :
> forbid the selection, change colors used, add a decorator indicating an
> event on the date, add a tooltip, etc...
>
> Any idee is welcome.
>
> Regards,
> Eric
>
> Laurent Marchal a écrit :
>> Hello,
>>
>> This was my needs too, and I implemented this in my application. I
>> have created a patch and submitted it for integration, I hope it will be
>> merged one day.
>>
>> This should fit your needs.
>> http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg01554.html
>>
>>
>> Patch here :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=248394
>>
>> Hope this helps.
>> Laurent Marchal.
>>
>> Justin Dolezy a écrit :
>>> Eric Wuillai wrote on Mon, 02 November 2009 19:44
>>>> I'm not able to respond for other Nebula calendars, but this is actually
>>>> not possible with DateChooser.
>>>> However it should be relatively simple to add. Please post a feature
>>>> request in bugzilla if you are interested.
>>>>
>>>> For the alternate painting, DateChooser support the possibility to use a
>>>> different foreground color for non-business days. It is implemented by
>>>> default in the provided themes (except the new SYSTEM theme I just
>>>> commit today). And you can define your own themes with your own colors.
>>>>
>>>> Regards,
>>>> Eric
>>>
>>> Hi Eric,
>>>
>>> That's great, I'll raise a feature request.
>>>
>>> About the non-business days foreground painting - that currently
>>> treats weekends as non-business days iirc. I need to extend that so
>>> that local public holidays which fall during the week could also be
>>> painted as non-business days! Likewise for not being able to select
>>> them.. hence the need for a callback so the widget can query the
>>> application, if required, to ask if any of the dates in the displayed
>>> calendar are non-business days.
>>>
>>> Hope I've explained that OK..
>>>
>>> Best,
>>> Justin
|
|
|
Goto Forum:
Current Time: Fri Sep 20 23:50:03 GMT 2024
Powered by FUDForum. Page generated in 0.04125 seconds
|