DateSpinner with date only [message #112900] |
Fri, 09 December 2005 20:08  |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
I am using eclipse 3.1.1 and the ve plugin. I am using the swing JSpinner
and the spinnerDateModel beans from J2SE 1.4.2 to create a date spinner.
Unfortunately, I am having a problem with eliminating the time in the
date. I want a non-time date only. Someone told me to use a string date
format property or method. I could not find it in the ve bean for
JSpinner. Can someone help me please?
|
|
|
|
|
|
|
|
|
|
Re: DateSpinner with date only [message #113624 is a reply to message #113613] |
Sun, 18 December 2005 09:44  |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
Thanks. I will enter the reguest. In fact, I meke it into the habit of
using eclipse bugzilla database when I when See some thing missing, having
problems or want an enhancement,.., etc. I will do anything to support my
visual or RAD programming. Thanks
|
|
|
Re: DateSpinner with date only [message #611525 is a reply to message #112900] |
Sat, 10 December 2005 12:37  |
Eclipse User |
|
|
|
Richard,
Unfortunately you can't directly set the date format from the Properties
view, because the format isn't a Java bean property of the DateEditor
class (it's specified in the constructor of the class). So you'll need
to edit the code by hand to achieve this. Try something like this:
private JSpinner getJSpinner() {
if (jSpinner == null) {
jSpinner = new JSpinner();
jSpinner.setBounds(new Rectangle(83, 41, 131, 29));
SpinnerDateModel spinnerDateModel = new SpinnerDateModel();
jSpinner.setModel(spinnerDateModel);
JSpinner.DateEditor editor = new JSpinner.DateEditor(jSpinner,
"MM/dd/yy");
jSpinner.setEditor(editor);
}
return jSpinner;
}
The date format specified in the DateEditor constructor is the format
used by the SimpleDateFormat class:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDate Format.html
Hope this helps,
- Jeff
Richard wrote:
> I am using eclipse 3.1.1 and the ve plugin. I am using the swing
> JSpinner and the spinnerDateModel beans from J2SE 1.4.2 to create a date
> spinner. Unfortunately, I am having a problem with eliminating the time
> in the date. I want a non-time date only. Someone told me to use a
> string date format property or method. I could not find it in the ve
> bean for JSpinner. Can someone help me please?
>
|
|
|
|
|
Re: DateSpinner with date only [message #611658 is a reply to message #112953] |
Sat, 17 December 2005 12:21  |
Eclipse User |
|
|
|
Why the VE implementors have not made all properties of the swing
components accessible in the VE beans? VE would be very robust and you
could it is RAD or Rapid Application Development if they did that.
|
|
|
Re: DateSpinner with date only [message #611661 is a reply to message #113574] |
Sat, 17 December 2005 17:10  |
Eclipse User |
|
|
|
Originally posted by: MFEMFEM.cboenospam.com
Richard wrote:
> Why the VE implementors have not made all properties of the swing
> components accessible in the VE beans? VE would be very robust and you
> could it is RAD or Rapid Application Development if they did that.
Have you tried the Show Advanced Properties button in the tool bar of
the Properties view?
|
|
|
Re: DateSpinner with date only [message #611662 is a reply to message #113587] |
Sat, 17 December 2005 20:47  |
Eclipse User |
|
|
|
Yes. I did. for some strange reason it replaced my JSpinner.DateEditor
instance and the setEditor statements and placed them in the getDateEditor
method. I tried reproduced that effect on another date spinner and I could
not do it.
|
|
|
Re: DateSpinner with date only [message #611663 is a reply to message #113574] |
Sun, 18 December 2005 09:37  |
Eclipse User |
|
|
|
As I explained in an earlier posting, the JSpinner class (or more
specifically the JSpinner Editor classes) does not follow the Java Beans
spec because some of its properties are specified in the constructor.
Because of this, support for these properties must be custom coded into
the Visual Editor. This hasn't been done for the JSpinner class yet -
but you can open a enhancement request to get support added here:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=VE&b ug_severity=enhancement
In the request specify which features/settings you'd like to set from
the Properties view, that aren't showing up now.
Thanks,
- Jeff
|
|
|
Re: DateSpinner with date only [message #611664 is a reply to message #113613] |
Sun, 18 December 2005 09:44  |
Eclipse User |
|
|
|
Thanks. I will enter the reguest. In fact, I meke it into the habit of
using eclipse bugzilla database when I when See some thing missing, having
problems or want an enhancement,.., etc. I will do anything to support my
visual or RAD programming. Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.05884 seconds