Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] CalendarCombo + CDateTime Mashup

Sorry for the slow reply on my part, I'm still travelling around and won't be fully settled until end of January, in any case...
 
Including time in the CalendarCombo would certainly be interesting, however there would be a few implementation problems undoubtedly. Also, that would take it away from the office look and feel, as the office popup does not do time. I'm not sure how many use it purely for look and feel and how many use it purely for native look or other reasons, but I'm mentioning it just in case.
 
First, the one hurdle that is tricky is the fact that the calendar popup itself is a shell that cannot handle much input without disposing, due to the way the "native" feel of it has been implemented (it was a push to begin with). I have tried my very best quite a few times to make that shell allow me to do native-widget input without throwing various errors due to the fact that it tries to dispose itself. Another reason it is what it is - is because the shell should not steal focus from the parent app, which would look very strange. Perhaps I need to give it another go with a newer SWT version as things always change (the fact that it has two buttons on it still work, but if you look very "quickly" those buttons never depress before the shell disposes and does what the button does). But, if that problem persists, it would be near impossible to add combos and such to the popup shell that allow user input. Windows of course, can do it no problem, but some calls that allow shells to behave that way on windows are not cross platform or at least not in SWT yet.
 
Ok, that said, as far as implementation, I won't have time to do much until end of January myself due to where I am right now, but after that there should be no issues when I'm back on a "normal" schedule.
 
BTW, the writeup is very nice on what each widget does, I want to mention "multi select" dates which is on my todo list for the CalendarCombo, but hasn't been done yet. It shouldn't be too hard to implement I hope.
 
Emil

 
On 12/13/07, Peter Centgraf <peter@xxxxxxxxxxxx> wrote:
>From what I can tell, the CalendarCombo is distinguished by its custom date
picker and the fact that it uses a native Combo.  I can adapt the date
picker to work with CDateTime, but I can't use a native Combo without losing
features.  I personally don't know what advantages the native Combo offers,
so I'm not sure whether we should eliminate it.  If it isn't important, we
could roll all of the CalendarCombo code into CDateTime and retire it as a
separate sub-project.  I'd love to have other CDateTime committers.  Emil,
what do you think?

Here's a preview of what I want to put on the wiki about the various date
selector widgets....

DateTime:

Full native implementation
   - Integrates well with every SWT platform
   - Does not support custom visual styles, such as SWT.FLAT
   - Does not include a graphical time picker
   - Does not support custom string formats
   - Does not support editing date and time simultaneously
   - Native style keyboard input
Supports a stand-alone calendar mode, but not a formatted text mode
Field-based data model
   - Localization always matches global platform default
   - Difficult to bind to Java Date or Calendar types
   - Supports single-selection only


CDateTime:

Uses a custom combo box implementation
   - Supports SWT.FLAT style
   - May not behave like a default platform Combo
Supports multiple date and time pickers
   - Includes a unique analog-clock style time picker
   - Default date picker looks more like GTK than Win32 native
   - Supports editing date, time, or both simultaneously
Supports a stand-alone formatted text mode, but not a calendar mode
Supports custom string formats
   - Values can be edited field-by-field
   - String format may be customized on each instance
     (not limited to JVM Locale defaults)
Keyboard input
   - Rich support for arrow keys, scroll wheel, etc.
   - Field-based tab navigation
Both fine-grained and coarse-grained change events
   - Client code can choose to ignore intermediate states
Data model is a Java Date
   - Easy to bind to domain objects with Date or Calendar data type
   - Supports single-selection only


CalendarCombo:

Combines a native Combo with a custom date picker
   - Does not support SWT.FLAT on Windows
   - Looks and acts native on every SWT platform
   - Date picker looks like MS Outlook widget
     (not like Win32 native widget)
Does not support stand-alone calendar or formatted text modes
Supports custom string formats
   - String format may be customized on each instance
No support for keyboard input
No support for time component
Data model is Java Calendar
   - Easy to bind to domain objects with Date or Calendar data type
     (as long as you don't care about the time component)
   - Supports single-selection only


DateChooserCombo

Uses a custom combo box implementation
   - Supports SWT.FLAT style
   - Supports a custom button graphic
   - May not behave like a default platform Combo
Uses a custom date picker
   - Customizable color themes
   - Supports display of week numbers
   - Does not match any native implementation
   - No time picker
Suppports both stand-alone calendar and formatted text modes
Supports custom string formats
   - String format may be customized on each instance
   - Time can be edited via text, but not graphically
Keyboard input
   - Supports use of arrow keys but not the scroll wheel
   - No field-based tab navigation
Data model is a Java Date or Collection<Date>
   - Easy to bind to domain objects with Date or Calendar data type
   - Supports single-selection in combo mode, single- or multi-selection
     in stand-alone calendar mode


Does anyone else have something to add or corrections to make?  I'm going to
turn this into a matrix layout before I post it to the wiki.

--
Peter

-----Original Message-----
From: nebula-dev-bounces@xxxxxxxxxxx [mailto:nebula-dev-bounces@xxxxxxxxxxx ]
On Behalf Of Chris Gross
Sent: Wednesday, December 12, 2007 10:26 AM
To: Nebula Dev
Subject: Re: [nebula-dev] CalendarCombo + CDateTime Mashup

Hi Peter,

Hmm... I think your email points that we need some unification of our
datetime widgets.  It sounds like you'd like to include the calendar
popup from CalendarCombo with the date modification portion of
CDateTime.  I wonder if you and Emil could work on something to
completely combine the two widgets?

Is that something that sounds interesting to you Peter?  Emil?

Regards,
-Chris


_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev



--

Emil Crumhorn - emil.crumhorn@xxxxxxxxx
Senior Software Engineer
http://www.hexapixel.com/

Back to the top