microba-controls Mailing List for Microba controls (Page 3)
Brought to you by:
michaelbaranov
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
(2) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(7) |
May
(2) |
Jun
|
Jul
|
Aug
(8) |
Sep
(13) |
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris M. <ch...@st...> - 2007-10-17 21:21:42
|
Hi Michael, Send me your latest source file for BasicDatePickerUI and I'll do a patch if you like (have never done such a thing before); however all that needs to be done is to use this new inner class NullCapableDateFormatter instead of DateFormatter as your code has it. I have since made the new inner class private and static as well - but haven't really tested it. Apart from that all the necessary code is as sent. Alternatively you could change the code so that API users can put in their own DateFormatter. One small problem with this I see is that your UIs seem to be hard to get to - there is no reference to them from the controller as I would expect. I have had to code this method: public static Component getDisplay( DatePicker dp) { Component result; Component components[] = dp.getComponents(); //Print.prArray( components, "Which one is a text field?"); //A: //value: null, class: com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI$MyJFormattedTextField //value: null, class: javax.swing.JButton result = components[0]; return result; } Is there a better way? I experienced the problem when programmatically setting the date to null. What would happen was that a null wouldn't get through the commitEdit() validation (which presumably happened at the time of a focus change), and the last successfully committed value would come back to being the actual value. This was a difficult thing to track down, and indeed also exists on MDateEntryField, and was the reason that I came to your Component - hoping it would allow null date values. - Chris Murphy (www.strandz.org) Michael Baranov wrote: > Chris, > > Thanks for the path! But can you describe the effect of the change > from the point of view of a user? What was wrong (but now OK)? Can you > please send me a regular machine-processable patch for > BasicDatePicketUI against the latest sources (so I ca patch a local > copy free of mistakes)? > > Thanks for using Microba and contributing! > > Chris Murphy wrote: >> Hi Michael, >> >> I found something for your consideration, which has required changing >> the microba source as configuration was not possible. The problem is >> that JFormattedTextField does not properly support the concept of a >> null date. A null date can't be committed (commitEdit()) to a >> JFormattedTextField. As you can see from the code Sun's bug database >> offers a workaround that I've implemented on your code. This code is >> from changes I've made to BasicDatePickerUI: >> >> private DefaultFormatterFactory createFormatterFactory() { >> return new DefaultFormatterFactory(new >> NullCapableDateFormatter(peer >> .getDateFormat())); >> } >> >> >> /** >> * To do this enhancement: >> * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4745048 >> */ >> public class NullCapableDateFormatter extends DateFormatter >> { >> public NullCapableDateFormatter(DateFormat dateFormat) >> { >> super( dateFormat); >> } >> >> public Object stringToValue(String string) >> throws ParseException >> { >> if(string == null || string.length() == 0) >> { >> return null; >> } >> return super.stringToValue(string); >> } >> } >> >> >> thanks - Chris >> >> ------------------------------------------------------------------------- >> >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Microba-controls mailing list >> Mic...@li... >> https://lists.sourceforge.net/lists/listinfo/microba-controls >> >> > |
From: Michael B. <mic...@gm...> - 2007-10-16 06:15:24
|
Chris, Thanks for the path! But can you describe the effect of the change from the point of view of a user? What was wrong (but now OK)? Can you please send me a regular machine-processable patch for BasicDatePicketUI against the latest sources (so I ca patch a local copy free of mistakes)? Thanks for using Microba and contributing! Chris Murphy wrote: > Hi Michael, > > I found something for your consideration, which has required changing > the microba source as configuration was not possible. The problem is > that JFormattedTextField does not properly support the concept of a null > date. A null date can't be committed (commitEdit()) to a > JFormattedTextField. As you can see from the code Sun's bug database > offers a workaround that I've implemented on your code. This code is > from changes I've made to BasicDatePickerUI: > > private DefaultFormatterFactory createFormatterFactory() { > return new DefaultFormatterFactory(new NullCapableDateFormatter(peer > .getDateFormat())); > } > > > /** > * To do this enhancement: > * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4745048 > */ > public class NullCapableDateFormatter extends DateFormatter > { > public NullCapableDateFormatter(DateFormat dateFormat) > { > super( dateFormat); > } > > public Object stringToValue(String string) > throws ParseException > { > if(string == null || string.length() == 0) > { > return null; > } > return super.stringToValue(string); > } > } > > > thanks - Chris > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > -- Michael Baranov |
From: Chris M. <ch...@st...> - 2007-10-15 22:31:08
|
Hi Michael, I found something for your consideration, which has required changing the microba source as configuration was not possible. The problem is that JFormattedTextField does not properly support the concept of a null date. A null date can't be committed (commitEdit()) to a JFormattedTextField. As you can see from the code Sun's bug database offers a workaround that I've implemented on your code. This code is from changes I've made to BasicDatePickerUI: private DefaultFormatterFactory createFormatterFactory() { return new DefaultFormatterFactory(new NullCapableDateFormatter(peer .getDateFormat())); } /** * To do this enhancement: * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4745048 */ public class NullCapableDateFormatter extends DateFormatter { public NullCapableDateFormatter(DateFormat dateFormat) { super( dateFormat); } public Object stringToValue(String string) throws ParseException { if(string == null || string.length() == 0) { return null; } return super.stringToValue(string); } } thanks - Chris |
From: Michael B. <mic...@gm...> - 2007-10-04 16:03:33
|
Hi! Thanks for getting interested in the code and thanks for the suggestion. Actually, you don't need to ask me for any permissions to modify the code unless you want the changes to get into the library itself. ;-) I'm not sure it's possible to fix the issue by moving/renaming anything at this stage as the library is already in use by many projects and I really do not want to break them with the next release. The cyclic dependency is really not that dangerous. I wish you have spotted it earlier when I could fix it... But most of the time (actually always) it "just works" and that's what folks love ;-) Sorry. If I had paid attention to it earlier... but at the time of writing the initial code this issue was beyond my competence... LOL ;-) Strandz? Can you please sent me a quick note+link about it so I can update the "who uses Microba" section? Thanks! Michael. Chris Murphy wrote: > Hi Michael, > > I noticed you have some cyclic package dependencies between these two > packages: > > com.michaelbaranov.microba > com.michaelbaranov.microba.common > > Which can be fixed by putting Microbia.java into the common package (and > perhaps renaming it to MicrobiaUtils). > > Then these two came up next: > > com.michaelbaranov.microba.marker > com.michaelbaranov.microba.marker.ui > > Are you interested in solving package dependency problems with what > looks otherwise like very well written code? I would be happy to go > ahead and make the fixes and then send you the changed source code. I > use the tool JDepend and IntelliJ IDEA to diagnose these recursive > dependencies between packages. The fixes usually involve moving classes > and methods around, and sometimes require the use of special interfaces > or abtract classes where one package is providing a service to another > package. > > I am wanting Strandz applications to move to using your calendar > components, yet still want to keep the Strandz source 'pure' from this > point of view. > > - Chris Murphy > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > -- Michael Baranov |
From: Chris M. <ch...@st...> - 2007-10-04 15:38:04
|
Hi Michael, I noticed you have some cyclic package dependencies between these two packages: com.michaelbaranov.microba com.michaelbaranov.microba.common Which can be fixed by putting Microbia.java into the common package (and perhaps renaming it to MicrobiaUtils). Then these two came up next: com.michaelbaranov.microba.marker com.michaelbaranov.microba.marker.ui Are you interested in solving package dependency problems with what looks otherwise like very well written code? I would be happy to go ahead and make the fixes and then send you the changed source code. I use the tool JDepend and IntelliJ IDEA to diagnose these recursive dependencies between packages. The fixes usually involve moving classes and methods around, and sometimes require the use of special interfaces or abtract classes where one package is providing a service to another package. I am wanting Strandz applications to move to using your calendar components, yet still want to keep the Strandz source 'pure' from this point of view. - Chris Murphy |
From: Michael B. <mic...@gm...> - 2007-01-30 07:34:15
|
Hello! There are no examples because using the library is trivial. You are the first to ask for it ... What you wrote is correct! But to see anything, you have to add your newly-created cp to a Swing container like JDialog or JFrame and display it. In general, Microba components behave exactly the same way as any other Swing widget (JButton). Follow any example for a JButton or other widget on the net, then replace it with CalendarPane or DatePicker. Simple. Please attach full source listing if you have any troubles next time. Michael. > Do you have any examples? I'm having trouble getting your libraries to do > anything. > > For example I have tried: > > CalendarPane cp = new CalendarPane(new Date()); > cp.setEnabled(true); > cp.setVisisble(true); > > I dont know how to use it an there are no examples in the docs. > > Sean > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > |
From: <se...@da...> - 2007-01-29 21:40:13
|
Do you have any examples? I'm having trouble getting your libraries to do anything. For example I have tried: CalendarPane cp = new CalendarPane(new Date()); cp.setEnabled(true); cp.setVisisble(true); I dont know how to use it an there are no examples in the docs. Sean |
From: Michael B. <mic...@gm...> - 2006-12-28 07:20:10
|
Ilan, You must implement your custom VetoPolicy model and set it on the visual component. Implementing VetoPilocy is straightforward: inspect the Calendar value passed in. See respective javadoc. Mail again in case of trouble. Have fun, Michael. > Hi, > > I am using the DatePicker for a project and the customer has requested > that the control not allow users to enter dates that are in the past. > Thus any day that is before the current day should be grayed > out/disabled from selection. > > Any advice on how to go about implementing this with this control? > > Thanks in advance, > -- Ilan > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > |
From: Ilan K. <il...@gm...> - 2006-12-27 21:53:57
|
Hi, I am using the DatePicker for a project and the customer has requested that the control not allow users to enter dates that are in the past. Thus any day that is before the current day should be grayed out/disabled from selection. Any advice on how to go about implementing this with this control? Thanks in advance, -- Ilan |
From: Witold S. <plj...@gm...> - 2006-11-14 20:54:13
|
Hello again, There are exceptions in attachment. Actually I do not understand it: if I get it right, Java is throwing ClassCastException, but the component is actually the class it should be! Do you know why this is happening only when NetBeans is changing class loaders? (that was what Tomas Pavek said). Maybe that is the answer: the class has the same name, but belongs to other class loader, so ClassCastException... well - that is something beyond my knowledge of Java :/ 2006/11/14, Michael Baranov <mic...@gm...>: > > Witold, > > Thanks. I've a few ideas and I need proofs of them. > > 1) Please apply this to > BasicDatePickerUI#installUI(JComponent c): > > public void installUI(JComponent c) { > try { > peer = (DatePicker) c; > } catch (ClassCastException e) { > throw new ClassCastException("Actual class was: " + > c.getClass().getName()); > } > installComponents(); > istallListeners(); > installKeyboardActions(); > } > > Run it and give me the stacktrace. > > 2) Again change BasicDatePickerUI#installUI(JComponent c): > > public void installUI(JComponent c) { > try { > peer = (DatePicker) c; > } catch (ClassCastException e) { > return; > } > installComponents(); > istallListeners(); > installKeyboardActions(); > } > > And see if the problem disappears. > > Thanks! > > Hi there, > I looked closer at the exceptions and I attached only one, that was > thrown by NetBeans after the exception that was thrown by > DatePicker... > The real cause is ClassCastException in class: > com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI > method: > installUI(JComponent c) > peer = (DatePicker) c; <-- ClassCastException > > I patched CalendarPane#updateUI() as you said, but that didn't help :( > There is stack trace in the attachment (I hope that is full stack > trace, don't have idea how to get anything more verbose). For your > convenience I used version 0.4.3.3 before applying your patch, so the > line numbers will be valid. > > Answering your earlier question: NetBeans is throwing that exception > in while developing, there is no problem at runtime. If you would like > to reproduce my problem you would have to download NB 5.5 and follow > my steps described in my first email of that thread: > http://www.netbeans.org/servlets/ReadMsg?list=nbui&msgNo=8666 > > I know that the steps above could take lot of your time, so if I can > help somehow :), just write. > > > > 2006/11/14, Michael Baranov <mic...@gm...>: > > Witold, > > one more thing: > please update the CalendarPane#updateUi() with this and tell me if if > fixes the trouble: > > public void updateUI() { > ComponentUI delegate = UIManager.getUI(this); > if (delegate == null) { > Microba.init(); > delegate = UIManager.getUI(this); > } > setUI(delegate); > invalidate(); > } > > > Michael. > > Hello there, > > I am developing application using NetBeans 5.5 and its GUI builder. > > I had a problem with Matisse throwing exception one one of my forms > > and that exception was caused by some problem with Microba DatePicker. > > I do not know much about Swing's internals, but let me show you the > > answer from Sun employee regarding my problem: > > > > The exception you attached is probably caused by a bug in the GUI builder > > (would be worth reporting in IssueZilla), however it is caused but > another > > exception - DataPicker component fails on instantiation (thus the layout > > loading fails). > > > > > ---------------------------------------------------------------------------- > > Subject: Re: Matisse is throwing exception until I restart NetBeans > > Tomas Pavek wrote: > > > ---------------------------------------------------------------------------- > > When you compile the other form and reopen the WizytyForm form, a new > > classloader is used to load the classes - so new version of DataPicker > class > > is loaded, but it probably interacts with the old version of the > > BasicDatePickerUI. If you restart, everything seems ok - when the class > is > > loaded first time. > > > > Would be good to investigate why this happens... especially the > > CalendarPane.updateUI method - how it gets the UI delegate. > > > ---------------------------------------------------------------------------- > > here is entire context: > > > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > > > ---------------------------------------------------------------------------- > > > > I really do find Microba's DatePicker better than other date-related > > widgets (for example the way it deals with null values). Could you > > guys, take a look at that problem and tell me if you are able to fix > > that issue? > > NetBeans is now very popular, its GUI builder is going to be even more > > powerful, so resolving that could help others as well. > > > > Cheers, > > W.Szczerba > > > > > ------------------------------------------------------------------------- > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it > Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > > ________________________________ > > microba-0.4.3.3-full > --------------------- > > Cannot create instance of > com.michaelbaranov.microba.calendar.DatePicker. > The component cannot be loaded. > java.lang.ClassCastException: > com.michaelbaranov.microba.calendar.DatePicker > at > com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI.installUI(BasicDatePickerUI.java:63) > at javax.swing.JComponent.setUI(JComponent.java:652) > at > com.michaelbaranov.microba.calendar.CalendarPane.updateUI(CalendarPane.java:146) > at > com.michaelbaranov.microba.calendar.CalendarPane.<init>(CalendarPane.java:214) > at > com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:109) > at > com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:67) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at java.lang.Class.newInstance0(Class.java:350) > at java.lang.Class.newInstance(Class.java:303) > at > org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:136) > at > org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:199) > at > org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:143) > at > org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:583) > at > org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:733) > at > org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:605) > at > org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:733) > at > org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:426) > at > org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:206) > at > org.netbeans.modules.form.FormEditor$2.run(FormEditor.java:222) > at > org.netbeans.modules.form.FormLAF$1.run(FormLAF.java:64) > at org.openide.util.Mutex.doEventAccess(Mutex.java:1178) > at org.openide.util.Mutex.readAccess(Mutex.java:259) > at > org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:49) > at > org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:220) > at > org.netbeans.modules.form.FormEditor.loadFormDesigner(FormEditor.java:143) > at > org.netbeans.modules.form.FormDesigner.componentShowing(FormDesigner.java:1491) > at > org.netbeans.core.multiview.MultiViewPeer.peerComponentShowing(MultiViewPeer.java:177) > at > org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentShowing(MultiViewCloneableTopComponent.java:113) > at > org.openide.windows.WindowManager.componentShowing(WindowManager.java:313) > at > org.netbeans.core.windows.WindowManagerImpl.componentShowing(WindowManagerImpl.java:950) > at > org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:150) > at > org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:244) > at > org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:220) > at > org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:158) > at > org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:97) > at > org.netbeans.core.windows.Central.activateModeTopComponent(Central.java:1387) > at > org.netbeans.core.windows.WindowManagerImpl.topComponentRequestActive(WindowManagerImpl.java:1020) > at > org.openide.windows.TopComponent.requestActive(TopComponent.java:625) > at > org.netbeans.modules.form.FormEditorSupport.openFormEditor(FormEditorSupport.java:114) > at > org.netbeans.modules.form.FormDataNode$1.actionPerformed(FormDataNode.java:53) > at > org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1389) > at > java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212) > at > java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211) > at > java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211) > at > java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211) > at > java.awt.Component.processMouseEvent(Component.java:5491) > at > javax.swing.JComponent.processMouseEvent(JComponent.java:3126) > at java.awt.Component.processEvent(Component.java:5253) > at java.awt.Container.processEvent(Container.java:1966) > at > java.awt.Component.dispatchEventImpl(Component.java:3955) > at > java.awt.Container.dispatchEventImpl(Container.java:2024) > at java.awt.Component.dispatchEvent(Component.java:3803) > at > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) > at > java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901) > at > java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) > at > java.awt.Container.dispatchEventImpl(Container.java:2010) > at java.awt.Window.dispatchEventImpl(Window.java:1778) > at java.awt.Component.dispatchEvent(Component.java:3803) > [catch] at > java.awt.EventQueue.dispatchEvent(EventQueue.java:463) > at > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) > at > java.awt.EventDispatchThread.run(EventDispatchThread.java:110) > > |
From: Witold S. <plj...@gm...> - 2006-11-14 19:48:27
|
Hi there, I looked closer at the exceptions and I attached only one, that was thrown by NetBeans after the exception that was thrown by DatePicker... The real cause is ClassCastException in class: com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI method: installUI(JComponent c) peer = (DatePicker) c; <-- ClassCastException I patched CalendarPane#updateUI() as you said, but that didn't help :( There is stack trace in the attachment (I hope that is full stack trace, don't have idea how to get anything more verbose). For your convenience I used version 0.4.3.3 before applying your patch, so the line numbers will be valid. Answering your earlier question: NetBeans is throwing that exception in while developing, there is no problem at runtime. If you would like to reproduce my problem you would have to download NB 5.5 and follow my steps described in my first email of that thread: http://www.netbeans.org/servlets/ReadMsg?list=nbui&msgNo=8666 I know that the steps above could take lot of your time, so if I can help somehow :), just write. 2006/11/14, Michael Baranov <mic...@gm...>: > Witold, > > one more thing: > please update the CalendarPane#updateUi() with this and tell me if if > fixes the trouble: > > public void updateUI() { > ComponentUI delegate = UIManager.getUI(this); > if (delegate == null) { > Microba.init(); > delegate = UIManager.getUI(this); > } > setUI(delegate); > invalidate(); > } > > > Michael. > > Hello there, > > I am developing application using NetBeans 5.5 and its GUI builder. > > I had a problem with Matisse throwing exception one one of my forms > > and that exception was caused by some problem with Microba DatePicker. > > I do not know much about Swing's internals, but let me show you the > > answer from Sun employee regarding my problem: > > > > The exception you attached is probably caused by a bug in the GUI builder > > (would be worth reporting in IssueZilla), however it is caused but another > > exception - DataPicker component fails on instantiation (thus the layout > > loading fails). > > > > ---------------------------------------------------------------------------- > > Subject: Re: Matisse is throwing exception until I restart NetBeans > > Tomas Pavek wrote: > > ---------------------------------------------------------------------------- > > When you compile the other form and reopen the WizytyForm form, a new > > classloader is used to load the classes - so new version of DataPicker class > > is loaded, but it probably interacts with the old version of the > > BasicDatePickerUI. If you restart, everything seems ok - when the class is > > loaded first time. > > > > Would be good to investigate why this happens... especially the > > CalendarPane.updateUI method - how it gets the UI delegate. > > ---------------------------------------------------------------------------- > > here is entire context: > > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > > ---------------------------------------------------------------------------- > > > > I really do find Microba's DatePicker better than other date-related > > widgets (for example the way it deals with null values). Could you > > guys, take a look at that problem and tell me if you are able to fix > > that issue? > > NetBeans is now very popular, its GUI builder is going to be even more > > powerful, so resolving that could help others as well. > > > > Cheers, > > W.Szczerba > > > > ------------------------------------------------------------------------- > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > |
From: Michael B. <mic...@gm...> - 2006-11-14 17:06:40
|
Witold, one more thing: please update the CalendarPane#updateUi() with this and tell me if if fixes the trouble: public void updateUI() { ComponentUI delegate = UIManager.getUI(this); if (delegate == null) { Microba.init(); delegate = UIManager.getUI(this); } setUI(delegate); invalidate(); } Michael. > Hello there, > I am developing application using NetBeans 5.5 and its GUI builder. > I had a problem with Matisse throwing exception one one of my forms > and that exception was caused by some problem with Microba DatePicker. > I do not know much about Swing's internals, but let me show you the > answer from Sun employee regarding my problem: > > The exception you attached is probably caused by a bug in the GUI builder > (would be worth reporting in IssueZilla), however it is caused but another > exception - DataPicker component fails on instantiation (thus the layout > loading fails). > > ---------------------------------------------------------------------------- > Subject: Re: Matisse is throwing exception until I restart NetBeans > Tomas Pavek wrote: > ---------------------------------------------------------------------------- > When you compile the other form and reopen the WizytyForm form, a new > classloader is used to load the classes - so new version of DataPicker class > is loaded, but it probably interacts with the old version of the > BasicDatePickerUI. If you restart, everything seems ok - when the class is > loaded first time. > > Would be good to investigate why this happens... especially the > CalendarPane.updateUI method - how it gets the UI delegate. > ---------------------------------------------------------------------------- > here is entire context: > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > ---------------------------------------------------------------------------- > > I really do find Microba's DatePicker better than other date-related > widgets (for example the way it deals with null values). Could you > guys, take a look at that problem and tell me if you are able to fix > that issue? > NetBeans is now very popular, its GUI builder is going to be even more > powerful, so resolving that could help others as well. > > Cheers, > W.Szczerba > > ------------------------------------------------------------------------- > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > Check out Slashdot's new job board. Browse through tons of technical jobs > posted by companies looking to hire people just like you. > http://jobs.slashdot.org/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > |
From: Michael B. <mic...@gm...> - 2006-11-14 16:56:55
|
Witold, It's a known bug I can't get my hands on yet. My hands, means I'm alone coding/maintaining the library... But I want to fix it! Please, provide the FULL stack trace of the exception(s) thrown with descriptions of how you made it fail. It is application runtime, or while developing in IDE etc. I have browsed the thread but there is a partial trace there... I can tell you nothing right now. Regards, Michael. > Hello there, > I am developing application using NetBeans 5.5 and its GUI builder. > I had a problem with Matisse throwing exception one one of my forms > and that exception was caused by some problem with Microba DatePicker. > I do not know much about Swing's internals, but let me show you the > answer from Sun employee regarding my problem: > > The exception you attached is probably caused by a bug in the GUI builder > (would be worth reporting in IssueZilla), however it is caused but another > exception - DataPicker component fails on instantiation (thus the layout > loading fails). > > ---------------------------------------------------------------------------- > Subject: Re: Matisse is throwing exception until I restart NetBeans > Tomas Pavek wrote: > ---------------------------------------------------------------------------- > When you compile the other form and reopen the WizytyForm form, a new > classloader is used to load the classes - so new version of DataPicker class > is loaded, but it probably interacts with the old version of the > BasicDatePickerUI. If you restart, everything seems ok - when the class is > loaded first time. > > Would be good to investigate why this happens... especially the > CalendarPane.updateUI method - how it gets the UI delegate. > ---------------------------------------------------------------------------- > here is entire context: > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > ---------------------------------------------------------------------------- > > I really do find Microba's DatePicker better than other date-related > widgets (for example the way it deals with null values). Could you > guys, take a look at that problem and tell me if you are able to fix > that issue? > NetBeans is now very popular, its GUI builder is going to be even more > powerful, so resolving that could help others as well. > > Cheers, > W.Szczerba > > ------------------------------------------------------------------------- > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > Check out Slashdot's new job board. Browse through tons of technical jobs > posted by companies looking to hire people just like you. > http://jobs.slashdot.org/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > |
From: Witold S. <plj...@gm...> - 2006-11-14 16:37:05
|
Hello there, I am developing application using NetBeans 5.5 and its GUI builder. I had a problem with Matisse throwing exception one one of my forms and that exception was caused by some problem with Microba DatePicker. I do not know much about Swing's internals, but let me show you the answer from Sun employee regarding my problem: The exception you attached is probably caused by a bug in the GUI builder (would be worth reporting in IssueZilla), however it is caused but another exception - DataPicker component fails on instantiation (thus the layout loading fails). ---------------------------------------------------------------------------- Subject: Re: Matisse is throwing exception until I restart NetBeans Tomas Pavek wrote: ---------------------------------------------------------------------------- When you compile the other form and reopen the WizytyForm form, a new classloader is used to load the classes - so new version of DataPicker class is loaded, but it probably interacts with the old version of the BasicDatePickerUI. If you restart, everything seems ok - when the class is loaded first time. Would be good to investigate why this happens... especially the CalendarPane.updateUI method - how it gets the UI delegate. ---------------------------------------------------------------------------- here is entire context: http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 ---------------------------------------------------------------------------- I really do find Microba's DatePicker better than other date-related widgets (for example the way it deals with null values). Could you guys, take a look at that problem and tell me if you are able to fix that issue? NetBeans is now very popular, its GUI builder is going to be even more powerful, so resolving that could help others as well. Cheers, W.Szczerba |
From: w e. <end...@ya...> - 2006-10-22 20:45:17
|
Hello, thank you much for your fine tool. One Question about the DateFormat. For my purposes the SHORT and MEDIUM versions are quite ok. But if I select SHORT, some Dates can't be shown and saved correctly (f.e. 12.07.1925 becomes always 12.07.2025) but if I chose MEDIUM, I always have to type 4 digits because 12.07.06 becomes 12.07.0006, in most cases the year chosen by SHORT was the right one. I need a possibility, that the tool saves the 1925 information internally and provides it, though showing the 25 of SHORT DateFormat only or when the user types a year using only 2 digits for the year but using MEDIUM DateFormat, the most likely year should be chosen, like it does in the SHORT version (2006 and not 0006). All my examples are for Locale.Germany and pattern dd.MM.yy(yy) Can you give me an advice how this could be established? Thank you much and best regards Wolfgang ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: DigiTalk <not...@wi...> - 2006-05-15 08:34:13
|
Hello again! As your help really was great last time, I ask you something again. I added the Control to a GridBagLayout. The DatePicker was created using createDatePicker() in my abstract class: protected DatePicker createDatePicker(){ log.info("Begin: Window.createDatePicker()"); DatePicker dp = new DatePicker(); dp.setFieldEditable(false); dp.setLocale(Locale.GERMANY); dp.setDateStyle(DateFormat.SHORT); dp.setPreferredSize(datepickersize); dp.setMaximumSize(datepickersize); dp.setMinimumSize(datepickersize); dp.setShowNoneButton(false); log.info("End: Window.createDatePicker()"); return dp; } But now my checkbox is above the DatePicker... See attached gif to see how this looks (it's a german program). I would appreciate any ideas which may lead to a conclusion. Thank you in advance! Greetings, DigiTalk |
From: Michael B. <mic...@gm...> - 2006-05-08 21:05:10
|
Hello! AFAIR this event (commit/revert) is triggered only if the user explicitly commits a new date value (changes the date by selecting it with mouse, keyboard or on focus loss with certain focus loss behaviors). To be notified of any changes of the date, monitor the property named "date", or watch for an action: 1) myPicker.addPropertyChangeListener(DatePicker.PROPERTY_NAME_DATE, myListener); or 2) myPicker.addActionListener(myListener); Hope this helps, Michael. > Hello! > > First of all: thanks for this great, free tool! > I have just one little question: > > I want to call a specified method when the value of a datepicker has > been changed. > experiments with > > --- CODE --- > > private DatePicker displayfield = new DatePicker(); > > CommitListener cl = new CommitListener(){ > public void commit(CommitEvent ce){ > calculate(); > } > }; > > displayfield.addCommitListener(cl); > > > -- / CODE --- > > didn't work unfortunately. > > Thank you for your help! > > Greetings, > DigiTalk |
From: David S. <fo...@wi...> - 2006-05-08 17:41:21
|
Hello! First of all: thanks for this great, free tool! I have just one little question: I want to call a specified method when the value of a datepicker has been changed. experiments with --- CODE --- private DatePicker displayfield = new DatePicker(); CommitListener cl = new CommitListener(){ public void commit(CommitEvent ce){ calculate(); } }; displayfield.addCommitListener(cl); -- / CODE --- didn't work unfortunately. Thank you for your help! Greetings, DigiTalk |
From: Michael B. <mic...@gm...> - 2006-04-28 06:31:28
|
Hello! This is the firs report of such kind... Well, please send me the image in private (the mailing list seems to not accept attaches). Also please include *detailed* description of how to reproduce the error, possibly include your calling code (including all the setters), JRE version, L&F,O/S version. You know, a good bug report is half of the fix :-) Michael. > Hi great job with this control... > > Today i've been into a problem... my CalendarPane hides the week names > when I first select one of the dates, any idea why can this happen... > i change the layout and doesn't work, change the look and feel too to > many and nothing...... here is the image.......... > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > |
From: davidecr <dav...@gm...> - 2006-04-27 18:46:43
|
Hi great job with this control... Today i've been into a problem... my CalendarPane hides the week names when I first select one of the dates, any idea why can this happen... i change the layout and doesn't work, change the look and feel too to many and nothing...... here is the image.......... |
From: Michael B. <mic...@gm...> - 2006-04-13 06:58:29
|
Hello! This is rather not a bug, but a side effect of a feature: the colors are taken automatically from current L&F. I'm afraid you must interfere with the sources to change that... Go to: com.michaelbaranov.microba.calendar.ui.basic.CalendarHeader and find the line private Color backgroundColorActive = UIManager.getColor("activeCaption"); By providing another L&F color constant, or a Color instance you may achieve what you desire. But be aware, that if you change the constant, the component may appear "strange" in other L&Fs. BTW, I see you are using some Asian language? Can you contribute the translation, please? And one more: try JGoodies plastic/xp L&Fs! They are excellent! Regards, Michael Baranov. > hi, > I really appreciate that you provide a such wonderful libs(DatePicker) > to public,but however,when I set my swing app's LookAndFeel to > "com.sun.java.swing.plaf.windows.WindowsLookAndFeel",the background > color of week head panel on the dateChooser control is too dark(too > close with the color of weekdays' text). > please see the attached gif file. > Could you please tell me how to change the background color of the > week head panel? > > Thanks a lot! > > _________________________________________________________________ > 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com > ------------------------------------------------------------------------ > |
From: <fan...@ho...> - 2006-04-12 09:42:13
|
hi, I really appreciate that you provide a such wonderful libs(DatePicker) to public,but however,when I set my swing app's LookAndFeel to "com.sun.java.swing.plaf.windows.WindowsLookAndFeel",the background color of week head panel on the dateChooser control is too dark(too close with the color of weekdays' text). please see the attached gif file. Could you please tell me how to change the background color of the week head panel? Thanks a lot! _________________________________________________________________ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com |