Time editor in components

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Time editor in components

Postby tcorbin » Fri Apr 29, 2005 8:29 am

There are starting to be many calendar editor components, but I'm not so sure there are any/many time editor components.

Sure, I can code one, but I'd rather just get one.
tcorbin
 
Posts: 119
Joined: Thu Jan 20, 2005 8:25 am
Location: Virginia

Postby JIDE Support » Fri Apr 29, 2005 8:36 am

There are several possible way to do time editor. I at least have two in mind.

1. A spinner which is similar to date and time property in Windows
2. A combobox which allows user to choose fixed number of time (such as only 15, 30, 45, 00) like in Outlook meeting scheduler.

Any preference?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

A spinner or set of spinners would be great.

Postby tcorbin » Fri Apr 29, 2005 8:52 am

A spinner for each of hours, minutes, seconds, etc.

And a flag as to which of these components are desirable/visible.
tcorbin
 
Posts: 119
Joined: Thu Jan 20, 2005 8:25 am
Location: Virginia

Postby kkolumbu » Thu May 05, 2005 1:33 pm

Both options would be extremely useful, but the combobox option would probably be most useful for my situations and, I imagine, would be the quickest option to use as a cell renderer in a table.

Of course, the box should allow for both the 24 hour clock and the 12-hour am/pm clock (for us silly Americans). :D
kkolumbu
 
Posts: 28
Joined: Thu May 05, 2005 1:10 pm

Postby JIDE Support » Thu May 05, 2005 1:37 pm

Sounds like a plan. The combobox one should be really simply. Spinner one will be a little hard. It will be a while before we can get on to this new component. So if you guys (or other readers) decide to make (or already made) one yourself and are willing to share it with us, it will be great too. We can then polish it and include in our library.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

status of time editor

Postby hvastani » Tue Jan 10, 2006 3:50 pm

Hi,
My company is considering purchasing JIDE components. But we need a date combo box with time selection features. Since you alluded in your last post in this thread that it will be incorporated, can you tell me whats the status of this feature? I can't seem to find it in javadoc/samples.

Thanks.
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 4:15 pm

There is a DateSpinner component we introduced. It is use spinner instead of combobox as interface to edit time. You can see it in action at
DateSpinnerDemo.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Tue Jan 10, 2006 5:01 pm

DateSpinner doesn't help me. And besides, Java 1.4+ comes with its own date spinner. What I need is an enhanced DateComboBox that also allows the user to select the hour of the day.

Thanks.
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 5:04 pm

In fact, DateSpinner is just a tweak version of JDK's date spinner.

So refering to my original post where I said there are two options. Are you looking for option 2?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Tue Jan 10, 2006 5:06 pm

Yes, option 2. I need a an enhanced DateComboBox that also allows specifiying the hour of day.
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 5:09 pm

That I understand. But do you want the same DateComboBox to choose both date and hour or this one is only used to choose hour? I thought a simple JComboBox will do the job with the latter case.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Tue Jan 10, 2006 5:11 pm

Yes, I'll need the time selection to be on the same popup panel. So the user can select the date and time on the same poup panel.
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 5:14 pm

Got you. That's not what I originally planed but we can make it since it's good feature to add.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Tue Jan 10, 2006 5:37 pm

That would be wonderful. But we need to get started on our project soon so we'll be looking at purchasing in a few days. How long will a stable version take?

So to reiterate the requirement:
1. Enhanced DateComboBox with time selection.
2. Allows configuring time selection e.g. show/hide hour/min/sec
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 5:43 pm

Based on your post, I am thinking adding a DateSpinner at the bottom of DateChooserPanel (the popup for DateComboBox). Then in DateComboBox's text display area, we display time after the date. we Is it good enough?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Tue Jan 10, 2006 6:11 pm

Sounds fine. So I should be able to set the date format for the DateSpinner (HH AM/PM, 24 hr, etc) and be able to configure it to disable/hide the DateSpinner.
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby JIDE Support » Tue Jan 10, 2006 6:16 pm

Yap. Please give us two weeks to implement this feature and hopefully we can send you informal patch before that for you to test.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Time Editor component

Postby hvastani » Wed Jan 11, 2006 11:41 am

Thanks!
hvastani
 
Posts: 12
Joined: Fri Jan 06, 2006 1:37 pm

Postby evans.castonguay » Tue Jan 17, 2006 9:08 am

JIDE Support wrote:Based on your post, I am thinking adding a DateSpinner at the bottom of DateChooserPanel (the popup for DateComboBox). Then in DateComboBox's text display area, we display time after the date. we Is it good enough?

Thanks,


I doubt we could release the code, for reasons I can't go into, but I'll add some comments that would have helped me:

We went the extra mile and it was a PITA. We actually used a ComboBox with a spinner as an editor, giving you both a spinner and dropdown of times (including time differential from a start time, e.g. if the start time was 2:15, the end combobox list would show "2:30 (15 minutes)").

(Preface: we used sun's JSpinner and not Jide's DateSpinner, partially for historical reasons other reasons below)

1) you can set timezone on the dateformat in hte editor used in the spinner
2) the event path from the timeComboBox ended up stripping out the date more often than not: the JFormattedTextField in the spinner would call commitEdit(), causing the time to be formatted (e.g. "10:23") resulting in a Date object with the value "Jan 1 1970, 10:23". If this was pushed into your Value then your DateComboBox would pop to 1970. Extremely unpleasant.

It also made it hard to have the time Spinner roll the day over.

IIRC, you basically had to observe the state of the Value and the time String, and depending on whether they were the same or not, you could tell if the user typed it, used the spinner, or used the combobox, and plug the date back into the component as appropriate.

I did look at using the DateSpinner, but quickly backed out of it. I don't recall offhand why, but I suspect it is because I wanted the spinner minute increment to be 5, not one, and was concerned that if I replaced the DateSpinner's model with a custom one I woudl lose behaviour. It could also be that I needed to subclass the editor in order to rewrite the date into the Value before the Spinners changeEvent was fired.

---------------------------------------
start: DDDDDspCB TTTTTspCB

end: DDDDDspCB TTTTTspCB
---------------------------------------
where
DDDDDD= Textfield with formatted dates
sp = spinner buttons
CB = combobox, calendar icon for dates, clock icon for times
TTTTT = Textfield for formatted times

You eventually end up with 6 controllers for a single value, and that's not including datamodel binding, nor linking to a startmodel to an endmodel.

There was definitely a point when I thought it would be easier to re-write JSpinner to not use ChangeEvents, but be more specific about the changes, i.e. a button-based increment or decrement.

This is from memory, one that feels a lot like a bad hangover. good luck!

(j. longman using e. castonguay's account)
evans.castonguay
 
Posts: 29
Joined: Wed Sep 01, 2004 2:35 pm

has this been included in a patch release yet?

Postby kbrooks@crossroads.com » Wed Mar 01, 2006 11:31 am

Hi,
We need a datecombo with a time compoent also. Has this feature been added yet?
Thanks,
Kirsten
kbrooks@crossroads.com
 
Posts: 22
Joined: Tue May 24, 2005 11:52 am

Postby JIDE Support » Wed Mar 01, 2006 11:35 am

We just uploaded a pre-release at http://www.jidesoft.com/downloads/jide.1.9.0.zip where we added time capability to DateComboBox.

You can refer to ComboBoxDemo for an example. It has one combobox that can display time. One thing I know we should do is an OK button. In previous version, clicking on day label will hide the popup. But with the addition of time spinner, that’s not enough. So I am thinking adding an OK button but was troubled by where to put it. Anyway, let me know if you have other better ideas?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 63 guests