Skip to main content

Anything wrong with this suggested patch for JXDatePicker?

4 replies [Last post]
osbald
Offline
Joined: 2003-06-13

(Copied from https://swingx.dev.java.net/issues/show_bug.cgi?id=235 - Probally just being frustrated by the timespace distortion surrounding JavaOne ;)

I was also wondering if there's anything wrong with adding a postActionEvent()
to the propertyChange handler in BasicDatePickerUI? This'll allow ActionEvents
to fire when the user enters a date manually and hits return. Currently nothing
fires unless the JXMonthView (dateselectionmodel) is involved.

i.e.

<br />
 } else if ("value".equals(property)) {<br />
   Date date = (Date) datePicker.getEditor().getValue();<br />
   datePicker.setDate(date);<br />
   datePicker.postActionEvent();   // <-- change<br />
   ...<br />

I'd also remove the postActionEvent() in BasicDatePickerPopup.actionPerformed() - the new postActionEvent() instance in propertyChange() will get called as a result of either change - albeit a little later.

- Richard

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Noel Grandin

I maintain my own local CVS repo, which has my changes in it, and I
periodically merge the latest stuff from the mainline repo.

jdnc-interest@javadesktop.org wrote:
> Just hoping one of the maintainers or someone more familiar with the delegate was around. I'm not sure how typical it's internal design is for composite components. Or even if there's a generally accepted good example of one.
>
> What's the best way to made do in the meantime? I could submit a patch to the bug report.. although that's been done in the past and they've seriously expired.
>
> I'm also tempted to put a 'fixed' version under my incubator tree for my own use. I already use a modified JXDialog under a different package org.jdesktop.swingx.patched .. which should be relatively easy to swap out via a IDE refactoring / ComponentFactory tweak later. But in this case I need to replace a delegate I don't code for explicitly. So I'd be matching the package and sliding the incubator jar into the classpath before swingx? yuck. How do the other non-commit rights mortals fare?
>
> - Richard
> [Message sent by forum member 'osbald' (osbald)]
>
> http://forums.java.net/jive/thread.jspa?messageID=213724
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>
>
>

Disclaimer: http://www.peralex.com/disclaimer.html

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Kleopatra

Richard,

> (Copied from https://swingx.dev.java.net/issues/show_bug.cgi?id=235 - Probally just being frustrated by the timespace distortion around JavaOne ;)
>

Weelll, I think it's not only j1 timespace distortion. Looks like the
date components' owner (dmouse) is no longer very active here, so we
probably should try to find somebody else to take over. Doing so,
suffers from timespace distortion as well ;-)

Sorry
Jeanette

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

osbald
Offline
Joined: 2003-06-13

Just hoping one of the maintainers or someone more familiar with the delegate was around. I'm not sure how typical its internal design is for composite components. Or even if there's a generally accepted good example of one.

What's the best way to made do in the meantime? I could submit a patch to the bug report.. although that's been done in the past and they've seriously expired.

I'm also tempted to put a 'fixed' version under my incubator tree for my own use. I already use a modified JXDialog under a different package org.jdesktop.swingx.patched .. which should be relatively easy to swap out via a IDE refactoring / ComponentFactory tweak later. But in this case I need to replace a delegate I don't code for explicitly. So I'd be matching the package and sliding the incubator jar into the classpath before swingx? yuck. How do the other non-commit rights mortals fare?

- Richard

kschaefe
Offline
Joined: 2006-06-08

> I'm also tempted to put a 'fixed' version under my
> incubator tree for my own use. I already use a
> modified JXDialog under a different package
> org.jdesktop.swingx.patched .. which should be
> relatively easy to swap out via a IDE refactoring /
> ComponentFactory tweak later. But in this case I need
> to replace a delegate I don't code for explicitly. So
> I'd be matching the package and sliding the incubator
> jar into the classpath before swingx? yuck. How do
> the other non-commit rights mortals fare?
I personally go the yucky route. I currently have a small (and growing) collection of patched items that I am maintaining in my incubator. I am manually updating them as fixes come in, but it's been so quiet lately that that has not happened.

I find it easier to keep working "with standard" classes than to have a patched package.

Karl