libjcalendar-java-1.3.3.orig/0000755000175000017500000000000011204611310015731 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/lib/0000755000175000017500000000000011176613654016524 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/bin/0000755000175000017500000000000011176613654016526 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/bin/runJCalendarDemo.bat0000644000175000017500000000017011176613654022371 0ustar twernertwernerjavaw -classpath %classpath%;../lib/jcalendar-1.3.3.jar;../lib/looks-2.0.1.jar com.toedter.calendar.demo.JCalendarDemo libjcalendar-java-1.3.3.orig/jcalendar-license.txt0000644000175000017500000006447211176613654022077 0ustar twernertwerner GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libjcalendar-java-1.3.3.orig/readme.txt0000644000175000017500000000347311176613654017763 0ustar twernertwerner======================================================================= JCalendar - v1.3.3 - 05/01/09 - Readme File - ======================================================================= (C) 1999 - 2009 Kai Toedter Released under GNU Lesser General Public License (see jcalendar-license.txt) kai@toedter.com www.toedter.com ======================================================================= THANKS I would like to thank all the people who have sent e-mails and provided bug fixes and suggestions. ======================================================================= UPDATES JCalendar is updated from time to time. Check the web site to stay informed about the updates: http://www.toedter.com ======================================================================= CONTENTS At the top level you find this file and a text version of the LGPL license. Please read the file "index.html" in the doc directory. This distribution contains several sub-directories. They are listed and descibed below: bin\ contains a launch script for the JCalendar demo application for Windows XP/2000/NT/98. lib\ contains the software binaries (jar files) for JCalendar and the Kunststoff Look & Feel. doc contains HTML documentation (start with index.html). doc\api contains JavaDoc documentation. src\ contains all the sources to make a distribution. ======================================================================= Plastic Look & Feel Plastic Look & Feel is part of JGoodies Looks Look & Feel, (C) JGoodies, published under the BSD License. The official web site is: http://www.jgoodies.com ======================================================================= libjcalendar-java-1.3.3.orig/doc/0000755000175000017500000000000011176613654016523 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/doc/demo.html0000644000175000017500000000402411176613654020335 0ustar twernertwerner JCalendar Demo Applet

JCalendar Demo Applet

© Kai Toedter 1999 - 2009
Version 1.3.3
05/01/09

To run the JCalendar demonstration applet in your browser, the Java Plug-in has to be installed. This applet demonstrates the JCalendar Java bean suite, including a Java date chooser composed of several other Java beans (a JDayChooser, a JMonthChooser and a JYearChooser). All these beans have a locale property. If you change the locale with the locale chooser, the names of the months and weekdays change (make sure, that you have bound the Java Plug-in to an international JRE, otherwise you might see only one locale!). Just for demonstration, the chosen date is displayed below the locale chooser. Since I think it looks just great, I have packaged JCalendar with the free JGoodies Plastic 3D look & feel (made by JGoodies).

libjcalendar-java-1.3.3.orig/doc/images/0000755000175000017500000000000011176613654017770 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/doc/images/JDateChooserMono16.gif0000644000175000017500000000012111176613654023763 0ustar twernertwernerGIF89a!,(i}Zph\]اgJ݊t. H;libjcalendar-java-1.3.3.orig/doc/images/JSpinField1.gif0000644000175000017500000000214411176613654022530 0ustar twernertwernerGIF89avuuuwwwyyy{{{|||~~~!,vH*\ȰC'"JHŋ3j1&Jǎ(S\G >xa .X@d˟@r|sf͛9wʴiS2iĩOXvj4JjKv"Hj[\@ҷo蕨W߽^<{l[e1߿ Oe{qŏGtysDH튵UӞ=+m2ҏUgY_ Us]0ܺ͹7ެ'J4S׎.zËJA yeU ]}^[#{ygChN A<@ ,P;libjcalendar-java-1.3.3.orig/doc/images/JDateChooserColor32.gif0000644000175000017500000000207611176613654024142 0ustar twernertwernerGIF89a @@@!!))99JJRRccccssss{{X猌甔筭!, !H*\ȰÇ#* @ŋ- Ǐ9vA AG0C0Yeʐrڜy2ϟ4 @ѣH򬙡ӧ 8 ժR3,Ӭ^ͺuФh`p k!k.\<Խw߾!vX0`5\ `B•MA t z4\ $ Psk+ AqJtG`ËP!`XϾ%ʟO;libjcalendar-java-1.3.3.orig/doc/images/JMonthChooserMono32.gif0000644000175000017500000000017311176613654024200 0ustar twernertwernerGIF89a !, Rڋ޼H&P)ۆhx =|%d) @1!reJJh.2g N;libjcalendar-java-1.3.3.orig/doc/images/JCalendarMono16.gif0000644000175000017500000000011511176613654023277 0ustar twernertwernerGIF89a!,$ˍ}O*dPbZ-:!79#;libjcalendar-java-1.3.3.orig/doc/images/JSpinField3.gif0000644000175000017500000000213411176613654022531 0ustar twernertwernerGIF89avuuuwwwyyy{{{|||~~~!,vH*\ȰC'"JHŋ3j1&Jbǎ(S\G>{@ 0 p;libjcalendar-java-1.3.3.orig/doc/images/JDateChooserColor16.gif0000644000175000017500000000163511176613654024144 0ustar twernertwernerGIF89a@@@ddaaffX!,z H@*L8#Nx; @@R(` 0c"hq͛8M PL`gϟ 4Pȣ=6 T  j՟;A.h@ٗ ;libjcalendar-java-1.3.3.orig/doc/images/JSpinFieldColor32.gif0000644000175000017500000000171211176613654023613 0ustar twernertwernerGIF89a @@@!, H*\ȰÇ#JHŋhȱǏ II"O 0``J*y,]„O@})Β T)QF$@jէQ~زTYIbt&S3ǒ])Pk*]:\ź߮L+^̸ǐ# ;libjcalendar-java-1.3.3.orig/doc/images/JLocaleChooserColor32.gif0000644000175000017500000000171611176613654024464 0ustar twernertwernerGIF89a @@@ddX!,  H*\ȰÇ#JHŋ3jǏ C$`ɓ(S.(dS e͕0<9f@}eϚX@:eDASUih2 {@+3z]in v˸xTo\" S`È+^xǐ#KL€;libjcalendar-java-1.3.3.orig/doc/images/JCalendar.gif0000644000175000017500000002010211176613654022275 0ustar twernertwernerGIF89a ddduuuwwwyyy{{{|||~~~Z´õĶŶƸǸȹȺʻɺʻ˼˼̽̾ͽ;ξ!,H*\pCJHŋ #ȱǏ CI"a'KʜI͚1Ad>|snr*]ʴӧPbN<9-/^l՚Q3[^ɶ۷(~ ;ٴ>eq LÈecvL+S V,Yh̹^+Ōdꐎװc˞M6fr dʺ|Wr |>Q nسkνwr)RߡtI.>{Қ7~k(h"(),B@}S|m~|'9|5(4h8K+ {hAVH>naL:|D:/cihf Y IW%i'HO. eS6eV .>褔Vj饗 @\P!'()QJ'g@8-mB뭶뮼ꫯmEPl\P< $ƍj穦I&lF;fZ~s:˺;K+kGWDфd2l-P)d2B Jcw _!zAlJ|:ZqayIL.2 P&%D@H'L7M #zEN(tV2|n:)"{~M͡C+"%4p @tmxםZL9DX}'ֈD"+= $gw砇}?:0$7'«&D {1F/_1E;@C r u˯G*pη~"_|W/oO֭K/ؠ qY`AQHD P7 G #̠B-e1YВ`@(N0fH8̡w@ H"HL&:PH*ZX̢E*2_o؀26 ҈4j#xC7p 8G7␏K<߸F@ ѐ`w.cICJь7FGQ=|dCQz2,"IHI֐c?I&qC.U N:җT/:vDf0fzdS*^Ħ0Gnvld/Gf2ҜD7&.IOfR %:)^.dg>}GST5KMt@)Le:):MpN򖸼eCiNVFeB[JPb<+O MBc̩NwӞ@ PJԢHMRԦ"^P rBЪ%Ī} 1`n"-gmKZ͜aI(5 bB+(PW蕯~\ʎ#k_*űlb+X6l`;[vk\zFQ 8fK[pxH+PȠĵ=_jKv pc;\o[K2w55ntWم.r x*Ն$mQ2smap):1 EH&}_׿(0:;x<`s0|e\8^aT\нLj+oX15aZvdf<\su?ؠFl;!ȫ1td ;$Ps*7ytc`L2esYɻ;v`Փw5iz+( ?A2^Muh:ыnQipL҆5hHyҡ5ohRoϧ=jMƨ[mu~1 0e/%ч4A2^ lg7Ж6mov]k$۶M6h6wlp{Nogt,a$x-(I1*D#+H&6Ѣ*(kG '><T!X\R7y;]zesmMBymg3|I<,Ua3 X(:qu[+W[%#vS\WgO׉nz%>wOeUvxv_++1_G_}?~w~'~~,tO'y/' ` m{!^pOH!h& ($&Xh X!+!8%82'r-0ȃ(H@hЁ8;x3XA,/Z 36Pb8p(L=]8 _aHbhWjȆ(^tXgk؆\؇reyHosHv~(zx }gpxZ@!;p2 X؊(1hH(ƸHhhȋ|' ړc[=96@A討ň((Af阏Xy"؏ yI Y i8y'!o=?S*K4 /A(!$i8ɒ. 2#Y_p8-/A@)CywtJת?gqDG Gr:ǪZq:qZg-vugxw׊xrv}WwcWvb rxwxfGxzx &.jxv w*p7*6zg{|7{v{7{{Z(.W K${&(K/F㱟7C81W~~}B=Ǵ~ ('~CE;H VKR W wChQ?(V=(NXPJHMHmwCۃ!;z6&Uxɇxx눈Hxz(H{Ȉdh˺۹;BҸԘވѨ؍ٸX˼ի Kˋ;͸޻hXx Yۑ9)ێ+ېܿyi̎ =5ɕUO3Li!#% ;]i-JIM3*,.,;DÆCuUGA\IECnRptivH\UxVV_VcacgLC9ZoL(! u@s lj`Eǀ\D@C0B Aəyɚƥ Ǖs<赝שȩŝuslG ȇʯ@,+ ɥiʸֹ̛]Iɹļ;ibFiIr|l@<˶)(p  ɞ zxjKzV3d&(em0z׼G͈ *\&`%@!Zdo&-::,$!5ѫѡ+k:4VkNjfU}LBqH}M#0"dzӺMZWV=HkZMh@=va+F< |Zplݩ*׫@)%~N!zlqmuݨwؑʨ:ى}nVzCNGͺ(:sr)Rڒ1E(` &}:qJھ:ۓmڨ-(7-KrZ˯&zs4pDױM`} mvݭ-z&mv7Lʷ-[2{1+E0A&@"}PG^z!z#.~u+..Nz.7N nd ~Z/\W+Gk}h %0!0RN&^@e1c`Ks"f~M{Kp۷@v~[E$!W0t{Sz|?'2N *Hl˻뻨[',#뺾'𻰻{+غn Þ{D勼;˾뾒!ǂ~Xn>ێ{黾N{kۼn \{9|}On~_& ,ϑ# ,HxY|_)/l^yQPNΒ0,)?+<>L$LDO2ʬCM|KYo[w)DS-b(P`Ǐ >8Ō 8ХȘ&iˑ%gRN$er !N\yΧҀ-.U,!&LS3R36ڶoYݼ{+زg՞ebٯ:Ƭ91ఞ  z[z]֨E@n]S(.+Mg׾n/>88oq]й4čӦn]yoۡG~y{zr?]|س׾-!'o1 .)d! -PlCE GE!E_<sSq]4mKQ!A$*fgKfF(hJ+mr-L16qNO8L:M=:3BtP7#5׾zmY@!?9D10lB<UJTTUeՑ` QM5UhO{TPubw=VPh Wbu4Z_gTas56mfe ]WvcۧdRcË+h ^{׾~ x ^I~X`aa+9cd(wa76X8Դg!UJeI9.`"ph*衋>:iv z$6魹~:ꩫn:mپlnk[ﻙ|t}!S<H<<3vA|/s=]HrSW&>}tc?muw7}vWuKԑ~yލxg}2dHc . -lGBf)|/}w3_F[B X?~@^ Y%@ nB@)ЅSp>GM! QB1a o80+e%4"%6q)D 2QO{.ZQ"E+c8G:"ucxG=Q|H=x4!ƯÑd$%9IJVҒd&5INvғ$#cBD$*y(Vҕe,eJQl-K]!,9Lb3M|>azHq1Mjp2S4e|f4iCj^3HLhJ&6Mo2|4yNzØh@̟1S%)LPzH+PM4ŠU(CPJA'PhtD+:4hJ?OԦ$CBڎjA?v StbhN{Z%.HD5*RGTO-Q*VW]P*՛լYzͻdr))5A D$ᇦ'+] bWꕯ#Q:׺yk_X%,d{V4SThfE*щUVd* OרLY-mri,E.@5U і2 j2 29fHP繘rWc\"5.g;^bOz0()XBw;f7hoxQѭ✪Ҏ?8?<f%>qK:;libjcalendar-java-1.3.3.orig/doc/images/JMonthChooserMono16.gif0000644000175000017500000000011511176613654024176 0ustar twernertwernerGIF89a!,$udMw}e[7n->;libjcalendar-java-1.3.3.orig/doc/images/JSpinFieldMono16.gif0000644000175000017500000000011311176613654023441 0ustar twernertwernerGIF89a!,"uN7aHn݆t${Lv;libjcalendar-java-1.3.3.orig/doc/images/JCalendarMono32.gif0000644000175000017500000000017011176613654023276 0ustar twernertwernerGIF89a !, Oڋ+ؼ-=HΩ&16u92AJ6ek"6Pԙ9f ̈N ;libjcalendar-java-1.3.3.orig/doc/images/JYearChooserMono32.gif0000644000175000017500000000017711176613654024017 0ustar twernertwernerGIF89a !, Vڋɠx% Z'hrERlE`QAJUL*DI ;libjcalendar-java-1.3.3.orig/doc/images/JYearChooserColor16.gif0000644000175000017500000000161311176613654024163 0ustar twernertwernerGIF89a???@@@ddaaff!,h H*TÇ8@b@ p;P 4hD.G2`AM 䂟-&X'ħ5 J*ՅXf ;libjcalendar-java-1.3.3.orig/doc/images/3plusstars.gif0000644000175000017500000000177511176613654022614 0ustar twernertwernerGIF89a33f3333f333ff3fffff3f̙3f3f3333f3333333333f333333f3f33f3ff3f3f33333f33̙33333f3333333f333ff3fffff3f3f33ff3f3f3fffff3fffffffffff3ffff̙fff3fffffff3fffff3f3333f333ff3fffff3f̙̙̙3̙f̙̙̙3f3f̙3333f3̙33ff3fff̙ff3f̙̙3f̙3f̙3f3333f333ff3fffff3f̙3f3f!,3@ H&h45C$RhcƉB4(Rb’N:4Pdȍ/cdfAA.D, yІC.BL҈I':T*ӑd!Ь[z*T45۷p%scVJ._`9rqb[?:XÍf}O-QS(W-ZtO昴f늯Y=[3ԝ;libjcalendar-java-1.3.3.orig/doc/images/JCalendarDialog.gif0000644000175000017500000002221711176613654023426 0ustar twernertwernerGIF89addduuuwwwyyy{{{|||~~~¿³´õĶŶƸƸǸǸȹȺʻɺʻʻ˼˼̽̽ͽ̾ͽ;ξ!,H*\ȰÇ#JHqΉ3jȱǏ CIɓ(Sv˗0cʜْ忊8s$lϟ@.hͣ'v/>q_)EJ*Ʃ:RAB5kդ5klOzj.UfѪeܮ7klٳi׶}w.Vk֫ocEۧOzŃGӨS^smC68{u伉2땨BݮУKNs߸i;kaj"n&d"WNݺϿ|C2"(&x z7YZ n &_rӎ}"H&* 5C*\bTh!EcFꡕ#`aZ:CΓPF)TVi^w-J%gwE@p ʣ;:Y%Anq HЀ]hxp>KGke(@!Q5a aGH(L {F<-hW{"(=qC$MLq{P {sj%)bD(1T `$0cHFTYb٤% &$*x̣> IBL"E:򑐌$'IID6̤&7IH^ (G9O\@!UJR %V:%.i^Җ|%.KaeW"r-yHj25MZFt!GrR*yKnҘ&+Gy'6Mpꑝt#6uQδ%$NRLr miR_jѓ4jOaOz UC:Ȭ)$R[Pu ԗ\(Ve U{h*T׊HZSDg9Z֫ꔟr> ~mIwZէ&S,(XZ+f7 R h9 њ,-jWZW-%UdžmO|V'Ipqr;RMm7Ĺa`2Rn䀦Cq ldCt3Mx_F3A/};^7i׻5 ^QF.w#D:Nwxws(Ё'aYX:"0_8Vqu{ضiz @2L@"ːcIαc9J1le("z$(fhV؆u$"YfT#!OP҈^4gHwEglLh΀Nt"9?ϟ43ͬiGtiurgtBQҖ%$Ԩj.y Ld)uf$^ךո&DTZKnuk)_G?i=Zs"'PZT C'mO(GܥMufιmz_&O-(`lk(6G9ơ*V͊xE)+D|0qjT8We!X|:9SrYJ/7iNq]<08¥i77lk-)>u&ZZGӹ孨O" ֙rsA]TWWؕ_W՗{k[^OՇ^th6 *`p) &1e[?<eGBYL&Z y/|#O%6>F `Čble1{Kv3^νE˂gd9>} _g7Ȑ{-ć~?}{_e>7]fM̷GQb e$+P$TgUB`g8xd(h W'؁h!$(vt]F p [28@ Ѓ> ^@P0<`6 ;>g0Exd9Ȅ<@(DhHxW؄ZRUK(NH]H1h{3H 0 0 zЇ~6`3E:@Avzȇ؇mU0xuxy舐(Hh(؉F񉊈8Wcq]F1 %ՃpnO9`1`pȋ(Xh=ɨHhҨ3hhȍxoG( 0w0jbx#x31D8h菆(h I؏9)ّ [?1\5G84VH-ٓ,哾 ]!]*)(I1A܅_f_%__E``])`_U)_gɕiIk^m_cYYɖp^tvYEyYa )acIb,fbb/F1f%aɘ阛 )(6wHR6_MOdBeWe?Y6eee ^ɛdye)Ź͉wyfhgFgfaRiyhvn6hPh܉hgh}i!hof!h99֟Jii&lkll֠kǶjжllJϦl kflZl!!蠢6k&:"$ -l~զGfn'oo'VoCo(vpAoNoƤ6p'X*֤Bڥ|mZZoe G?@s2r@s(gn*r7s1szv-g%yZ*{zsB7sj-P*[$@۲w+&=14ګ-+:K۰}!-ӉEl np[YM P+a{ݵ]ݶmb]5& R08ՃԹKK;^Keȹ+  [ዋ Hk;[K++-ʋ02^4޼){ǫ<+ҫC{k;PލInEGDV< |nNp.x>y|.jh^!<'I;.0ߟ5Ô>D5>.2>F BL\Jĩ>ģRg ejIilpsU뱎klƷƽůȟ DŽȂ|b{tLn>ȖYȊ .N yʔʾ,ʫ,\ɹyɜ\X L*I퀞gI|il#"}j+\1 v9\'253?EC%5j7ߡ\=Jcj$}!^o-V k ͥfSm =[Pr/ܶ-&~ s/2*P;jԁ:}<-8/?L>M<'BӤt-kmmo}rͬdOd-?׫ ֨ץo.wW 0] ؆=ٕ-үo^z-߰V0gō?5~gܳ{w%+ @1^ $8_ŋ4#C%L5kҼ9spݸ)K СP)Ι,U'PDtiӧQj±J:*,ձFVjتDzکb ׵~b7˘0u>Y6eLjJO=z (CxxlfΟ;>3i/ghҦQWZ7h޳5lپk_[7޴'CO>qEY0\Z $=ia:hx%ozǟD?>3[ǃp?AB#ܐ ?ƒQYdAJ7vэ!bjo̱G r"i FuTLJHI*d2'J+jRK2*trK64N-ar1ÓhM9@C/E +`h+?PC=tFTIPL3eG!OP-UROOU+uTMM4UJC[auZ}}5_S2eYgYiZkkՖZn[pd.]ue]w߅7^y祷^{<;Wq8eF8afa8ճ_O2nqcE8c$&dOvb~-}G{ꡇx9gxQ眞AfiEÏ>XiPB$@#gfqnZ$e%*e[aY孻ngsFcrū>j%ڈVPAop\f ?<=8uv}pFan+FDi&>矷<P@g{/^ٞ{'~eg}{&t!pHZV%v NbHd}:AÇ>3.( +[N4A @!WnAЋ@/x #db{!q-#^HC4:x \~4 X|Ww@#0$`$I0I\ :q4$"GZl4 vu1axE) 3x%H0B NP0 l &5l@^/)LiH2)pr($&ЩL>0s'nK\qp~fh/tqOeWFN(2tSπc5UЇFT$$(0 +u(DON ~u̥dq3ݝ 2v RH gB$hG9ю2!@(tG]TJU$eLԤLM}jTwS.Id*مBXPTA60YLv J xe&وa؏D$HATz%!klW-+L]r(f0"U@j$@*E^B_1Mle{~]9™Nq##"d3^"Wʍq#:Mt8G0" qhEI4- p@p5[J 8Fh(ڰ{:5Z++$zk8ԥ2b#;qshBS١hC'яviJWt5 ;LoӟXA=jRvҥFEjV[zխ_kZ7ԵƵk^zֽ6_lbrF6 lfn͆ܞmjlvnmnnînn6aw}t+:dwv|>D3-Gxp7aؔQ}c[K5q'xnhkTr\g8G 'Zܳ]s2?mO\;8رt7OzԥnoD<]vtwǸBˣo{xGzGKP-{ Н/1yW|3_Zo|y͗y|~~%%}u{s{i$#H'(qU?}_?~x,'o f@73 U2j:jۿ@??{+4#x@a$d>p1ȿ? ATO\P$DF4F,DSirΛ1^Rڢ%kjS>˷߿ LÈ+D!;kp]TFyĹK>w-ztӨENͺְc˞6_41R*߿9YDIWxrΛ'8u/^8Ë/>О8f0!#e,WRũ$B'` X~ 2 >(V rBBJ2PJ(T p"b+b,(3x4($p 6lZ ^KmV+.&.覫춋o? P$jAW 0_1pl0  7,13O0[ ,$3@R"HiQLs(3p6׬?s4G#7 4JG3TWmXg>АB@JsYL!EEot-wx|}w߀.8,L)O,AD7İw9.褗.:覧꩓A<@G /p /o'70D< &Bo觯/J PP H;libjcalendar-java-1.3.3.orig/doc/images/JLocaleChooserMono32.gif0000644000175000017500000000016711176613654024315 0ustar twernertwernerGIF89a !, Nڋ޼H&P)&1J3ؼq.`!#R{GRY!6M.V;libjcalendar-java-1.3.3.orig/doc/images/JMonthChooserColor16.gif0000644000175000017500000000161211176613654024347 0ustar twernertwernerGIF89a@@@ddaaffX!,gH*TÇ(@b@ pࠤ 0`@4@y`ʖ#0GDX@tϊ(MSHJu«X;libjcalendar-java-1.3.3.orig/doc/images/JYearChooserMono16.gif0000644000175000017500000000011711176613654024013 0ustar twernertwernerGIF89a!,&uܞq\y$a֩HύzP;libjcalendar-java-1.3.3.orig/doc/images/JMonthChooserColor32.gif0000644000175000017500000000172511176613654024352 0ustar twernertwernerGIF89a @@@ddX!, @ H*\`C ظ1c CIR`C(SXeˏOyр͛7aɳϟ=eBQ *UЉFZ Φ hʵׯ@ÊKٳa]˶۷V:եݦrxQΕza8xpMWA|KZh3k޼9 ;libjcalendar-java-1.3.3.orig/doc/images/JSpinFieldMono32.gif0000644000175000017500000000016111176613654023442 0ustar twernertwernerGIF89a !, Hڋɠny Oh]Lt(U=%`AğJhܮ ;libjcalendar-java-1.3.3.orig/doc/images/JDateChooser.gif0000644000175000017500000000447211176613654023000 0ustar twernertwernerGIF89akP ???IIIuuuwwwyyy{{{|||~~~ddaaffX´ôŷŶŷǹȹȺʻʻ˼˼̽;Ϳξ!,kP%H*\РHŋ3jȱcE =Z Rɓ(SJS'N,QѢCF I@ rJ4!5RPҥ؁ ']/YbIӥw֍wplhOleDR  "|$A裐F:CaV馚R*iHJѝc*j?RL3tSN;DJQI-SQM5+=j`E[o%]v P^EvDߊݢX%9eZkm[ʛk& ѽKf_w7r=oEpLfyxw0ߋ! | ]q欱 'H*2B؂B/p߼㼱΢|$_g '<3hK2h#^ɚ&QCK|}UOF9eWfe_"kxyfkfsY矁Z衉.(.;GnZ:{{'L2dN:Sw(JQFSNA%U7:H[{y.[qU]yyn>G ip FE,=0=>3YϾ񸬁)y`'e D"nvB78$EPb#T:$%*Y KZ⒗t=LhR'9NE,D'@ PB1w#HHM!w,UFB Md"ȌDt7 ^~I U{UdA'A)JRJyBtU^ao+3Ie)Eѽ |%9cʼZA}ӚFT 9T3I-A&J~ZQ4d&;Z._k(e~)?i7XĂ2^9rH 4 :2 X$WfATUzv!N&Bj!3Vt2U=z> R&,ZlplONt! =-*g:vӚ-!o}5 %S2c5[TF6Y(cEa4f{gڬ|ch(Dqu,J[Ҙδ7-e 9;libjcalendar-java-1.3.3.orig/doc/images/JYearChooserColor32.gif0000644000175000017500000000174211176613654024164 0ustar twernertwernerGIF89a @@@ddX!,  H*\ȰÇ#JHŋhȱǏ I\2@"I Prf r&3K5i:2ES`̡#m

jKRK㞜[*U^6@cJ@˘3kϠCMi;libjcalendar-java-1.3.3.orig/doc/images/JDayChooserMono32.gif0000644000175000017500000000016011176613654023624 0ustar twernertwernerGIF89a !, Gڋ"k嗖\xEHÚF$bvjܮ ^;libjcalendar-java-1.3.3.orig/doc/images/JDayChooserColor32.gif0000644000175000017500000000200711176613654023774 0ustar twernertwernerGIF89a )))@@@!!))99JJRRccccssss{{猌甔筭!, H*\ȰÇ#JHŋȱǏpɓ(S` brL5o%L4raΘ<[|3M AN=|zզ*HkRMr0B4JМHXz) `@\j@ƂvZYiC ӨS^@c˞M[vrͻn N;libjcalendar-java-1.3.3.orig/doc/images/JSpinFieldColor16.gif0000644000175000017500000000157511176613654023624 0ustar twernertwernerGIF89a???@@@!,ZH*TÇH@D^ (`# 0ˎ@i%xBZSH"]ȴiӀ;libjcalendar-java-1.3.3.orig/doc/images/JSpinField2.gif0000644000175000017500000000213711176613654022533 0ustar twernertwernerGIF89avuuuwwwyyy{{{|||~~~!,vH*\ȰC'"JHŋ3j1&Jǎ(S\G >xa .X@d˟@r|sf͛9wʴiS2iĩOXvj4JjKv"Hj[\@ҷx)*+q|'x(ضy>wq㾀%nˌ3G|Hvc͙MK>3ʣI=- v1jΨQ>lV߿C&̺am:0c띙6JY<yq-Y/xno^(N A<@ ,P;libjcalendar-java-1.3.3.orig/doc/images/JCalendarColor32.gif0000644000175000017500000000204711176613654023451 0ustar twernertwernerGIF89a )))@@@!!))99JJRRccccssss{{X猌甔筭!, #H*\ȰÇ#JH1b3jc4II2 頥K@&͘R%N 6mY0ɣ'!PA*Udj5S c9P-Ȣ p:OZmhW (oZ7( oP<. &iZ2PVؑO,.@ wGFtŞyV@SlN jjDU' s}pbU7Z06]1&EڽdNZDޱ` q9j\ ]]JA0 k)\Sӌ6I&_1# -h b>TeYw' Ya'rTiU 9ҕFL0FZ1AUiɛE1*Cd*`vYupuXw .̲x˦Ja'|Z* ܺSI:>ma² fXg 2a#0d{D q"ˊ pB! 0]`Nƹ0$ `m'Oa B' ( \l urlX Nq %8$pom"``EV*&  '{de. pІP,ed.m)+JjOd"?.`B6 121|ԍjFpq-ظaT]W"lafJ)gSXX>ܽ0@&LU-dPV %l~2|㮮BφB{PZxo{lO@מ| %prۀg #8T@b+N#D3 8pn_Hx{-(]`h_ "a1킁 cs@`sE#kxdBfZ> 0%Z@ <] l$%2܎eW?A?).~0,Rpk|5tS_>A0 -H PV E<؀^d!r`xi3A&0n'Xp=0 2 [{J`%*Ca6) x@59Jj$ BP 1/Q9LJ(䀁%V@ (6z2@\'VD1KQ8zn K V`ChTKIu⡍ȧKQ2|p0wh*MDbK߈fJYHKR ''9e/^}UDTjpR,< ]]7DA00(fXp$ SYY ` RK:tO+0M Z-3'BBk[BFL+MN'+U ]q*4Zd2KpI.2tiF9 (uŀY5\)Bk63KsԬq_Px<5P\ Y8LÂpXpf2@s)a- ٰ;.``Z=B+ b7pZ" 4iDAV;:5i@( ;s>l k!w-9m(f.-YG}Q"ajD(hdo8.]KS X} 988b, &oYeV6] ipZg;;dJFt 5jQ⶛kq3d~a0,몗-$Squ{rN;libjcalendar-java-1.3.3.orig/doc/images/JDayChooserMono16.gif0000644000175000017500000000011111176613654023622 0ustar twernertwernerGIF89a!, wMNQ[]bɅ(3R.;libjcalendar-java-1.3.3.orig/doc/images/JDayChooser.gif0000644000175000017500000001511711176613654022636 0ustar twernertwernerGIF89ardddZõĶƸƸǸȹʻɺʻ˽̽̾ͽο!,rH*\ȰÇ#JHŋ3jȱǏ CIɓ(S\9RC,c@sE0༉s'Ŝ@4sПE R634b՗**PMBAF8fͱ]gR^a6M-йtZJʱs˶ky;KǗ!;ʙ2ݤn!L,ħ#̺/\ykm˷]KpҨqpogX7<98D."Rޛo;o|pK: p _pC Wp,,2%s@P<Do\+:爳6}44K($BCd4NC-5]4Z/QOeW+] Wgm7hvVMg{: TE;6d} -LriH8kgy矇Ozkι砋/_nyzn:z_:+/<Άl@Y=X 2?~0I!y=_>2Ͼw=83Η}Y(?=|3 XA^; G).{B*ҢQnd0 Cbh@&Hi-|a eHCP(jB8CDFFEOe8~@JGIJHIԅTK`IdąDKWhKc$H䅬tZIKthtKsXmhK(JsO4N MԈNP8ONĈĂMNt4C!RN؊hJ$8$ERJQ1UT5RTBS%TT9QLT(HT;?52X8 (R8QxTQEqUYaXXxXXY5YXuYe7HX5 X WuJ WWc Z]\[\["Y]%^ ]ee^1ɒ/i%-9]5I7]9I#Z+ ]+Gbbc`֔*6b,F'bQbSa[`]_ib/ƕW^Y g)iɔlha+7gYVgAvgi&gkveqvIfnvfpfL旅exfIvfɗfɘ{)} y)irkkiFkhjkfkVv ƚ隵k}Fɛkhin5œ&n8"iݶٝ%)ilY;ri6oZo Yoiyo+) qqq"$ rog@b7z6`5P4@30r'(ڡp#'qBrr(WK.8x؁$[@%GbD$1OHvcE2: PddK 8 5ۃL89M4HR+E\_ʋ؇qHFhYʰBPx{y;KTy|8p({ vX(Dqp3[P芛Ċ8"xNX$7P3а|;˷ව "LO+xM4Oߴ{hRXHh[SGU$sp拾 JxKߛAȽ՛R娎گY~,%ӪPYl7۾ 9eY]Րܑ%W\{5W\+]) =ဤᄘ+xHިJ޵x{k+h24 {ox9O7/NB̋3mkQ&EQXkP>S+ \.S[.ȘRgd~sf8̑*xNF50l\ 8.79}>1؏?> ],d3Y[,C_^ꡮWK|ȐqIɈ악ȿƊ1쎼N^˷ ̙̽ˎ ˻혬ˋ.|˛LNl\ι) .Y}G֟[hp_lm:AN7;LDËL%Ol޽Oa@ Å <{h6hƄ%@ T!)ZĨ` 6|KL5męSN6 4Cy8ٲ]X `y2䇎.m4Ab?L:,Yv%6,\S^_O… yTb*զJ œY+OǑ'W3gϠE,eի;=di٨koZ7bōd\WBQ:^_"E 1\8ӫcwCN}ݿ'98,L9N1<Š)&pСP(a-tB + 7쐤|0BK$C 9pAE|Oq0{?Pc,b$2 !z.Ha-#TI'|r*̒-\I0ä+H4\S6,3H=294PA"B,EOCe4Em='5O4SM7SO?5TQG%SJO%. ;libjcalendar-java-1.3.3.orig/doc/images/JDayChooserColor16.gif0000644000175000017500000000160311176613654023777 0ustar twernertwernerGIF89a@@@ddaaff!,` H*TÇ@@E 0 FQ&@ pRAH'S~40@I2Qz(ģ c(Ӧ J;libjcalendar-java-1.3.3.orig/doc/images/JCalendarIcon.gif0000644000175000017500000000174411176613654023121 0ustar twernertwernerGIF89a)))999BBB!!))99JJRRccss猌甔筭ccss{{,C 0@ "Ç#Jt` 2j,Ǐq#ȓEǕ# y5/y&̝6iϙ>E)B "X`"LT/XxÆZ]B3!0SRelAH^o0, V/٦0` \8aYKrۑjFH@$BMt =^ͺk!;libjcalendar-java-1.3.3.orig/doc/images/JMonthChooser.gif0000644000175000017500000000303111176613654023176 0ustar twernertwernerGIF89a\ uuuwwwyyy{{{|||~~~´ôŷŶŷǹȹȺʻʻ˼˼̽;Ϳξο!,\H*\CpHŋ3jDi6UPaV-g͔%I͛8sILVDABO8mDIR4^8)qeKh͖%3Vׯ`ÊK/\LERdHOѣI6}u*Jn׮:YLX LaùXt:o*)TT]v/]CMӧeh6b"'@]w Yݷj Nȓ'O!7e\MvݗJwݱ^Oӧ(5]庙H-xX& 6`Dun51@,n"&8b#,b0 wv00@+%Va%BIH&L2 >GH8 (BJ&kJ¦p)tYgMC /PTG ҉%m}٨F*餔Vjih|1E4 5Ε]f0J&p무j뭸T * BHJ($2rqF -VkfkI ç"|@uw"GkS+k/@ '{cfzAadQEE Wlgq 0BlAclG5,4l8 , #x{]\DCp 2PG-TW]$P (=$dPWfe_yp-s;libjcalendar-java-1.3.3.orig/doc/images/JDateChooserMono32.gif0000644000175000017500000000020511176613654023764 0ustar twernertwernerGIF89a !, \:\/xـj_X&2+نE;Q2B245u&NfVk6;libjcalendar-java-1.3.3.orig/doc/images/JLocaleChooserColor16.gif0000644000175000017500000000160211176613654024460 0ustar twernertwernerGIF89a@@@ddaaffX!,_H*TÇx@DNPA x`c h0R0eɗp O&(ģ6 Xʴ)ӅPF ;libjcalendar-java-1.3.3.orig/doc/style.css0000644000175000017500000000307011176613654020375 0ustar twernertwerner/* CSS definition file containing sitestyle stylesheets */ BODY { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; text-decoration: none ; background-color: rgb(255,255,255);} P { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; text-decoration: none ;} TD { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; text-decoration: none ;} A { color: rgb(51,103,153); text-decoration: none ;} A:active { color: rgb(51,103,153); text-decoration: none ;} A:link { color: rgb(42,95,170); text-decoration: none ;} A:visited { color: rgb(51,103,153); text-decoration: none ;} A:hover { color: rgb(51,103,153); text-decoration: none ;} UL { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; font-weight: normal; font-style: normal; text-decoration: none ;} H1 { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 20px;} H2 { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 18px; font-weight: bold;} P { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px;} H3 { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold;} OL { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; text-decoration: none ;} .TextNavBar { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 9px; font-weight: normal; font-style: normal; text-decoration: none ;} .TextObject { font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; text-decoration: none ;} libjcalendar-java-1.3.3.orig/doc/api/0000755000175000017500000000000011176613654017274 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/doc/license.html0000644000175000017500000007536511176613654021053 0ustar twernertwerner GNU Lesser General Public License - GNU Project - Free Software Foundation (FSF)

GNU LESSER GENERAL PUBLIC LICENSE

Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.

This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.

When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.

To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.

For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.

We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.

To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.

Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.

Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.

When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.

We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.

For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.

In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.

Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.

The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".

A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

  • a) The modified work must itself be a software library.
  • b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
  • c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
  • d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.

    (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)

    These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

    Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.

    In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.

Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.

If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.

When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.

6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:

  • a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
  • b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
  • c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
  • d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
  • e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.

7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:

  • a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
  • b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.

11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.

14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).

To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the library's name and an idea of what it does.
Copyright (C) year name of author

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.

signature of Ty Coon, 1 April 1990
Ty Coon, President of Vice

That's all there is to it!

libjcalendar-java-1.3.3.orig/doc/index.html0000644000175000017500000003464311176613654020532 0ustar twernertwerner JCalendar Java Bean, a Java Date Chooser

JCalendar

© Kai Toedter 1999 - 2009
Version 1.3.3
05/01/09



Introduction
JCalendar is a Java date chooser bean for graphically picking a date. JCalendar is composed of several other Java beans, a JDayChooser, a JMonthChooser and a JYearChooser. All these beans have a locale property, provide several icons (Color 16x16, Color 32x32, Mono 16x16 and Mono 32x32) and their own locale property editor. So they can easily be used in GUI builders. Also part of the package is a JDateChooser, a bean composed of an IDateEditor (for direct date editing) and a button for opening a JCalendar for selecting the date.

License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. If you like and use it, just let me know. If you find any errors or things you don't like, please contact Kai Toedter.

Installation

The installation is very easy, just put jcalendar.jar in your class path. If you want to run the JCalendar demos (see below) or just use the great JGoodies Looks Look and Feel, put also looks-1.3.2.jar in your class path. Both are in the lib directory of this JCalendar distribution.

Running the Demos

To run the JCalendar demo applet in your browser, you must have installed the Java Plug-in. Click here to run the applet. If you have the distribution installed locally on your computer, there's several ways to run the demos. To start the JCalendar demo Windows Vista/XP/2000/NT/98 users can just right click the jcalendar.jar and open it with "javaw" or execute the "runJCalendarDemo.bat" batch file in the bin directory of this distribution. For all other operating systems, just put "jcalendar.jar" and looks-1.3.2.jar (both in the lib directory of the distribution) in your class path and start Java to execute the com.toedter.calendar.JCalendarDemo class.

Components
The following table shows a list of used components (all Java Beans). All the screen shots use the great Plastic 3D Look and Feel (included in JGoodies Looks by JGoodies), which is bundled with the JCalendar bean.

Icon 16x16

Icon 32x32

Component

Description

JDateChooser allows you to pick a date. You could either edit the date directly or click the image to popup a JCalendar to choose the date. The default date editor provides coloring of invalid dates as well as optional showing a mask. Also a JSpinnerDateEditor is provided that uses a JSpinner to display the date.

JCalendar allows you to choose a year, a month and a day. Depending on the locale, the month names and the weekday names change. The foreground of "today" is painted red. JCalendar is composed of several other beans described below.

JYearChooser is a JSpinField (see below) that allows you to choose a year by either typing the year in or using the spin buttons to increase or decrease the value.

JMonthChooser is a JComboBox that allows you to choose a month by either using the combo box or the spin buttons. The language of the month names is defined by the locale property.

JDayChooser lets you choose a day by clicking on the day number. Depending on the locale, the weekday names and the first days of the week change. The foreground of "today" is painted red. For navigation you can use the cursor and tab keys.




JSpinField lets you choose a numeric value. Properties for minimum and maximum values are provided. The value can be typed in directly or increased and decreased by the spin buttons. If you have typed in an incorrect value, the foreground color changes to red. Correct values are displayed green. After pressing the enter key the value will be set and displayed black. Since version 1.1.4 the preferred with of the value field is adjusted to the maximum of the width of minimum or maximum.

JLocaleChooser is a JComboBox that allows you to choose a locale. It can be used to test or set the locales of the beans above.


Requirements

All beans use Swing components, so you need to have the Java SE installed. All beans also work with Java SE 1.4.x and 5.

Download and Latest Version
You can download a zip file, containing all the sources, libs and documentation at www.toedter.com/download/jcalendar-1.3.3.zip (600 KB). Version 1.1.4 is still available at www.toedter.com/download/jcalendar-1.1.4.zip. Version 1.1.4 works with J2SDK 1.2 and 1.3, since it does not use JSpinner.

API Documentation
The complete API documentation is generated with JavaDoc. The API documentation is available with frames or without frames.

Bugs and FeatureRequests
Please file bugs and feature requests at http://max-server.myftp.org/trac/jcalendar.

User Forum
JCalendar has an active user forum: http://www.toedter.com/forum/forum.php.

History
1.3.3:
- Bug fixed when browsing through last days of months
1.3.2:
- Many bug fixes (thanks to all forum posters)
- Min/Max selectable dates now in the date editor interface
- Improvements regarding property change listeners (better null date support)
- New method "cleanup" in JDateChooser
1.3.1:
- UI & Look & Feel improvements (especially Windows L&F)
- JCalendar supports a date range of selectable dates
- JDayChooser can now limit the number of characters in day Names (e.g. Mo instead of Mon)
1.3.0:
- Many bug fixes (thanks to all forum posters)
- Better handling of null dates in JDateChooser
- Introduction of the interface IDateEditor
- JTextFieldDateEditor (the default editor) supports custom date patterns and masks
- JSpinnerDateEditor is an implemantation of IDateEditor based on a JSpinner
- JDateChooser Table editor (including table demo)
- Both the zip and the jar files contain the version in the name, e.g. jcalendar-3.1.0.jar
1.2.2:
- Bug in DateChooser.setModel fixed (thanks to Martin Pietruschka)
- NullPointer exception bug on DateChooser.setDate fixed (thanks to Aleksey Gureev and others).
1.2.1:
- JDateChooser bug fixed (sometimes the date was 1 day ahead of the selected date, many thanks
   to Mark Brown and all the others who reported this bug).
- JDateChooser improvements for better usability in persistence frameworks like Oracle's ADF/BC4J
   (thanks to Mark Brown).
1.2:
- Many small improvements and bug fixes, thanks to many comments of JCalendar users
- A new JDateChooser bean, which allows to be used as an editable date field and a calendar image,    that pops up a JCalendar for choosing the date.
- An optional "week of year" panel in JDayChooser
- Better customization of most beans
- Improvements in all BeanInfos
- Bundling with my favorite Look and Feel: JGoodies Looks (www.jgoodies.com)

Awards
This bean won first prize in the beans contest of the International Java Club. JCalendar was rated top25% by JARS (, 856 out of 1000).

libjcalendar-java-1.3.3.orig/src/0000755000175000017500000000000011176613654016545 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/build.xml0000644000175000017500000001556011176613654020375 0ustar twernertwerner libjcalendar-java-1.3.3.orig/src/com/0000755000175000017500000000000011176613654017323 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/0000755000175000017500000000000011176613654020771 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/components/0000755000175000017500000000000011176613654023156 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/components/GenericBeanInfo.java0000644000175000017500000000524711176613654027007 0ustar twernertwerner/* * GenericBeanInfo.java - Bean Info base for all toedter.com beans * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; import java.awt.Image; import java.beans.PropertyEditorManager; import java.beans.SimpleBeanInfo; import java.util.Locale; /** * A generic bean info class use by all bean infos of the JCalendar bean suite. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class GenericBeanInfo extends SimpleBeanInfo { /** 16x16 color icon. */ protected Image iconColor16; /** 32x32 color icon. */ protected Image iconColor32; /** 16x16 mono icon. */ protected Image iconMono16; /** 32x32 mono icon. */ protected Image iconMono32; /** * Constructs a new BeanInfo. */ public GenericBeanInfo(String bean, boolean registerLocaleEditor) { try { iconColor16 = loadImage("images/" + bean + "Color16.gif"); iconColor32 = loadImage("images/" + bean + "Color32.gif"); iconMono16 = loadImage("images/" + bean + "Mono16.gif"); iconMono32 = loadImage("images/" + bean + "Mono32.gif"); } catch (RuntimeException e) { System.out.println("GenericBeanInfo.GenericBeanInfo(): " + e); } if(registerLocaleEditor) { PropertyEditorManager.registerEditor(Locale.class,LocaleEditor.class); } } /** * This method returns an image object that can be used to represent the * bean in toolboxes, toolbars, etc. * * @param iconKind * the kind of requested icon * * @return the icon image */ public Image getIcon(int iconKind) { switch (iconKind) { case ICON_COLOR_16x16 : return iconColor16; case ICON_COLOR_32x32 : return iconColor32; case ICON_MONO_16x16 : return iconMono16; case ICON_MONO_32x32 : return iconMono32; } return null; } }libjcalendar-java-1.3.3.orig/src/com/toedter/components/JSpinFieldBeanInfo.java0000644000175000017500000000247211176613654027417 0ustar twernertwerner/* * JSpinFieldBeanInfo.java - Bean Info for JSpinField * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; /** * A BeanInfo class for the JLocaleChooser bean. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JSpinFieldBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JLocaleChooser bean. */ public JSpinFieldBeanInfo() { super("JSpinField", false); } }libjcalendar-java-1.3.3.orig/src/com/toedter/components/JLocaleChooser.java0000644000175000017500000000711011176613654026654 0ustar twernertwerner/* * JLocaleChooser.java - A bean for choosing locales * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.Calendar; import java.util.Locale; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JFrame; /** * JLocaleChooser is a bean for choosing locales. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JLocaleChooser extends JComboBox implements ItemListener { private static final long serialVersionUID = 8152430789764877431L; protected JComponent component; /** * Default JLocaleChooser constructor. */ public JLocaleChooser() { this(null); } /** * Returns "JLocaleChoose". * * @return the name value */ public String getName() { return "JLocaleChoose"; } /** * Default JLocaleChooser constructor. */ public JLocaleChooser(JComponent component) { super(); this.component = component; addItemListener(this); locales = Calendar.getAvailableLocales(); localeCount = locales.length; for (int i = 0; i < localeCount; i++) { if (locales[i].getCountry().length() > 0) { addItem(locales[i].getDisplayName()); } } setLocale(Locale.getDefault()); } /** * The ItemListener for the locales. */ public void itemStateChanged(ItemEvent iEvt) { String item = (String) iEvt.getItem(); int i; for (i = 0; i < localeCount; i++) { if (locales[i].getDisplayName().equals(item)) break; } setLocale(locales[i], false); } /** * Sets the locale. * * @see #getLocale */ private void setLocale(Locale l, boolean select) { Locale oldLocale = locale; locale = l; int n = 0; if (select) { for (int i = 0; i < localeCount; i++) { if (locales[i].getCountry().length() > 0) { if (locales[i].equals(locale)) setSelectedIndex(n); n += 1; } } } firePropertyChange("locale", oldLocale, locale); if(component != null) { component.setLocale(l); } } /** * Sets the locale. This is a bound property. * * @see #getLocale */ public void setLocale(Locale l) { setLocale(l, true); } /** * Returns the locale. */ public Locale getLocale() { return locale; } /** * Creates a JFrame with a JLocaleChooser inside and can be used for * testing. */ static public void main(String[] s) { JFrame frame = new JFrame("LocaleChooser"); frame.getContentPane().add(new JLocaleChooser()); frame.pack(); frame.setVisible(true); } private Locale[] locales; private Locale locale; private int localeCount; } libjcalendar-java-1.3.3.orig/src/com/toedter/components/LocaleEditor.java0000644000175000017500000000454211176613654026374 0ustar twernertwerner/* * LocaleEditor.java - a locale editor for JavaBeans * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; import java.util.Calendar; import java.util.Locale; /** * Property editor for locales. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class LocaleEditor extends java.beans.PropertyEditorSupport { private Locale[] locales; private String[] localeStrings; private Locale locale; private int length; /** * Default LocaleEditor constructor. */ public LocaleEditor() { locale = Locale.getDefault(); locales = Calendar.getAvailableLocales(); length = locales.length; localeStrings = new String[length]; } /** * Returns the locale strings. * * @return the locale strings */ public String[] getTags() { for (int i = 0; i < length; i++) localeStrings[i] = locales[i].getDisplayName(); return localeStrings; } /** * Sets the locale strings as text and invokes setValue( locale ). * * @param text * the locale string text * * @throws IllegalArgumentException * not used */ public void setAsText(String text) throws IllegalArgumentException { for (int i = 0; i < length; i++) if (text.equals(locales[i].getDisplayName())) { locale = locales[i]; setValue(locale); break; } } /** * Returns the locale string as text. * * @return the locale string */ public String getAsText() { return locale.getDisplayName(); } }libjcalendar-java-1.3.3.orig/src/com/toedter/components/JTitlePanel.java0000644000175000017500000001004211176613654026171 0ustar twernertwerner/* * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; import java.awt.BorderLayout; import java.awt.Color; import java.awt.GradientPaint; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Paint; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.border.Border; /** * A simple JPanel with a border and a title * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JTitlePanel extends JPanel { private static final long serialVersionUID = 9104873267039717087L; protected JPanel northPanel; protected JLabel label; /** * Constructs a titled panel. * * @param title the title * @param content the JComponent that contains the content * @param outerBorder the outer border */ public JTitlePanel(String title, Icon icon, JComponent content, Border outerBorder) { setLayout(new BorderLayout()); label = new JLabel(title, icon, JLabel.LEADING); label.setForeground(Color.WHITE); GradientPanel titlePanel = new GradientPanel(Color.BLACK); titlePanel.setLayout(new BorderLayout()); titlePanel.add(label, BorderLayout.WEST); int borderOffset = 2; if(icon == null) { borderOffset += 1; } titlePanel.setBorder(BorderFactory.createEmptyBorder(borderOffset, 4, borderOffset, 1)); add(titlePanel, BorderLayout.NORTH); JPanel northPanel = new JPanel(); northPanel.setLayout(new BorderLayout()); northPanel.add(content,BorderLayout.NORTH); northPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); add(northPanel, BorderLayout.CENTER); if (outerBorder == null) { setBorder(BorderFactory.createLineBorder(Color.GRAY)); } else { setBorder(BorderFactory.createCompoundBorder(outerBorder, BorderFactory.createLineBorder(Color.GRAY))); } } public void setTitle(String label, Icon icon) { this.label.setText(label); this.label.setIcon(icon); } private static class GradientPanel extends JPanel { private static final long serialVersionUID = -6385751027379193053L; private GradientPanel(Color background) { setBackground(background); } public void paintComponent(Graphics g) { super.paintComponent(g); if (isOpaque()) { // Color controlColor = UIManager.getColor("control"); // Color controlColor = new Color(252, 198, 82); Color controlColor = new Color(99, 153, 255); int width = getWidth(); int height = getHeight(); Graphics2D g2 = (Graphics2D) g; Paint oldPaint = g2.getPaint(); g2.setPaint(new GradientPaint(0, 0, getBackground(), width, 0, controlColor)); g2.fillRect(0, 0, width, height); g2.setPaint(oldPaint); } } } } libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/0000755000175000017500000000000011176613654024423 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JSpinFieldColor32.gif0000644000175000017500000000171211176613654030246 0ustar twernertwernerGIF89a @@@!, H*\ȰÇ#JHŋhȱǏ II"O 0``J*y,]„O@})Β T)QF$@jէQ~زTYIbt&S3ǒ])Pk*]:\ź߮L+^̸ǐ# ;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JLocaleChooserColor32.gif0000644000175000017500000000171611176613654031117 0ustar twernertwernerGIF89a @@@ddX!,  H*\ȰÇ#JHŋ3jǏ C$`ɓ(S.(dS e͕0<9f@}eϚX@:eDASUih2 {@+3z]in v˸xTo\" S`È+^xǐ#KL€;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JSpinFieldMono16.gif0000644000175000017500000000011311176613654030074 0ustar twernertwernerGIF89a!,"uN7aHn݆t${Lv;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JLocaleChooserMono32.gif0000644000175000017500000000016711176613654030750 0ustar twernertwernerGIF89a !, Nڋ޼H&P)&1J3ؼq.`!#R{GRY!6M.V;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JSpinFieldMono32.gif0000644000175000017500000000016111176613654030075 0ustar twernertwernerGIF89a !, Hڋɠny Oh]Lt(U=%`AğJhܮ ;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JSpinFieldColor16.gif0000644000175000017500000000157511176613654030257 0ustar twernertwernerGIF89a???@@@!,ZH*TÇH@D^ (`# 0ˎ@i%xBZSH"]ȴiӀ;libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JLocaleChooserMono16.gif0000644000175000017500000000011411176613654030742 0ustar twernertwernerGIF89a!,#uΆ~ya!}%lGC6];libjcalendar-java-1.3.3.orig/src/com/toedter/components/images/JLocaleChooserColor16.gif0000644000175000017500000000160211176613654031113 0ustar twernertwernerGIF89a@@@ddaaffX!,_H*TÇx@DNPA x`c h0R0eɗp O&(ģ6 Xʴ)ӅPF ;libjcalendar-java-1.3.3.orig/src/com/toedter/components/JSpinField.java0000644000175000017500000002261411176613654026015 0ustar twernertwerner/* * JSpinField.java - A spin field using a JSpinner (JDK 1.4) * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.JTextField; import javax.swing.SpinnerNumberModel; import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; /** * JSpinField is a numeric field with 2 spin buttons to increase or decrease the * value. It has the same interface as the "old" JSpinField but uses a JSpinner * internally (since J2SE SDK 1.4) rather than a scrollbar for emulating the * spin buttons. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JSpinField extends JPanel implements ChangeListener, CaretListener, ActionListener, FocusListener { private static final long serialVersionUID = 1694904792717740650L; protected JSpinner spinner; /** the text (number) field */ protected JTextField textField; protected int min; protected int max; protected int value; protected Color darkGreen; /** * Default JSpinField constructor. The valid value range is between * Integer.MIN_VALUE and Integer.MAX_VALUE. The initial value is 0. */ public JSpinField() { this(Integer.MIN_VALUE, Integer.MAX_VALUE); } /** * JSpinField constructor with given minimum and maximum vaues and initial * value 0. */ public JSpinField(int min, int max) { super(); setName("JSpinField"); this.min = min; if (max < min) max = min; this.max = max; value = 0; if (value < min) value = min; if (value > max) value = max; darkGreen = new Color(0, 150, 0); setLayout(new BorderLayout()); textField = new JTextField(); textField.addCaretListener(this); textField.addActionListener(this); textField.setHorizontalAlignment(SwingConstants.RIGHT); textField.setBorder(BorderFactory.createEmptyBorder()); textField.setText(Integer.toString(value)); textField.addFocusListener(this); spinner = new JSpinner() { private static final long serialVersionUID = -6287709243342021172L; private JTextField textField = new JTextField(); public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); return new Dimension(size.width, textField.getPreferredSize().height); } }; spinner.setEditor(textField); spinner.addChangeListener(this); // spinner.setSize(spinner.getWidth(), textField.getHeight()); add(spinner, BorderLayout.CENTER); } public void adjustWidthToMaximumValue() { JTextField testTextField = new JTextField(Integer.toString(max)); int width = testTextField.getPreferredSize().width; int height = testTextField.getPreferredSize().height; textField.setPreferredSize(new Dimension(width, height)); textField.revalidate(); } /** * Is invoked when the spinner model changes * * @param e * the ChangeEvent */ public void stateChanged(ChangeEvent e) { SpinnerNumberModel model = (SpinnerNumberModel) spinner.getModel(); int value = model.getNumber().intValue(); setValue(value); } /** * Sets the value attribute of the JSpinField object. * * @param newValue * The new value * @param updateTextField * true if text field should be updated */ protected void setValue(int newValue, boolean updateTextField, boolean firePropertyChange) { int oldValue = value; if (newValue < min) { value = min; } else if (newValue > max) { value = max; } else { value = newValue; } if (updateTextField) { textField.setText(Integer.toString(value)); textField.setForeground(Color.black); } if (firePropertyChange) { firePropertyChange("value", oldValue, value); } } /** * Sets the value. This is a bound property. * * @param newValue * the new value * * @see #getValue */ public void setValue(int newValue) { setValue(newValue, true, true); spinner.setValue(new Integer(value)); } /** * Returns the value. * * @return the value value */ public int getValue() { return value; } /** * Sets the minimum value. * * @param newMinimum * the new minimum value * * @see #getMinimum */ public void setMinimum(int newMinimum) { min = newMinimum; } /** * Returns the minimum value. * * @return the minimum value */ public int getMinimum() { return min; } /** * Sets the maximum value and adjusts the preferred width. * * @param newMaximum * the new maximum value * * @see #getMaximum */ public void setMaximum(int newMaximum) { max = newMaximum; } /** * Sets the horizontal alignment of the displayed value. * * @param alignment * the horizontal alignment */ public void setHorizontalAlignment(int alignment) { textField.setHorizontalAlignment(alignment); } /** * Returns the maximum value. * * @return the maximum value */ public int getMaximum() { return max; } /** * Sets the font property. * * @param font * the new font */ public void setFont(Font font) { if (textField != null) { textField.setFont(font); } } /** * Sets the foreground * * @param fg * the foreground */ public void setForeground(Color fg) { if (textField != null) { textField.setForeground(fg); } } /** * After any user input, the value of the textfield is proofed. Depending on * being an integer, the value is colored green or red. * * @param e * the caret event */ public void caretUpdate(CaretEvent e) { try { int testValue = Integer.valueOf(textField.getText()).intValue(); if ((testValue >= min) && (testValue <= max)) { textField.setForeground(darkGreen); setValue(testValue, false, true); } else { textField.setForeground(Color.red); } } catch (Exception ex) { if (ex instanceof NumberFormatException) { textField.setForeground(Color.red); } // Ignore all other exceptions, e.g. illegal state exception } textField.repaint(); } /** * After any user input, the value of the textfield is proofed. Depending on * being an integer, the value is colored green or red. If the textfield is * green, the enter key is accepted and the new value is set. * * @param e * Description of the Parameter */ public void actionPerformed(ActionEvent e) { if (textField.getForeground().equals(darkGreen)) { setValue(Integer.valueOf(textField.getText()).intValue()); } } /** * Enable or disable the JSpinField. * * @param enabled * The new enabled value */ public void setEnabled(boolean enabled) { super.setEnabled(enabled); spinner.setEnabled(enabled); textField.setEnabled(enabled); /* * Fixes the background bug * 4991597 and sets the background explicitely to a * TextField.inactiveBackground. */ if (!enabled) { textField.setBackground(UIManager.getColor("TextField.inactiveBackground")); } } /** * Returns the year chooser's spinner (which allow the focus to be set to * it). * * @return Component the spinner or null, if the month chooser has no * spinner */ public Component getSpinner() { return spinner; } /** * Creates a JFrame with a JSpinField inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("JSpinField"); frame.getContentPane().add(new JSpinField()); frame.pack(); frame.setVisible(true); } /* * (non-Javadoc) * * @see java.awt.event.FocusListener#focusGained(java.awt.event.FocusEvent) */ public void focusGained(FocusEvent e) { } /** * The value of the text field is checked against a valid (green) value. If * valid, the value is set and a property change is fired. */ public void focusLost(FocusEvent e) { actionPerformed(null); } }libjcalendar-java-1.3.3.orig/src/com/toedter/components/JLocaleChooserBeanInfo.java0000644000175000017500000000251511176613654030262 0ustar twernertwerner/* * JLocaleChooserBeanInfo.java - Bean Info for JLocaleChooser * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.components; /** * A BeanInfo class for the JLocaleChooser bean. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JLocaleChooserBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JLocaleChooser bean. */ public JLocaleChooserBeanInfo() { super("JLocaleChooser", true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/plaf/0000755000175000017500000000000011176613654021713 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/plaf/JCalendarTheme.java0000644000175000017500000000743011176613654025370 0ustar twernertwerner/* * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.plaf; import java.awt.Font; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.FontUIResource; import javax.swing.plaf.metal.DefaultMetalTheme; /** * The JCalendar theme. The colors are based on the theme "Experience Bue" of * the great Plastic3D Look and feel by JGoddies (www.jgoodies.com) * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JCalendarTheme extends DefaultMetalTheme { static final ColorUIResource secondary1 = new ColorUIResource(128, 128, 128); static final ColorUIResource secondary2 = new ColorUIResource(189, 190, 176); static final ColorUIResource secondary3 = new ColorUIResource(236, 233, 216); static final ColorUIResource BLUE_LOW_MEDIUM = new ColorUIResource(166, 202, 240); static final ColorUIResource BLUE_LOW_LIGHTEST = new ColorUIResource(195, 212, 232); static final ColorUIResource BLUE_MEDIUM_DARKEST = new ColorUIResource(44, 73, 135); static final ColorUIResource BLUE_MEDIUM_DARK = new ColorUIResource(49, 106, 196); static final ColorUIResource BLUE_MEDIUM_MEDIUM = new ColorUIResource(85, 115, 170); static final ColorUIResource ORANGE_FOCUS = new ColorUIResource(245, 165, 16); static final ColorUIResource GREEN_CHECK = new ColorUIResource(33, 161, 33); static final ColorUIResource WHITE = new ColorUIResource(255, 255, 255); static final FontUIResource standardFont = new FontUIResource( new Font("Tahoma", Font.PLAIN, 11)); /** * Creates a new JCalendarTheme object. */ public JCalendarTheme() { } public String getName() { return "JCalendar Theme"; } protected Font getFont() { return new Font("Dialog", Font.PLAIN, 12); } public FontUIResource getSystemTextFont() { return standardFont; } public FontUIResource getUserTextFont() { return standardFont; } public FontUIResource getControlTextFont() { return standardFont; } public FontUIResource getMenuTextFont() { return standardFont; } protected ColorUIResource getPrimary1() { return BLUE_MEDIUM_DARK; } protected ColorUIResource getPrimary2() { return BLUE_LOW_MEDIUM; } protected ColorUIResource getPrimary3() { return BLUE_LOW_LIGHTEST; } protected ColorUIResource getSecondary1() { return secondary1; } protected ColorUIResource getSecondary2() { return secondary2; } protected ColorUIResource getSecondary3() { return secondary3; } public ColorUIResource getFocusColor() { return ORANGE_FOCUS; } public ColorUIResource getPrimaryControlShadow() { return getPrimary3(); } public ColorUIResource getMenuSelectedBackground() { return getPrimary1(); } public ColorUIResource getMenuSelectedForeground() { return WHITE; } public ColorUIResource getMenuItemBackground() { return WHITE; } public ColorUIResource getToggleButtonCheckColor() { return GREEN_CHECK; } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/0000755000175000017500000000000011176613654022542 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JDateChooser.java0000644000175000017500000003661411176613654025731 0ustar twernertwerner/* * JDateChooser.java - A bean for choosing a date * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.awt.BorderLayout; import java.awt.Font; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.net.URL; import java.util.Calendar; import java.util.Date; import java.util.Locale; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.MenuElement; import javax.swing.MenuSelectionManager; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; /** * A date chooser containig a date editor and a button, that makes a JCalendar * visible for choosing a date. If no date editor is specified, a * JTextFieldDateEditor is used as default. * * @author Kai Toedter * @version $LastChangedRevision: 101 $ * @version $LastChangedDate: 2006-06-04 14:42:29 +0200 (So, 04 Jun 2006) $ */ public class JDateChooser extends JPanel implements ActionListener, PropertyChangeListener { private static final long serialVersionUID = -4306412745720670722L; protected IDateEditor dateEditor; protected JButton calendarButton; protected JCalendar jcalendar; protected JPopupMenu popup; protected boolean isInitialized; protected boolean dateSelected; protected Date lastSelectedDate; private ChangeListener changeListener; /** * Creates a new JDateChooser. By default, no date is set and the textfield * is empty. */ public JDateChooser() { this(null, null, null, null); } /** * Creates a new JDateChooser with given IDateEditor. * * @param dateEditor * the dateEditor to be used used to display the date. if null, a * JTextFieldDateEditor is used. */ public JDateChooser(IDateEditor dateEditor) { this(null, null, null, dateEditor); } /** * Creates a new JDateChooser. * * @param date * the date or null */ public JDateChooser(Date date) { this(date, null); } /** * Creates a new JDateChooser. * * @param date * the date or null * @param dateFormatString * the date format string or null (then MEDIUM SimpleDateFormat * format is used) */ public JDateChooser(Date date, String dateFormatString) { this(date, dateFormatString, null); } /** * Creates a new JDateChooser. * * @param date * the date or null * @param dateFormatString * the date format string or null (then MEDIUM SimpleDateFormat * format is used) * @param dateEditor * the dateEditor to be used used to display the date. if null, a * JTextFieldDateEditor is used. */ public JDateChooser(Date date, String dateFormatString, IDateEditor dateEditor) { this(null, date, dateFormatString, dateEditor); } /** * Creates a new JDateChooser. If the JDateChooser is created with this * constructor, the mask will be always visible in the date editor. Please * note that the date pattern and the mask will not be changed if the locale * of the JDateChooser is changed. * * @param datePattern * the date pattern, e.g. "MM/dd/yy" * @param maskPattern * the mask pattern, e.g. "##/##/##" * @param placeholder * the placeholer charachter, e.g. '_' */ public JDateChooser(String datePattern, String maskPattern, char placeholder) { this(null, null, datePattern, new JTextFieldDateEditor(datePattern, maskPattern, placeholder)); } /** * Creates a new JDateChooser. * * @param jcal * the JCalendar to be used * @param date * the date or null * @param dateFormatString * the date format string or null (then MEDIUM Date format is * used) * @param dateEditor * the dateEditor to be used used to display the date. if null, a * JTextFieldDateEditor is used. */ public JDateChooser(JCalendar jcal, Date date, String dateFormatString, IDateEditor dateEditor) { setName("JDateChooser"); this.dateEditor = dateEditor; if (this.dateEditor == null) { this.dateEditor = new JTextFieldDateEditor(); } this.dateEditor.addPropertyChangeListener("date", this); if (jcal == null) { jcalendar = new JCalendar(date); } else { jcalendar = jcal; if (date != null) { jcalendar.setDate(date); } } setLayout(new BorderLayout()); jcalendar.getDayChooser().addPropertyChangeListener("day", this); // always fire"day" property even if the user selects // the already selected day again jcalendar.getDayChooser().setAlwaysFireDayProperty(true); setDateFormatString(dateFormatString); setDate(date); // Display a calendar button with an icon URL iconURL = getClass().getResource( "/com/toedter/calendar/images/JDateChooserIcon.gif"); ImageIcon icon = new ImageIcon(iconURL); calendarButton = new JButton(icon) { private static final long serialVersionUID = -1913767779079949668L; public boolean isFocusable() { return false; } }; calendarButton.setMargin(new Insets(0, 0, 0, 0)); calendarButton.addActionListener(this); // Alt + 'C' selects the calendar. calendarButton.setMnemonic(KeyEvent.VK_C); add(calendarButton, BorderLayout.EAST); add(this.dateEditor.getUiComponent(), BorderLayout.CENTER); calendarButton.setMargin(new Insets(0, 0, 0, 0)); // calendarButton.addFocusListener(this); popup = new JPopupMenu() { private static final long serialVersionUID = -6078272560337577761L; public void setVisible(boolean b) { Boolean isCanceled = (Boolean) getClientProperty("JPopupMenu.firePopupMenuCanceled"); if (b || (!b && dateSelected) || ((isCanceled != null) && !b && isCanceled .booleanValue())) { super.setVisible(b); } } }; popup.setLightWeightPopupEnabled(true); popup.add(jcalendar); lastSelectedDate = date; // Corrects a problem that occured when the JMonthChooser's combobox is // displayed, and a click outside the popup does not close it. // The following idea was originally provided by forum user // podiatanapraia: changeListener = new ChangeListener() { boolean hasListened = false; public void stateChanged(ChangeEvent e) { if (hasListened) { hasListened = false; return; } if (popup.isVisible() && JDateChooser.this.jcalendar.monthChooser .getComboBox().hasFocus()) { MenuElement[] me = MenuSelectionManager.defaultManager() .getSelectedPath(); MenuElement[] newMe = new MenuElement[me.length + 1]; newMe[0] = popup; for (int i = 0; i < me.length; i++) { newMe[i + 1] = me[i]; } hasListened = true; MenuSelectionManager.defaultManager() .setSelectedPath(newMe); } } }; MenuSelectionManager.defaultManager().addChangeListener(changeListener); // end of code provided by forum user podiatanapraia isInitialized = true; } /** * Called when the jalendar button was pressed. * * @param e * the action event */ public void actionPerformed(ActionEvent e) { int x = calendarButton.getWidth() - (int) popup.getPreferredSize().getWidth(); int y = calendarButton.getY() + calendarButton.getHeight(); Calendar calendar = Calendar.getInstance(); Date date = dateEditor.getDate(); if (date != null) { calendar.setTime(date); } jcalendar.setCalendar(calendar); popup.show(calendarButton, x, y); dateSelected = false; } /** * Listens for a "date" property change or a "day" property change event * from the JCalendar. Updates the date editor and closes the popup. * * @param evt * the event */ public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("day")) { if (popup.isVisible()) { dateSelected = true; popup.setVisible(false); setDate(jcalendar.getCalendar().getTime()); } } else if (evt.getPropertyName().equals("date")) { if (evt.getSource() == dateEditor) { firePropertyChange("date", evt.getOldValue(), evt.getNewValue()); } else { setDate((Date) evt.getNewValue()); } } } /** * Updates the UI of itself and the popup. */ public void updateUI() { super.updateUI(); setEnabled(isEnabled()); if (jcalendar != null) { SwingUtilities.updateComponentTreeUI(popup); } } /** * Sets the locale. * * @param l * The new locale value */ public void setLocale(Locale l) { super.setLocale(l); dateEditor.setLocale(l); jcalendar.setLocale(l); } /** * Gets the date format string. * * @return Returns the dateFormatString. */ public String getDateFormatString() { return dateEditor.getDateFormatString(); } /** * Sets the date format string. E.g "MMMMM d, yyyy" will result in "July 21, * 2004" if this is the selected date and locale is English. * * @param dfString * The dateFormatString to set. */ public void setDateFormatString(String dfString) { dateEditor.setDateFormatString(dfString); invalidate(); } /** * Returns the date. If the JDateChooser is started with a null date and no * date was set by the user, null is returned. * * @return the current date */ public Date getDate() { return dateEditor.getDate(); } /** * Sets the date. Fires the property change "date" if date != null. * * @param date * the new date. */ public void setDate(Date date) { dateEditor.setDate(date); if (getParent() != null) { getParent().invalidate(); } } /** * Returns the calendar. If the JDateChooser is started with a null date (or * null calendar) and no date was set by the user, null is returned. * * @return the current calendar */ public Calendar getCalendar() { Date date = getDate(); if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar; } /** * Sets the calendar. Value null will set the null date on the date editor. * * @param calendar * the calendar. */ public void setCalendar(Calendar calendar) { if (calendar == null) { dateEditor.setDate(null); } else { dateEditor.setDate(calendar.getTime()); } } /** * Enable or disable the JDateChooser. * * @param enabled * the new enabled value */ public void setEnabled(boolean enabled) { super.setEnabled(enabled); if (dateEditor != null) { dateEditor.setEnabled(enabled); calendarButton.setEnabled(enabled); } } /** * Returns true, if enabled. * * @return true, if enabled. */ public boolean isEnabled() { return super.isEnabled(); } /** * Sets the icon of the buuton. * * @param icon * The new icon */ public void setIcon(ImageIcon icon) { calendarButton.setIcon(icon); } /** * Sets the font of all subcomponents. * * @param font * the new font */ public void setFont(Font font) { if (isInitialized) { dateEditor.getUiComponent().setFont(font); jcalendar.setFont(font); } super.setFont(font); } /** * Returns the JCalendar component. THis is usefull if you want to set some * properties. * * @return the JCalendar */ public JCalendar getJCalendar() { return jcalendar; } /** * Returns the calendar button. * * @return the calendar button */ public JButton getCalendarButton() { return calendarButton; } /** * Returns the date editor. * * @return the date editor */ public IDateEditor getDateEditor() { return dateEditor; } /** * Sets a valid date range for selectable dates. If max is before min, the * default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date is * set to 01\01\0001) * @param max * the maximum selectable date or null (then the maximum date is * set to 01\01\9999) */ public void setSelectableDateRange(Date min, Date max) { jcalendar.setSelectableDateRange(min, max); dateEditor.setSelectableDateRange(jcalendar.getMinSelectableDate(), jcalendar.getMaxSelectableDate()); } public void setMaxSelectableDate(Date max) { jcalendar.setMaxSelectableDate(max); dateEditor.setMaxSelectableDate(max); } public void setMinSelectableDate(Date min) { jcalendar.setMinSelectableDate(min); dateEditor.setMinSelectableDate(min); } /** * Gets the maximum selectable date. * * @return the maximum selectable date */ public Date getMaxSelectableDate() { return jcalendar.getMaxSelectableDate(); } /** * Gets the minimum selectable date. * * @return the minimum selectable date */ public Date getMinSelectableDate() { return jcalendar.getMinSelectableDate(); } /** * Should only be invoked if the JDateChooser is not used anymore. Due to popup * handling it had to register a change listener to the default menu * selection manager which will be unregistered here. Use this method to * cleanup possible memory leaks. */ public void cleanup() { MenuSelectionManager.defaultManager().removeChangeListener(changeListener); changeListener = null; } /** * Creates a JFrame with a JDateChooser inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("JDateChooser"); JDateChooser dateChooser = new JDateChooser(); // JDateChooser dateChooser = new JDateChooser(null, new Date(), null, // null); // dateChooser.setLocale(new Locale("de")); // dateChooser.setDateFormatString("dd. MMMM yyyy"); // dateChooser.setPreferredSize(new Dimension(130, 20)); // dateChooser.setFont(new Font("Verdana", Font.PLAIN, 10)); // dateChooser.setDateFormatString("yyyy-MM-dd HH:mm"); // URL iconURL = dateChooser.getClass().getResource( // "/com/toedter/calendar/images/JMonthChooserColor32.gif"); // ImageIcon icon = new ImageIcon(iconURL); // dateChooser.setIcon(icon); frame.getContentPane().add(dateChooser); frame.pack(); frame.setVisible(true); } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/DateUtil.java0000644000175000017500000001124011176613654025116 0ustar twernertwerner/* * DateUtil.java - Date handling utilities * Copyright (C) 2006 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.util.Calendar; import java.util.Date; /** * A utility class for some date operations. * * @author Kai Toedter * @version $LastChangedRevision: 95 $ * @version $LastChangedDate: 2006-05-05 18:43:15 +0200 (Fr, 05 Mai 2006) $ */ public class DateUtil { protected Date minSelectableDate; protected Date maxSelectableDate; protected Date defaultMinSelectableDate; protected Date defaultMaxSelectableDate; public DateUtil() { Calendar tmpCalendar = Calendar.getInstance(); tmpCalendar.set(1, 0, 1, 1, 1); defaultMinSelectableDate = tmpCalendar.getTime(); minSelectableDate = defaultMinSelectableDate; tmpCalendar.set(9999, 0, 1, 1, 1); defaultMaxSelectableDate = tmpCalendar.getTime(); maxSelectableDate = defaultMaxSelectableDate; } /** * Sets a valid date range for selectable dates. If max is before min, the * default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date is * set to 01\01\0001) * @param max * the maximum selectable date or null (then the maximum date is * set to 01\01\9999) */ public void setSelectableDateRange(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(minSelectableDate)) { minSelectableDate = defaultMinSelectableDate; maxSelectableDate = defaultMaxSelectableDate; } } /** * Sets the maximum selectable date. If null, the date 01\01\9999 will be set instead. * * @param max the maximum selectable date * * @return the maximum selectable date */ public Date setMaxSelectableDate(Date max) { if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } return maxSelectableDate; } /** * Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead. * * @param min the minimum selectable date * * @return the minimum selectable date */ public Date setMinSelectableDate(Date min) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } return minSelectableDate; } /** * Gets the maximum selectable date. * * @return the maximum selectable date */ public Date getMaxSelectableDate() { return maxSelectableDate; } /** * Gets the minimum selectable date. * * @return the minimum selectable date */ public Date getMinSelectableDate() { return minSelectableDate; } /** * Checks a given date if it is in the formally specified date range. * * @param date * the date to check * @return true, if the date is within minSelectableDate and * maxSelectableDate */ public boolean checkDate(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); Calendar minCal = Calendar.getInstance(); minCal.setTime(minSelectableDate); minCal.set(Calendar.HOUR_OF_DAY, 0); minCal.set(Calendar.MINUTE, 0); minCal.set(Calendar.SECOND, 0); minCal.set(Calendar.MILLISECOND, 0); Calendar maxCal = Calendar.getInstance(); maxCal.setTime(maxSelectableDate); maxCal.set(Calendar.HOUR_OF_DAY, 0); maxCal.set(Calendar.MINUTE, 0); maxCal.set(Calendar.SECOND, 0); maxCal.set(Calendar.MILLISECOND, 0); return !(calendar.before(minCal) || calendar.after(maxCal)); } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JMonthChooserBeanInfo.java0000644000175000017500000000256711176613654027543 0ustar twernertwerner/* * JMonthChooserBeanInfo.java - Bean Info for JMonthChooser * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import com.toedter.components.GenericBeanInfo; /** * A BeanInfo class for the JMonthChooser bean. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JMonthChooserBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JMonthChooser bean. */ public JMonthChooserBeanInfo() { super("JMonthChooser", true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JYearChooser.java0000644000175000017500000000741211176613654025746 0ustar twernertwerner/* * JYearChooser.java - A bean for choosing a year * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import com.toedter.components.JSpinField; import java.util.Calendar; import javax.swing.JFrame; /** * JYearChooser is a bean for choosing a year. * * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JYearChooser extends JSpinField { private static final long serialVersionUID = 2648810220491090064L; protected JDayChooser dayChooser; protected int oldYear; protected int startYear; protected int endYear; /** * Default JCalendar constructor. */ public JYearChooser() { setName("JYearChooser"); Calendar calendar = Calendar.getInstance(); dayChooser = null; setMinimum(calendar.getMinimum(Calendar.YEAR)); setMaximum(calendar.getMaximum(Calendar.YEAR)); setValue(calendar.get(Calendar.YEAR)); } /** * Sets the year. This is a bound property. * * @param y the new year * * @see #getYear */ public void setYear(int y) { super.setValue(y, true, false); if (dayChooser != null) { dayChooser.setYear(value); } spinner.setValue(new Integer(value)); firePropertyChange("year", oldYear, value); oldYear = value; } /** * Sets the year value. * * @param value the year value */ public void setValue(int value) { setYear(value); } /** * Returns the year. * * @return the year */ public int getYear() { return super.getValue(); } /** * Convenience method set a day chooser that might be updated directly. * * @param dayChooser the day chooser */ public void setDayChooser(JDayChooser dayChooser) { this.dayChooser = dayChooser; } /** * Returns the endy ear. * * @return the end year */ public int getEndYear() { return getMaximum(); } /** * Sets the end ear. * * @param endYear the end year */ public void setEndYear(int endYear) { setMaximum(endYear); } /** * Returns the start year. * * @return the start year. */ public int getStartYear() { return getMinimum(); } /** * Sets the start year. * * @param startYear the start year */ public void setStartYear(int startYear) { setMinimum(startYear); } /** * Creates a JFrame with a JYearChooser inside and can be used for testing. * * @param s command line arguments */ static public void main(String[] s) { JFrame frame = new JFrame("JYearChooser"); frame.getContentPane().add(new JYearChooser()); frame.pack(); frame.setVisible(true); } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/0000755000175000017500000000000011176613654024007 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDateChooserMono16.gif0000644000175000017500000000012111176613654030002 0ustar twernertwernerGIF89a!,(i}Zph\]اgJ݊t. H;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDateChooserColor32.gif0000644000175000017500000000207611176613654030161 0ustar twernertwernerGIF89a @@@!!))99JJRRccccssss{{X猌甔筭!, !H*\ȰÇ#* @ŋ- Ǐ9vA AG0C0Yeʐrڜy2ϟ4 @ѣH򬙡ӧ 8 ժR3,Ӭ^ͺuФh`p k!k.\<Խw߾!vX0`5\ `B•MA t z4\ $ Psk+ AqJtG`ËP!`XϾ%ʟO;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JMonthChooserMono32.gif0000644000175000017500000000017311176613654030217 0ustar twernertwernerGIF89a !, Rڋ޼H&P)ۆhx =|%d) @1!reJJh.2g N;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JCalendarMono16.gif0000644000175000017500000000011511176613654027316 0ustar twernertwernerGIF89a!,$ˍ}O*dPbZ-:!79#;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDateChooserColor16.gif0000644000175000017500000000163511176613654030163 0ustar twernertwernerGIF89a@@@ddaaffX!,z H@*L8#Nx; @@R(` 0c"hq͛8M PL`gϟ 4Pȣ=6 T  j՟;A.h@ٗ ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JMonthChooserMono16.gif0000644000175000017500000000011511176613654030215 0ustar twernertwernerGIF89a!,$udMw}e[7n->;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JCalendarMono32.gif0000644000175000017500000000017011176613654027315 0ustar twernertwernerGIF89a !, Oڋ+ؼ-=HΩ&16u92AJ6ek"6Pԙ9f ̈N ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JYearChooserMono32.gif0000644000175000017500000000017711176613654030036 0ustar twernertwernerGIF89a !, Vڋɠx% Z'hrERlE`QAJUL*DI ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JYearChooserColor16.gif0000644000175000017500000000161311176613654030202 0ustar twernertwernerGIF89a???@@@ddaaff!,h H*TÇ8@b@ p;P 4hD.G2`AM 䂟-&X'ħ5 J*ՅXf ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDateChooserIcon.gif0000644000175000017500000000161411176613654027623 0ustar twernertwernerGIF89a ???IIIddaaffX!, iH@*L8@ $@@ &ȱcI<<8r,03#J,q:x3͖  Iӣ',zǫ j%;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JCalendarColor16.gif0000644000175000017500000000162111176613654027467 0ustar twernertwernerGIF89a???IIIddaaffX!,nHÆX@@  C葁ɓ(<( @-_l 7;t AKꌩ8J]2ë+*Rׯ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JMonthChooserColor16.gif0000644000175000017500000000161211176613654030366 0ustar twernertwernerGIF89a@@@ddaaffX!,gH*TÇ(@b@ pࠤ 0`@4@y`ʖ#0GDX@tϊ(MSHJu«X;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JYearChooserMono16.gif0000644000175000017500000000011711176613654030032 0ustar twernertwernerGIF89a!,&uܞq\y$a֩HύzP;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JMonthChooserColor32.gif0000644000175000017500000000172511176613654030371 0ustar twernertwernerGIF89a @@@ddX!, @ H*\`C ظ1c CIR`C(SXeˏOyр͛7aɳϟ=eBQ *UЉFZ Φ hʵׯ@ÊKٳa]˶۷V:եݦrxQΕza8xpMWA|KZh3k޼9 ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JYearChooserColor32.gif0000644000175000017500000000174211176613654030203 0ustar twernertwernerGIF89a @@@ddX!,  H*\ȰÇ#JHŋhȱǏ I\2@"I Prf r&3K5i:2ES`̡#m

jKRK㞜[*U^6@cJ@˘3kϠCMi;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDayChooserMono32.gif0000644000175000017500000000016011176613654027643 0ustar twernertwernerGIF89a !, Gڋ"k嗖\xEHÚF$bvjܮ ^;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JDayChooserColor32.gif0000644000175000017500000000200711176613654030013 0ustar twernertwernerGIF89a )))@@@!!))99JJRRccccssss{{猌甔筭!, H*\ȰÇ#JHŋȱǏpɓ(S` brL5o%L4raΘ<[|3M AN=|zզ*HkRMr0B4JМHXz) `@\j@ƂvZYiC ӨS^@c˞M[vrͻn N;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/images/JCalendarColor32.gif0000644000175000017500000000204711176613654027470 0ustar twernertwernerGIF89a )))@@@!!))99JJRRccccssss{{X猌甔筭!, #H*\ȰÇ#JH1b3jc4II2 頥K@&͘R%N 6mY0ɣ'!PA*Udj5S 0 && maxDayCharacters < 5) { if (dayNames[day].length() >= maxDayCharacters) { dayNames[day] = dayNames[day] .substring(0, maxDayCharacters); } } days[i].setText(dayNames[day]); if (day == 1) { days[i].setForeground(sundayForeground); } else { days[i].setForeground(weekdayForeground); } if (day < 7) { day++; } else { day -= 6; } } } /** * Initializes both day names and weeks of the year. */ protected void initDecorations() { for (int x = 0; x < 7; x++) { days[x].setContentAreaFilled(decorationBackgroundVisible); days[x].setBorderPainted(decorationBordersVisible); days[x].invalidate(); days[x].repaint(); weeks[x].setContentAreaFilled(decorationBackgroundVisible); weeks[x].setBorderPainted(decorationBordersVisible); weeks[x].invalidate(); weeks[x].repaint(); } } /** * Hides and shows the week buttons. */ protected void drawWeeks() { Calendar tmpCalendar = (Calendar) calendar.clone(); for (int i = 1; i < 7; i++) { tmpCalendar.set(Calendar.DAY_OF_MONTH, (i * 7) - 6); int week = tmpCalendar.get(Calendar.WEEK_OF_YEAR); String buttonText = Integer.toString(week); if (week < 10) { buttonText = "0" + buttonText; } weeks[i].setText(buttonText); if ((i == 5) || (i == 6)) { weeks[i].setVisible(days[i * 7].isVisible()); } } } /** * Hides and shows the day buttons. */ protected void drawDays() { Calendar tmpCalendar = (Calendar) calendar.clone(); tmpCalendar.set(Calendar.HOUR_OF_DAY, 0); tmpCalendar.set(Calendar.MINUTE, 0); tmpCalendar.set(Calendar.SECOND, 0); tmpCalendar.set(Calendar.MILLISECOND, 0); Calendar minCal = Calendar.getInstance(); minCal.setTime(minSelectableDate); minCal.set(Calendar.HOUR_OF_DAY, 0); minCal.set(Calendar.MINUTE, 0); minCal.set(Calendar.SECOND, 0); minCal.set(Calendar.MILLISECOND, 0); Calendar maxCal = Calendar.getInstance(); maxCal.setTime(maxSelectableDate); maxCal.set(Calendar.HOUR_OF_DAY, 0); maxCal.set(Calendar.MINUTE, 0); maxCal.set(Calendar.SECOND, 0); maxCal.set(Calendar.MILLISECOND, 0); int firstDayOfWeek = tmpCalendar.getFirstDayOfWeek(); tmpCalendar.set(Calendar.DAY_OF_MONTH, 1); int firstDay = tmpCalendar.get(Calendar.DAY_OF_WEEK) - firstDayOfWeek; if (firstDay < 0) { firstDay += 7; } int i; for (i = 0; i < firstDay; i++) { days[i + 7].setVisible(false); days[i + 7].setText(""); } tmpCalendar.add(Calendar.MONTH, 1); Date firstDayInNextMonth = tmpCalendar.getTime(); tmpCalendar.add(Calendar.MONTH, -1); Date day = tmpCalendar.getTime(); int n = 0; Color foregroundColor = getForeground(); while (day.before(firstDayInNextMonth)) { days[i + n + 7].setText(Integer.toString(n + 1)); days[i + n + 7].setVisible(true); if ((tmpCalendar.get(Calendar.DAY_OF_YEAR) == today .get(Calendar.DAY_OF_YEAR)) && (tmpCalendar.get(Calendar.YEAR) == today .get(Calendar.YEAR))) { days[i + n + 7].setForeground(sundayForeground); } else { days[i + n + 7].setForeground(foregroundColor); } if ((n + 1) == this.day) { days[i + n + 7].setBackground(selectedColor); selectedDay = days[i + n + 7]; } else { days[i + n + 7].setBackground(oldDayBackgroundColor); } if (tmpCalendar.before(minCal) || tmpCalendar.after(maxCal)) { days[i + n + 7].setEnabled(false); } else { days[i + n + 7].setEnabled(true); } n++; tmpCalendar.add(Calendar.DATE, 1); day = tmpCalendar.getTime(); } for (int k = n + i + 7; k < 49; k++) { days[k].setVisible(false); days[k].setText(""); } drawWeeks(); } /** * Returns the locale. * * @return the locale value * * @see #setLocale */ public Locale getLocale() { return locale; } /** * Sets the locale. * * @param locale * the new locale value * * @see #getLocale */ public void setLocale(Locale locale) { if (!initialized) { super.setLocale(locale); } else { this.locale = locale; super.setLocale(locale); init(); } } /** * Sets the day. This is a bound property. * * @param d * the day * * @see #getDay */ public void setDay(int d) { if (d < 1) { d = 1; } Calendar tmpCalendar = (Calendar) calendar.clone(); tmpCalendar.set(Calendar.DAY_OF_MONTH, 1); tmpCalendar.add(Calendar.MONTH, 1); tmpCalendar.add(Calendar.DATE, -1); int maxDaysInMonth = tmpCalendar.get(Calendar.DATE); if (d > maxDaysInMonth) { d = maxDaysInMonth; } int oldDay = day; day = d; if (selectedDay != null) { selectedDay.setBackground(oldDayBackgroundColor); selectedDay.repaint(); } for (int i = 7; i < 49; i++) { if (days[i].getText().equals(Integer.toString(day))) { selectedDay = days[i]; selectedDay.setBackground(selectedColor); break; } } if (alwaysFireDayProperty) { firePropertyChange("day", 0, day); } else { firePropertyChange("day", oldDay, day); } } /** * this is needed for JDateChooser. * * @param alwaysFire * true, if day property shall be fired every time a day is * chosen. */ public void setAlwaysFireDayProperty(boolean alwaysFire) { alwaysFireDayProperty = alwaysFire; } /** * Returns the selected day. * * @return the day value * * @see #setDay */ public int getDay() { return day; } /** * Sets a specific month. This is needed for correct graphical * representation of the days. * * @param month * the new month */ public void setMonth(int month) { calendar.set(Calendar.MONTH, month); int maxDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); int adjustedDay = day; if (day > maxDays) { adjustedDay = maxDays; setDay(adjustedDay); } drawDays(); } /** * Sets a specific year. This is needed for correct graphical representation * of the days. * * @param year * the new year */ public void setYear(int year) { calendar.set(Calendar.YEAR, year); drawDays(); } /** * Sets a specific calendar. This is needed for correct graphical * representation of the days. * * @param calendar * the new calendar */ public void setCalendar(Calendar calendar) { this.calendar = calendar; drawDays(); } /** * Sets the font property. * * @param font * the new font */ public void setFont(Font font) { if (days != null) { for (int i = 0; i < 49; i++) { days[i].setFont(font); } } if (weeks != null) { for (int i = 0; i < 7; i++) { weeks[i].setFont(font); } } } /** * Sets the foregroundColor color. * * @param foreground * the new foregroundColor */ public void setForeground(Color foreground) { super.setForeground(foreground); if (days != null) { for (int i = 7; i < 49; i++) { days[i].setForeground(foreground); } drawDays(); } } /** * JDayChooser is the ActionListener for all day buttons. * * @param e * the ActionEvent */ public void actionPerformed(ActionEvent e) { JButton button = (JButton) e.getSource(); String buttonText = button.getText(); int day = new Integer(buttonText).intValue(); setDay(day); } /** * JDayChooser is the FocusListener for all day buttons. (Added by Thomas * Schaefer) * * @param e * the FocusEvent */ /* * Code below commented out by Mark Brown on 24 Aug 2004. This code breaks * the JDateChooser code by triggering the actionPerformed method on the * next day button. This causes the date chosen to always be incremented by * one day. */ public void focusGained(FocusEvent e) { // JButton button = (JButton) e.getSource(); // String buttonText = button.getText(); // // if ((buttonText != null) && !buttonText.equals("") && // !e.isTemporary()) { // actionPerformed(new ActionEvent(e.getSource(), 0, null)); // } } /** * Does nothing. * * @param e * the FocusEvent */ public void focusLost(FocusEvent e) { } /** * JDayChooser is the KeyListener for all day buttons. (Added by Thomas * Schaefer and modified by Austin Moore) * * @param e * the KeyEvent */ public void keyPressed(KeyEvent e) { int offset = (e.getKeyCode() == KeyEvent.VK_UP) ? (-7) : ((e .getKeyCode() == KeyEvent.VK_DOWN) ? (+7) : ((e.getKeyCode() == KeyEvent.VK_LEFT) ? (-1) : ((e .getKeyCode() == KeyEvent.VK_RIGHT) ? (+1) : 0))); int newDay = getDay() + offset; if ((newDay >= 1) && (newDay <= calendar.getMaximum(Calendar.DAY_OF_MONTH))) { setDay(newDay); } } /** * Does nothing. * * @param e * the KeyEvent */ public void keyTyped(KeyEvent e) { } /** * Does nothing. * * @param e * the KeyEvent */ public void keyReleased(KeyEvent e) { } /** * Enable or disable the JDayChooser. * * @param enabled * The new enabled value */ public void setEnabled(boolean enabled) { super.setEnabled(enabled); for (short i = 0; i < days.length; i++) { if (days[i] != null) { days[i].setEnabled(enabled); } } for (short i = 0; i < weeks.length; i++) { if (weeks[i] != null) { weeks[i].setEnabled(enabled); } } } /** * In some Countries it is often usefull to know in which week of the year a * date is. * * @return boolean true, if the weeks of the year is shown */ public boolean isWeekOfYearVisible() { return weekOfYearVisible; } /** * In some Countries it is often usefull to know in which week of the year a * date is. * * @param weekOfYearVisible * true, if the weeks of the year shall be shown */ public void setWeekOfYearVisible(boolean weekOfYearVisible) { if (weekOfYearVisible == this.weekOfYearVisible) { return; } else if (weekOfYearVisible) { add(weekPanel, BorderLayout.WEST); } else { remove(weekPanel); } this.weekOfYearVisible = weekOfYearVisible; validate(); dayPanel.validate(); } /** * Returns the day panel. * * @return the day panel */ public JPanel getDayPanel() { return dayPanel; } /** * Returns the color of the decoration (day names and weeks). * * @return the color of the decoration (day names and weeks). */ public Color getDecorationBackgroundColor() { return decorationBackgroundColor; } /** * Sets the background of days and weeks of year buttons. * * @param decorationBackgroundColor * The background to set */ public void setDecorationBackgroundColor(Color decorationBackgroundColor) { this.decorationBackgroundColor = decorationBackgroundColor; if (days != null) { for (int i = 0; i < 7; i++) { days[i].setBackground(decorationBackgroundColor); } } if (weeks != null) { for (int i = 0; i < 7; i++) { weeks[i].setBackground(decorationBackgroundColor); } } } /** * Returns the Sunday foreground. * * @return Color the Sunday foreground. */ public Color getSundayForeground() { return sundayForeground; } /** * Returns the weekday foreground. * * @return Color the weekday foreground. */ public Color getWeekdayForeground() { return weekdayForeground; } /** * Sets the Sunday foreground. * * @param sundayForeground * The sundayForeground to set */ public void setSundayForeground(Color sundayForeground) { this.sundayForeground = sundayForeground; drawDayNames(); drawDays(); } /** * Sets the weekday foreground. * * @param weekdayForeground * The weekdayForeground to set */ public void setWeekdayForeground(Color weekdayForeground) { this.weekdayForeground = weekdayForeground; drawDayNames(); drawDays(); } /** * Requests that the selected day also have the focus. */ public void setFocus() { if (selectedDay != null) { this.selectedDay.requestFocus(); } } /** * The decoration background is the background color of the day titles and * the weeks of the year. * * @return Returns true, if the decoration background is painted. */ public boolean isDecorationBackgroundVisible() { return decorationBackgroundVisible; } /** * The decoration background is the background color of the day titles and * the weeks of the year. * * @param decorationBackgroundVisible * true, if the decoration background shall be painted. */ public void setDecorationBackgroundVisible( boolean decorationBackgroundVisible) { this.decorationBackgroundVisible = decorationBackgroundVisible; initDecorations(); } /** * The decoration border is the button border of the day titles and the * weeks of the year. * * @return Returns true, if the decoration border is painted. */ public boolean isDecorationBordersVisible() { return decorationBordersVisible; } public boolean isDayBordersVisible() { return dayBordersVisible; } /** * The decoration border is the button border of the day titles and the * weeks of the year. * * @param decorationBordersVisible * true, if the decoration border shall be painted. */ public void setDecorationBordersVisible(boolean decorationBordersVisible) { this.decorationBordersVisible = decorationBordersVisible; initDecorations(); } public void setDayBordersVisible(boolean dayBordersVisible) { this.dayBordersVisible = dayBordersVisible; if (initialized) { for (int x = 7; x < 49; x++) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { days[x].setContentAreaFilled(dayBordersVisible); } else { days[x].setContentAreaFilled(true); } days[x].setBorderPainted(dayBordersVisible); } } } /** * Updates the UI and sets the day button preferences. */ public void updateUI() { super.updateUI(); setFont(Font.decode("Dialog Plain 11")); if (weekPanel != null) { weekPanel.updateUI(); } if (initialized) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { setDayBordersVisible(false); setDecorationBackgroundVisible(true); setDecorationBordersVisible(false); } else { setDayBordersVisible(true); setDecorationBackgroundVisible(decorationBackgroundVisible); setDecorationBordersVisible(decorationBordersVisible); } } } /** * Sets a valid date range for selectable dates. If max is before min, the * default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date is * set to 01\01\0001) * @param max * the maximum selectable date or null (then the maximum date is * set to 01\01\9999) */ public void setSelectableDateRange(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(minSelectableDate)) { minSelectableDate = defaultMinSelectableDate; maxSelectableDate = defaultMaxSelectableDate; } drawDays(); } /** * Sets the maximum selectable date. If null, the date 01\01\9999 will be * set instead. * * @param max * the maximum selectable date * * @return the maximum selectable date */ public Date setMaxSelectableDate(Date max) { if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } drawDays(); return maxSelectableDate; } /** * Sets the minimum selectable date. If null, the date 01\01\0001 will be * set instead. * * @param min * the minimum selectable date * * @return the minimum selectable date */ public Date setMinSelectableDate(Date min) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } drawDays(); return minSelectableDate; } /** * Gets the maximum selectable date. * * @return the maximum selectable date */ public Date getMaxSelectableDate() { return maxSelectableDate; } /** * Gets the minimum selectable date. * * @return the minimum selectable date */ public Date getMinSelectableDate() { return minSelectableDate; } /** * Gets the maximum number of characters of a day name or 0. If 0 is * returned, dateFormatSymbols.getShortWeekdays() will be used. * * @return the maximum number of characters of a day name or 0. */ public int getMaxDayCharacters() { return maxDayCharacters; } /** * Sets the maximum number of characters per day in the day bar. Valid * values are 0-4. If set to 0, dateFormatSymbols.getShortWeekdays() will be * used, otherwise theses strings will be reduced to the maximum number of * characters. * * @param maxDayCharacters * the maximum number of characters of a day name. */ public void setMaxDayCharacters(int maxDayCharacters) { if (maxDayCharacters == this.maxDayCharacters) { return; } if (maxDayCharacters < 0 || maxDayCharacters > 4) { this.maxDayCharacters = 0; } else { this.maxDayCharacters = maxDayCharacters; } drawDayNames(); drawDays(); invalidate(); } /** * Creates a JFrame with a JDayChooser inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("JDayChooser"); frame.getContentPane().add(new JDayChooser()); frame.pack(); frame.setVisible(true); } class DecoratorButton extends JButton { private static final long serialVersionUID = -5306477668406547496L; public DecoratorButton() { setBackground(decorationBackgroundColor); setContentAreaFilled(decorationBackgroundVisible); setBorderPainted(decorationBordersVisible); } public void addMouseListener(MouseListener l) { } public boolean isFocusable() { return false; } public void paint(Graphics g) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { // this is a hack to get the background painted // when using Windows Look & Feel if (decorationBackgroundVisible) { g.setColor(decorationBackgroundColor); } else { g.setColor(days[7].getBackground()); } g.fillRect(0, 0, getWidth(), getHeight()); if (isBorderPainted()) { setContentAreaFilled(true); } else { setContentAreaFilled(false); } } super.paint(g); } }; } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JMonthChooser.java0000644000175000017500000002236511176613654026137 0ustar twernertwerner/* * JMonthChooser.java - A bean for choosing a month * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.text.DateFormatSymbols; import java.util.Calendar; import java.util.Locale; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.JTextField; import javax.swing.SpinnerNumberModel; import javax.swing.UIManager; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; /** * JMonthChooser is a bean for choosing a month. * * @author Kai Toedter * @version $LastChangedRevision: 100 $ * @version $LastChangedDate: 2006-06-04 14:36:06 +0200 (So, 04 Jun 2006) $ */ public class JMonthChooser extends JPanel implements ItemListener, ChangeListener { private static final long serialVersionUID = -2028361332231218527L; /** true, if the month chooser has a spinner component */ protected boolean hasSpinner; private Locale locale; private int month; private int oldSpinnerValue = 0; // needed for comparison private JDayChooser dayChooser; private JYearChooser yearChooser; private JComboBox comboBox; private JSpinner spinner; private boolean initialized; private boolean localInitialize; /** * Default JMonthChooser constructor. */ public JMonthChooser() { this(true); } /** * JMonthChooser constructor with month spinner parameter. * * @param hasSpinner * true, if the month chooser should have a spinner component */ public JMonthChooser(boolean hasSpinner) { super(); setName("JMonthChooser"); this.hasSpinner = hasSpinner; setLayout(new BorderLayout()); comboBox = new JComboBox(); comboBox.addItemListener(this); // comboBox.addPopupMenuListener(this); locale = Locale.getDefault(); initNames(); if (hasSpinner) { spinner = new JSpinner() { private static final long serialVersionUID = 1L; private JTextField textField = new JTextField(); public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); return new Dimension(size.width, textField .getPreferredSize().height); } }; spinner.addChangeListener(this); spinner.setEditor(comboBox); comboBox.setBorder(new EmptyBorder(0, 0, 0, 0)); updateUI(); add(spinner, BorderLayout.WEST); } else { add(comboBox, BorderLayout.WEST); } initialized = true; setMonth(Calendar.getInstance().get(Calendar.MONTH)); } /** * Initializes the locale specific month names. */ public void initNames() { localInitialize = true; DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale); String[] monthNames = dateFormatSymbols.getMonths(); if (comboBox.getItemCount() == 12) { comboBox.removeAllItems(); } for (int i = 0; i < 12; i++) { comboBox.addItem(monthNames[i]); } localInitialize = false; comboBox.setSelectedIndex(month); } /** * Is invoked if the state of the spnner changes. * * @param e * the change event. */ public void stateChanged(ChangeEvent e) { SpinnerNumberModel model = (SpinnerNumberModel) ((JSpinner) e .getSource()).getModel(); int value = model.getNumber().intValue(); boolean increase = (value > oldSpinnerValue) ? true : false; oldSpinnerValue = value; int month = getMonth(); if (increase) { month += 1; if (month == 12) { month = 0; if (yearChooser != null) { int year = yearChooser.getYear(); year += 1; yearChooser.setYear(year); } } } else { month -= 1; if (month == -1) { month = 11; if (yearChooser != null) { int year = yearChooser.getYear(); year -= 1; yearChooser.setYear(year); } } } setMonth(month); } /** * The ItemListener for the months. * * @param e * the item event */ public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { int index = comboBox.getSelectedIndex(); if ((index >= 0) && (index != month)) { setMonth(index, false); } } } /** * Sets the month attribute of the JMonthChooser object. Fires a property * change "month". * * @param newMonth * the new month value * @param select * true, if the month should be selcted in the combo box. */ private void setMonth(int newMonth, boolean select) { if (!initialized || localInitialize) { return; } int oldMonth = month; month = newMonth; if (select) { comboBox.setSelectedIndex(month); } if (dayChooser != null) { dayChooser.setMonth(month); } firePropertyChange("month", oldMonth, month); } /** * Sets the month. This is a bound property. Valuse are valid between 0 * (January) and 11 (December). A value < 0 will be treated as 0, a value > * 11 will be treated as 11. * * @param newMonth * the new month value * * @see #getMonth */ public void setMonth(int newMonth) { if (newMonth < 0 || newMonth == Integer.MIN_VALUE) { setMonth(0, true); } else if (newMonth > 11) { setMonth(11, true); } else { setMonth(newMonth, true); } } /** * Returns the month. * * @return the month value */ public int getMonth() { return month; } /** * Convenience method set a day chooser. * * @param dayChooser * the day chooser */ public void setDayChooser(JDayChooser dayChooser) { this.dayChooser = dayChooser; } /** * Convenience method set a year chooser. If set, the spin for the month * buttons will spin the year as well * * @param yearChooser * the new yearChooser value */ public void setYearChooser(JYearChooser yearChooser) { this.yearChooser = yearChooser; } /** * Returns the locale. * * @return the locale value * * @see #setLocale */ public Locale getLocale() { return locale; } /** * Set the locale and initializes the new month names. * * @param l * the new locale value * * @see #getLocale */ public void setLocale(Locale l) { if (!initialized) { super.setLocale(l); } else { locale = l; initNames(); } } /** * Enable or disable the JMonthChooser. * * @param enabled * the new enabled value */ public void setEnabled(boolean enabled) { super.setEnabled(enabled); comboBox.setEnabled(enabled); if (spinner != null) { spinner.setEnabled(enabled); } } /** * Returns the month chooser's comboBox text area (which allow the focus to * be set to it). * * @return the combo box */ public Component getComboBox() { return this.comboBox; } /** * Returns the month chooser's comboBox bar (which allow the focus to be set * to it). * * @return Component the spinner or null, if the month chooser has no * spinner */ public Component getSpinner() { // Returns if there is no spinner. return spinner; } /** * Returns the type of spinner the month chooser is using. * * @return true, if the month chooser has a spinner */ public boolean hasSpinner() { return hasSpinner; } /** * Sets the font for this component. * * @param font the desired Font for this component */ public void setFont(Font font) { if (comboBox != null) { comboBox.setFont(font); } super.setFont(font); } /** * Updates the UI. * * @see javax.swing.JPanel#updateUI() */ public void updateUI() { final JSpinner testSpinner = new JSpinner(); if (spinner != null) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { spinner.setBorder(testSpinner.getBorder()); } else { spinner.setBorder(new EmptyBorder(0, 0, 0, 0)); } } } /** * Creates a JFrame with a JMonthChooser inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("MonthChooser"); frame.getContentPane().add(new JMonthChooser()); frame.pack(); frame.setVisible(true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JTextFieldDateEditor.java0000644000175000017500000002671211176613654027364 0ustar twernertwerner/* * Copyright (C) 2006 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import javax.swing.JComponent; import javax.swing.JFormattedTextField; import javax.swing.JFrame; import javax.swing.JTextField; import javax.swing.UIManager; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; import javax.swing.text.MaskFormatter; /** * JTextFieldDateEditor is the default editor used by JDateChooser. It is a * formatted text field, that colores valid dates green/black and invalid dates * red. The date format patten and mask can be set manually. If not set, the * MEDIUM pattern of a SimpleDateFormat with regards to the actual locale is * used. * * @author Kai Toedter * @version $LastChangedRevision: 97 $ * @version $LastChangedDate: 2006-05-24 17:30:41 +0200 (Mi, 24 Mai 2006) $ */ public class JTextFieldDateEditor extends JFormattedTextField implements IDateEditor, CaretListener, FocusListener, ActionListener { private static final long serialVersionUID = -8901842591101625304L; protected Date date; protected SimpleDateFormat dateFormatter; protected MaskFormatter maskFormatter; protected String datePattern; protected String maskPattern; protected char placeholder; protected Color darkGreen; protected DateUtil dateUtil; private boolean isMaskVisible; private boolean ignoreDatePatternChange; private int hours; private int minutes; private int seconds; private int millis; private Calendar calendar; public JTextFieldDateEditor() { this(false, null, null, ' '); } public JTextFieldDateEditor(String datePattern, String maskPattern, char placeholder) { this(true, datePattern, maskPattern, placeholder); } public JTextFieldDateEditor(boolean showMask, String datePattern, String maskPattern, char placeholder) { dateFormatter = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.MEDIUM); dateFormatter.setLenient(false); setDateFormatString(datePattern); if (datePattern != null) { ignoreDatePatternChange = true; } this.placeholder = placeholder; if (maskPattern == null) { this.maskPattern = createMaskFromDatePattern(this.datePattern); } else { this.maskPattern = maskPattern; } setToolTipText(this.datePattern); setMaskVisible(showMask); addCaretListener(this); addFocusListener(this); addActionListener(this); darkGreen = new Color(0, 150, 0); calendar = Calendar.getInstance(); dateUtil = new DateUtil(); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#getDate() */ public Date getDate() { try { calendar.setTime(dateFormatter.parse(getText())); calendar.set(Calendar.HOUR_OF_DAY, hours); calendar.set(Calendar.MINUTE, minutes); calendar.set(Calendar.SECOND, seconds); calendar.set(Calendar.MILLISECOND, millis); date = calendar.getTime(); } catch (ParseException e) { date = null; } return date; } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#setDate(java.util.Date) */ public void setDate(Date date) { setDate(date, true); } /** * Sets the date. * * @param date * the date * @param firePropertyChange * true, if the date property should be fired. */ protected void setDate(Date date, boolean firePropertyChange) { Date oldDate = this.date; this.date = date; if (date == null) { setText(""); } else { calendar.setTime(date); hours = calendar.get(Calendar.HOUR_OF_DAY); minutes = calendar.get(Calendar.MINUTE); seconds = calendar.get(Calendar.SECOND); millis = calendar.get(Calendar.MILLISECOND); String formattedDate = dateFormatter.format(date); try { setText(formattedDate); } catch (RuntimeException e) { e.printStackTrace(); } } if (date != null && dateUtil.checkDate(date)) { setForeground(Color.BLACK); } if (firePropertyChange) { firePropertyChange("date", oldDate, date); } } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#setDateFormatString(java.lang.String) */ public void setDateFormatString(String dateFormatString) { if (ignoreDatePatternChange) { return; } try { dateFormatter.applyPattern(dateFormatString); } catch (RuntimeException e) { dateFormatter = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.MEDIUM); dateFormatter.setLenient(false); } this.datePattern = dateFormatter.toPattern(); setToolTipText(this.datePattern); setDate(date, false); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#getDateFormatString() */ public String getDateFormatString() { return datePattern; } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#getUiComponent() */ public JComponent getUiComponent() { return this; } /** * After any user input, the value of the textfield is proofed. Depending on * being a valid date, the value is colored green or red. * * @param event * the caret event */ public void caretUpdate(CaretEvent event) { String text = getText().trim(); String emptyMask = maskPattern.replace('#', placeholder); if (text.length() == 0 || text.equals(emptyMask)) { setForeground(Color.BLACK); return; } try { Date date = dateFormatter.parse(getText()); if (dateUtil.checkDate(date)) { setForeground(darkGreen); } else { setForeground(Color.RED); } } catch (Exception e) { setForeground(Color.RED); } } /* * (non-Javadoc) * * @see java.awt.event.FocusListener#focusLost(java.awt.event.FocusEvent) */ public void focusLost(FocusEvent focusEvent) { checkText(); } private void checkText() { try { Date date = dateFormatter.parse(getText()); setDate(date, true); } catch (Exception e) { // ignore } } /* * (non-Javadoc) * * @see java.awt.event.FocusListener#focusGained(java.awt.event.FocusEvent) */ public void focusGained(FocusEvent e) { } /* * (non-Javadoc) * * @see java.awt.Component#setLocale(java.util.Locale) */ public void setLocale(Locale locale) { if (locale == getLocale() || ignoreDatePatternChange) { return; } super.setLocale(locale); dateFormatter = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.MEDIUM, locale); setToolTipText(dateFormatter.toPattern()); setDate(date, false); doLayout(); } /** * Creates a mask from a date pattern. This is a very simple (and * incomplete) implementation thet works only with numbers. A date pattern * of "MM/dd/yy" will result in the mask "##/##/##". Probably you want to * override this method if it does not fit your needs. * * @param datePattern * the date pattern * @return the mask */ public String createMaskFromDatePattern(String datePattern) { String symbols = "GyMdkHmsSEDFwWahKzZ"; String mask = ""; for (int i = 0; i < datePattern.length(); i++) { char ch = datePattern.charAt(i); boolean symbolFound = false; for (int n = 0; n < symbols.length(); n++) { if (symbols.charAt(n) == ch) { mask += "#"; symbolFound = true; break; } } if (!symbolFound) { mask += ch; } } return mask; } /** * Returns true, if the mask is visible. * * @return true, if the mask is visible */ public boolean isMaskVisible() { return isMaskVisible; } /** * Sets the mask visible. * * @param isMaskVisible * true, if the mask should be visible */ public void setMaskVisible(boolean isMaskVisible) { this.isMaskVisible = isMaskVisible; if (isMaskVisible) { if (maskFormatter == null) { try { maskFormatter = new MaskFormatter(createMaskFromDatePattern(datePattern)); maskFormatter.setPlaceholderCharacter(this.placeholder); maskFormatter.install(this); } catch (ParseException e) { e.printStackTrace(); } } } } /** * Returns the preferred size. If a date pattern is set, it is the size the * date pattern would take. */ public Dimension getPreferredSize() { if (datePattern != null) { return new JTextField(datePattern).getPreferredSize(); } return super.getPreferredSize(); } /** * Validates the typed date and sets it (only if it is valid). */ public void actionPerformed(ActionEvent e) { checkText(); } /** * Enables and disabled the compoment. It also fixes the background bug * 4991597 and sets the background explicitely to a * TextField.inactiveBackground. */ public void setEnabled(boolean b) { super.setEnabled(b); if (!b) { super.setBackground(UIManager.getColor("TextField.inactiveBackground")); } } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#getMaxSelectableDate() */ public Date getMaxSelectableDate() { return dateUtil.getMaxSelectableDate(); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#getMinSelectableDate() */ public Date getMinSelectableDate() { return dateUtil.getMinSelectableDate(); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#setMaxSelectableDate(java.util.Date) */ public void setMaxSelectableDate(Date max) { dateUtil.setMaxSelectableDate(max); checkText(); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#setMinSelectableDate(java.util.Date) */ public void setMinSelectableDate(Date min) { dateUtil.setMinSelectableDate(min); checkText(); } /* * (non-Javadoc) * * @see com.toedter.calendar.IDateEditor#setSelectableDateRange(java.util.Date, * java.util.Date) */ public void setSelectableDateRange(Date min, Date max) { dateUtil.setSelectableDateRange(min, max); checkText(); } /** * Creates a JFrame with a JCalendar inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("JTextFieldDateEditor"); JTextFieldDateEditor jTextFieldDateEditor = new JTextFieldDateEditor(); jTextFieldDateEditor.setDate(new Date()); frame.getContentPane().add(jTextFieldDateEditor); frame.pack(); frame.setVisible(true); } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JDateChooserBeanInfo.java0000644000175000017500000000256411176613654027330 0ustar twernertwerner/* * DateChooserPanelBeanInfo.java - Bean Info for JDateChooser * Copyright (C) 2006 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import com.toedter.components.GenericBeanInfo; /** * A BeanInfo class for the JDateChooser panel. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JDateChooserBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JDateChooser bean. */ public JDateChooserBeanInfo() { super("JDateChooser", true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/0000755000175000017500000000000011176613654023466 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/DateChooserPanel.java0000644000175000017500000001325111176613654027513 0ustar twernertwerner/* * DateChooserPanel.java - A panel to demo several JDateChooser configurations. * Copyright (C) 2006 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar.demo; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.Date; import java.util.Locale; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import com.toedter.calendar.JDateChooser; import com.toedter.calendar.JSpinnerDateEditor; /** * A demonstration panel including several JDateChoosers. * * @author Kai Toedter * @version $LastChangedRevision: 96 $ * @version $LastChangedDate: 2006-05-12 18:19:35 +0200 (Fr, 12 Mai 2006) $ */ public class DateChooserPanel extends JPanel implements PropertyChangeListener { private static final long serialVersionUID = -1282280858252793253L; private JComponent[] components; public DateChooserPanel() { setName("JDateChooser"); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; setLayout(gridbag); components = new JComponent[5]; components[0] = new JDateChooser(); components[1] = new JDateChooser(new Date()); components[2] = new JDateChooser(null, null, null, new JSpinnerDateEditor()); components[3] = new JDateChooser("yyyy/MM/dd", "####/##/##", '_'); components[4] = new DemoTable(); addEntry("Default", components[0], gridbag); addEntry("Default with date set", components[1], gridbag); addEntry("Spinner Editor", components[2], gridbag); addEntry("Explicite date pattern and mask", components[3], gridbag); addEntry("Table with date editors", components[4], gridbag); } private void addEntry(String text, JComponent component, GridBagLayout grid) { JLabel label = new JLabel(text + ": ", null, JLabel.RIGHT); GridBagConstraints c = new GridBagConstraints(); c.weightx = 1.0; c.fill = GridBagConstraints.BOTH; grid.setConstraints(label, c); add(label); c.gridwidth = GridBagConstraints.REMAINDER; grid.setConstraints(component, c); add(component); JPanel blankLine = new JPanel() { private static final long serialVersionUID = 4514530330521503732L; public Dimension getPreferredSize() { return new Dimension(10,3); } }; grid.setConstraints(blankLine, c); add(blankLine); } /** * Gets the date format string. * * @return Returns the dateFormatString. */ public String getDateFormatString() { return ((JDateChooser) components[1]).getDateFormatString(); } /** * Sets the date format string. E.g "MMMMM d, yyyy" will result in "July 21, * 2004" if this is the selected date and locale is English. * * @param dfString * The dateFormatString to set. */ public void setDateFormatString(String dfString) { for (int i = 0; i < 4; i++) { ((JDateChooser) components[i]).setDateFormatString(dfString); } } /** * Returns the date. If the JDateChooser is started with an empty date and * no date is set by the user, null is returned. * * @return the current date */ public Date getDate() { return ((JDateChooser) components[1]).getDate(); } /** * Sets the date. Fires the property change "date" if date != null. * * @param date * the new date. */ public void setDate(Date date) { for (int i = 0; i < 4; i++) { ((JDateChooser) components[i]).setDate(date); } } public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("date")) { setDate((Date) evt.getNewValue()); } } /** * Returns the locale of the first JDateChooser. */ public Locale getLocale() { return ((JDateChooser) components[0]).getLocale(); } /** * Sets the locale of the first 4 JDateChoosers. */ public void setLocale(Locale locale) { for (int i = 0; i < 5; i++) { components[i].setLocale(locale); } } /* (non-Javadoc) * @see java.awt.Component#isEnabled() */ public boolean isEnabled() { return ((JDateChooser) components[0]).isEnabled(); } /* (non-Javadoc) * @see javax.swing.JComponent#setEnabled(boolean) */ public void setEnabled(boolean enabled) { for (int i = 0; i < 5; i++) { components[i].setEnabled(enabled); } } public Date getMinSelectableDate() { return ((JDateChooser) components[0]).getMinSelectableDate(); } public void setMinSelectableDate(Date date) { for (int i = 0; i < 4; i++) { ((JDateChooser) components[i]).setMinSelectableDate(date); } } public Date getMaxSelectableDate() { return ((JDateChooser) components[0]).getMaxSelectableDate(); } public void setMaxSelectableDate(Date date) { for (int i = 0; i < 4; i++) { ((JDateChooser) components[i]).setMaxSelectableDate(date); } } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/images/0000755000175000017500000000000011176613654024733 5ustar twernertwernerlibjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/images/JDateChooserColor16.gif0000644000175000017500000000163511176613654031107 0ustar twernertwernerGIF89a@@@ddaaffX!,z H@*L8#Nx; @@R(` 0c"hq͛8M PL`gϟ 4Pȣ=6 T  j՟;A.h@ٗ ;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/images/DemoTableColor16.gif0000644000175000017500000000160611176613654030427 0ustar twernertwernerGIF89a@@@ddaaffX!,c H@*L8)Nh ChN:HyI*Y:p)˘8[^,sJ5CބItΗ>\ȔPJj*;libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/JCalendarDemo.java0000644000175000017500000004766511176613654027003 0ustar twernertwerner/* * JCalendarDemo.java - Demonstration of JCalendar Java Bean * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar.demo; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.net.URL; import java.util.Date; import javax.swing.AbstractAction; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JApplet; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JColorChooser; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButtonMenuItem; import javax.swing.JSplitPane; import javax.swing.JTextField; import javax.swing.JToolBar; import javax.swing.KeyStroke; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.plaf.basic.BasicSplitPaneDivider; import javax.swing.plaf.basic.BasicSplitPaneUI; import com.toedter.calendar.JCalendar; import com.toedter.calendar.JDateChooser; import com.toedter.calendar.JDayChooser; import com.toedter.calendar.JMonthChooser; import com.toedter.calendar.JYearChooser; import com.toedter.components.JLocaleChooser; import com.toedter.components.JSpinField; import com.toedter.components.JTitlePanel; /** * A demonstration Applet for the JCalendar bean. The demo can also be started * as Java application. * * @author Kai Toedter * @version $LastChangedRevision: 103 $ * @version $LastChangedDate: 2006-06-04 14:57:02 +0200 (So, 04 Jun 2006) $ */ public class JCalendarDemo extends JApplet implements PropertyChangeListener { private static final long serialVersionUID = 6739986412544494316L; private JSplitPane splitPane; private JPanel calendarPanel; private JComponent[] beans; private JPanel propertyPanel; private JTitlePanel propertyTitlePanel; private JTitlePanel componentTitlePanel; private JPanel componentPanel; private JToolBar toolBar; /** * Initializes the applet. */ public void init() { // Set the JGoodies Plastic 3D look and feel initializeLookAndFeels(); // initialize all beans to demo beans = new JComponent[6]; beans[0] = new DateChooserPanel(); beans[1] = new JCalendar(); beans[2] = new JDayChooser(); beans[3] = new JMonthChooser(); beans[4] = new JYearChooser(); beans[5] = new JSpinField(); ((JSpinField) beans[5]).adjustWidthToMaximumValue(); ((JYearChooser) beans[4]).setMaximum(((JSpinField) beans[5]).getMaximum()); ((JYearChooser) beans[4]).adjustWidthToMaximumValue(); getContentPane().setLayout(new BorderLayout()); setJMenuBar(createMenuBar()); toolBar = createToolBar(); getContentPane().add(toolBar, BorderLayout.NORTH); splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); splitPane.setBorder(BorderFactory.createLineBorder(Color.GRAY)); splitPane.setDividerSize(4); splitPane.setDividerLocation(190); BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider(); if (divider != null) { divider.setBorder(null); } propertyPanel = new JPanel(); componentPanel = new JPanel(); URL iconURL = beans[0].getClass().getResource( "images/" + beans[0].getName() + "Color16.gif"); ImageIcon icon = new ImageIcon(iconURL); propertyTitlePanel = new JTitlePanel("Properties", null, propertyPanel, BorderFactory .createEmptyBorder(4, 4, 4, 4)); componentTitlePanel = new JTitlePanel("Component", icon, componentPanel, BorderFactory .createEmptyBorder(4, 4, 0, 4)); splitPane.setBottomComponent(propertyTitlePanel); splitPane.setTopComponent(componentTitlePanel); installBean(beans[0]); getContentPane().add(splitPane, BorderLayout.CENTER); } /** * Installs the JGoodies Look & Feels, if available, in classpath. */ public final void initializeLookAndFeels() { // if in classpath thry to load JGoodies Plastic Look & Feel try { LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels(); boolean found = false; for (int i = 0; i < lnfs.length; i++) { if (lnfs[i].getName().equals("JGoodies Plastic 3D")) { found = true; } } if (!found) { UIManager.installLookAndFeel("JGoodies Plastic 3D", "com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); } UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); } catch (Throwable t) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } } } /** * Creates the menu bar * * @return Description of the Return Value */ public JToolBar createToolBar() { // Create the tool bar toolBar = new JToolBar(); toolBar.putClientProperty("jgoodies.headerStyle", "Both"); toolBar.setRollover(true); toolBar.setFloatable(false); for (int i = 0; i < beans.length; i++) { Icon icon; JButton button; try { final JComponent bean = beans[i]; URL iconURL = bean.getClass().getResource( "images/" + bean.getName() + "Color16.gif"); icon = new ImageIcon(iconURL); button = new JButton(icon); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { installBean(bean); } }; button.addActionListener(actionListener); } catch (Exception e) { System.out.println("JCalendarDemo.createToolBar(): " + e); button = new JButton(beans[i].getName()); } button.setFocusPainted(false); toolBar.add(button); } return toolBar; } /** * Creates the menu bar * * @return Description of the Return Value */ public JMenuBar createMenuBar() { // Create the menu bar final JMenuBar menuBar = new JMenuBar(); // Menu for all beans to demo JMenu componentsMenu = new JMenu("Components"); componentsMenu.setMnemonic('C'); menuBar.add(componentsMenu); for (int i = 0; i < beans.length; i++) { Icon icon; JMenuItem menuItem; try { URL iconURL = beans[i].getClass().getResource( "images/" + beans[i].getName() + "Color16.gif"); icon = new ImageIcon(iconURL); menuItem = new JMenuItem(beans[i].getName(), icon); } catch (Exception e) { System.out.println("JCalendarDemo.createMenuBar(): " + e + " for URL: " + "images/" + beans[i].getName() + "Color16.gif"); menuItem = new JMenuItem(beans[i].getName()); } componentsMenu.add(menuItem); final JComponent bean = beans[i]; ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { installBean(bean); } }; menuItem.addActionListener(actionListener); } // Menu for the look and feels (lnfs). UIManager.LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels(); ButtonGroup lnfGroup = new ButtonGroup(); JMenu lnfMenu = new JMenu("Look&Feel"); lnfMenu.setMnemonic('L'); menuBar.add(lnfMenu); for (int i = 0; i < lnfs.length; i++) { if (!lnfs[i].getName().equals("CDE/Motif")) { JRadioButtonMenuItem rbmi = new JRadioButtonMenuItem(lnfs[i].getName()); lnfMenu.add(rbmi); // preselect the current Look & feel rbmi.setSelected(UIManager.getLookAndFeel().getName().equals(lnfs[i].getName())); // store lool & feel info as client property rbmi.putClientProperty("lnf name", lnfs[i]); // create and add the item listener rbmi.addItemListener( // inlining new ItemListener() { public void itemStateChanged(ItemEvent ie) { JRadioButtonMenuItem rbmi2 = (JRadioButtonMenuItem) ie.getSource(); if (rbmi2.isSelected()) { // get the stored look & feel info UIManager.LookAndFeelInfo info = (UIManager.LookAndFeelInfo) rbmi2 .getClientProperty("lnf name"); try { menuBar.putClientProperty("jgoodies.headerStyle", "Both"); UIManager.setLookAndFeel(info.getClassName()); // update the complete application's // look & feel SwingUtilities.updateComponentTreeUI(JCalendarDemo.this); for (int i = 0; i < beans.length; i++) { SwingUtilities.updateComponentTreeUI(beans[i]); } // set the split pane devider border to // null BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane .getUI()).getDivider(); if (divider != null) { divider.setBorder(null); } } catch (Exception e) { e.printStackTrace(); System.err.println("Unable to set UI " + e.getMessage()); } } } }); lnfGroup.add(rbmi); } } // the help menu JMenu helpMenu = new JMenu("Help"); helpMenu.setMnemonic('H'); JMenuItem aboutItem = helpMenu.add(new AboutAction(this)); aboutItem.setMnemonic('A'); aboutItem.setAccelerator(KeyStroke.getKeyStroke('A', java.awt.Event.CTRL_MASK)); menuBar.add(helpMenu); return menuBar; } /** * The applet is a PropertyChangeListener for "locale" and "calendar". * * @param evt * Description of the Parameter */ public void propertyChange(PropertyChangeEvent evt) { if (calendarPanel != null) { if (evt.getPropertyName().equals("calendar")) { // calendar = (Calendar) evt.getNewValue(); // DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, // jcalendar.getLocale()); // dateField.setText(df.format(calendar.getTime())); } } } /** * Creates a JFrame with a JCalendarDemo inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { WindowListener l = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; JFrame frame = new JFrame("JCalendar Demo"); frame.addWindowListener(l); JCalendarDemo demo = new JCalendarDemo(); demo.init(); frame.getContentPane().add(demo); frame.pack(); frame.setBounds(200, 200, (int) frame.getPreferredSize().getWidth() + 20, (int) frame .getPreferredSize().getHeight() + 180); frame.setVisible(true); } /** * Installes a demo bean. * * @param bean * the demo bean */ private void installBean(JComponent bean) { try { componentPanel.removeAll(); componentPanel.add(bean); BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass(), bean.getClass() .getSuperclass()); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); propertyPanel.removeAll(); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; propertyPanel.setLayout(gridbag); int count = 0; String[] types = new String[] { "class java.util.Locale", "boolean", "int", "class java.awt.Color", "class java.util.Date", "class java.lang.String" }; for (int t = 0; t < types.length; t++) { for (int i = 0; i < propertyDescriptors.length; i++) { if (propertyDescriptors[i].getWriteMethod() != null) { String type = propertyDescriptors[i].getPropertyType().toString(); final PropertyDescriptor propertyDescriptor = propertyDescriptors[i]; final JComponent currentBean = bean; final Method readMethod = propertyDescriptor.getReadMethod(); final Method writeMethod = propertyDescriptor.getWriteMethod(); if (type.equals(types[t]) && (((readMethod != null) && (writeMethod != null)) || ("class java.util.Locale" .equals(type)))) { if ("boolean".equals(type)) { boolean isSelected = false; try { Boolean booleanObj = ((Boolean) readMethod.invoke(bean, null)); isSelected = booleanObj.booleanValue(); } catch (Exception e) { e.printStackTrace(); } final JCheckBox checkBox = new JCheckBox("", isSelected); checkBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { try { if (checkBox.isSelected()) { writeMethod.invoke(currentBean, new Object[] { new Boolean(true) }); } else { writeMethod.invoke(currentBean, new Object[] { new Boolean(false) }); } } catch (Exception e) { e.printStackTrace(); } } }); addProperty(propertyDescriptors[i], checkBox, gridbag); count += 1; } else if ("int".equals(type)) { JSpinField spinField = new JSpinField(); spinField.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { try { if (evt.getPropertyName().equals("value")) { writeMethod.invoke(currentBean, new Object[] { evt .getNewValue() }); } } catch (Exception e) { } } }); try { Integer integerObj = ((Integer) readMethod.invoke(bean, null)); spinField.setValue(integerObj.intValue()); } catch (Exception e) { e.printStackTrace(); } addProperty(propertyDescriptors[i], spinField, gridbag); count += 1; } else if ("class java.lang.String".equals(type)) { String string = ""; try { string = ((String) readMethod.invoke(bean, null)); } catch (Exception e) { e.printStackTrace(); } JTextField textField = new JTextField(string); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { try { writeMethod.invoke(currentBean, new Object[] { e .getActionCommand() }); } catch (Exception ex) { } } }; textField.addActionListener(actionListener); addProperty(propertyDescriptors[i], textField, gridbag); count += 1; } else if ("class java.util.Locale".equals(type)) { JLocaleChooser localeChooser = new JLocaleChooser(bean); localeChooser.setPreferredSize(new Dimension(200, localeChooser .getPreferredSize().height)); addProperty(propertyDescriptors[i], localeChooser, gridbag); count += 1; } else if ("class java.util.Date".equals(type)) { Date date = null; try { date = ((Date) readMethod.invoke(bean, null)); } catch (Exception e) { e.printStackTrace(); } JDateChooser dateChooser = new JDateChooser(date); dateChooser.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { try { if (evt.getPropertyName().equals("date")) { writeMethod.invoke(currentBean, new Object[] { evt .getNewValue() }); } } catch (Exception e) { } } }); addProperty(propertyDescriptors[i], dateChooser, gridbag); count += 1; } else if ("class java.awt.Color".equals(type)) { final JButton button = new JButton(); try { final Color colorObj = ((Color) readMethod.invoke(bean, null)); button.setText("..."); button.setBackground(colorObj); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { Color newColor = JColorChooser.showDialog( JCalendarDemo.this, "Choose Color", colorObj); button.setBackground(newColor); try { writeMethod.invoke(currentBean, new Object[] { newColor }); } catch (Exception e1) { e1.printStackTrace(); } } }; button.addActionListener(actionListener); } catch (Exception e) { e.printStackTrace(); } addProperty(propertyDescriptors[i], button, gridbag); count += 1; } } } } } URL iconURL = bean.getClass().getResource("images/" + bean.getName() + "Color16.gif"); ImageIcon icon = new ImageIcon(iconURL); componentTitlePanel.setTitle(bean.getName(), icon); bean.invalidate(); propertyPanel.invalidate(); componentPanel.invalidate(); componentPanel.repaint(); } catch (IntrospectionException e) { e.printStackTrace(); } } private void addProperty(PropertyDescriptor propertyDescriptor, JComponent editor, GridBagLayout grid) { String text = propertyDescriptor.getDisplayName(); String newText = ""; for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (((c >= 'A') && (c <= 'Z')) || (i == 0)) { if (i == 0) { c += ('A' - 'a'); } newText += (" " + c); } else { newText += c; } } JLabel label = new JLabel(newText + ": ", null, JLabel.RIGHT); GridBagConstraints c = new GridBagConstraints(); c.weightx = 1.0; c.fill = GridBagConstraints.BOTH; grid.setConstraints(label, c); propertyPanel.add(label); c.gridwidth = GridBagConstraints.REMAINDER; grid.setConstraints(editor, c); propertyPanel.add(editor); JPanel blankLine = new JPanel() { private static final long serialVersionUID = 4514530330521503732L; public Dimension getPreferredSize() { return new Dimension(10, 2); } }; grid.setConstraints(blankLine, c); propertyPanel.add(blankLine); } /** * Action to show the About dialog * * @author toedter_k */ class AboutAction extends AbstractAction { private static final long serialVersionUID = -5204865941545323214L; private JCalendarDemo demo; /** * Constructor for the AboutAction object * * @param demo * Description of the Parameter */ AboutAction(JCalendarDemo demo) { super("About..."); this.demo = demo; } /** * Description of the Method * * @param event * Description of the Parameter */ public void actionPerformed(ActionEvent event) { JOptionPane .showMessageDialog( demo, "JCalendar Demo\nVersion 1.3.2\n\nKai Toedter\nkai@toedter.com\nwww.toedter.com", "About...", JOptionPane.INFORMATION_MESSAGE); } } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/DemoTable.java0000644000175000017500000000632411176613654026172 0ustar twernertwerner/* * DemoTable.java - A table to demo JDateChooser cell editors. * Copyright (C) 2006 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar.demo; import java.awt.Dimension; import java.awt.GridLayout; import java.util.Date; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.AbstractTableModel; import com.toedter.calendar.JDateChooserCellEditor; /** * A demonstration table with JDateChooserCellEditors. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class DemoTable extends JPanel { private static final long serialVersionUID = -2823838920746867592L; public DemoTable() { super(new GridLayout(1, 0)); setName("DemoTable"); JTable table = new JTable(new DemoTableModel()); table.setPreferredScrollableViewportSize(new Dimension(180, 32)); table.setDefaultEditor(Date.class, new JDateChooserCellEditor()); // Create the scroll pane and add the table to it. JScrollPane scrollPane = new JScrollPane(table); // Add the scroll pane to this panel. add(scrollPane); } class DemoTableModel extends AbstractTableModel { private static final long serialVersionUID = 3283465559187131559L; private String[] columnNames = { "Empty Date", "Date set" }; private Object[][] data = { { null, new Date() }, { null, new Date() } }; public int getColumnCount() { return columnNames.length; } public int getRowCount() { return data.length; } public String getColumnName(int col) { return columnNames[col]; } public Object getValueAt(int row, int col) { return data[row][col]; } /* * JTable uses this method to determine the default renderer/ editor for * each cell. If we didn't implement this method, then the last column * would contain text ("true"/"false"), rather than a check box. */ public Class getColumnClass(int c) { return getValueAt(0, 1).getClass(); } /* * Don't need to implement this method unless your table's editable. */ public boolean isCellEditable(int row, int col) { return true; } /* * Don't need to implement this method unless your table's data can * change. */ public void setValueAt(Object value, int row, int col) { data[row][col] = value; fireTableCellUpdated(row, col); } } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/demo/DateChooserPanelBeanInfo.java0000644000175000017500000000257411176613654031123 0ustar twernertwerner/* * JDateChooserBeanInfo.java - Bean Info for JDateChooser * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar.demo; import com.toedter.components.GenericBeanInfo; /** * A BeanInfo class for the JDateChooser bean. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class DateChooserPanelBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JDateChooser bean. */ public DateChooserPanelBeanInfo() { super("JDateChooser", true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JCalendarBeanInfo.java0000644000175000017500000000253711176613654026641 0ustar twernertwerner/* * JcalendarBeanInfo.java - Bean Info for JCalendar Java Bean * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import com.toedter.components.GenericBeanInfo; /** * A BeanInfo class for JCalendar. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JCalendarBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JCalendar bean. */ public JCalendarBeanInfo() { super("JCalendar", true); } }libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/IDateEditor.java0000644000175000017500000001160011176613654025540 0ustar twernertwerner/* * Copyright (C) 2007 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.beans.PropertyChangeListener; import java.util.Date; import java.util.Locale; import javax.swing.JComponent; /** * All date editors that should be used by a JDateChooser have to implement this * interface. * * @author Kai Toedter * @version $LastChangedRevision: 105 $ * @version $LastChangedDate: 2007-02-16 12:56:29 +0100 (Fr, 16 Feb 2007) $ * */ public interface IDateEditor { /** * * Returns the date. * * @return the date */ public Date getDate(); /** * Sets the date. This should be implemented as a bound property, firing the * "date" property. * * @param date * the date to set */ public void setDate(Date date); /** * Sets the date format string, e.g. "MM/dd/yy". If the date format string * is null or invalid, the date format string will be set to the MEDIUM * Simple date format of the current locale. * * @param dateFormatString * the date format string */ public void setDateFormatString(String dateFormatString); /** * Returns tha date format string. * * @return the date format string */ public String getDateFormatString(); /** * Sets a valid date range for selectable dates. If max is before * min, the default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date should be * set to 01\01\0001) * @param max * the maximum selectable date or null (then the maximum date should be * set to 01\01\9999) */ public void setSelectableDateRange(Date min, Date max) ; /** * Gets the minimum selectable date. * * @return the minimum selectable date */ public Date getMaxSelectableDate(); /** * Gets the maximum selectable date. * * @return the maximum selectable date */ public Date getMinSelectableDate(); /** * Sets the maximum selectable date. * * @param max maximum selectable date */ public void setMaxSelectableDate(Date max); /** * Sets the minimum selectable date. * * @param min minimum selectable date */ public void setMinSelectableDate(Date min); /** * Returns the UI component, e.g. the actual JTextField implementing the * editor. * * @return the UI component */ public JComponent getUiComponent(); /** * Sets the locale. Usually this should have impact on the current date * format string. * * @param locale * the locale to set */ public void setLocale(Locale locale); /** * Enables or disables the UI compoment. * * @param enabled * true, if the UI component should be enabled. */ public void setEnabled(boolean enabled); /** * Adds a property change listener that should be added to the implementing * UI component. The UI component should fire a "date" property if the date * changes. * * @param listener * the property change listener. */ public void addPropertyChangeListener(PropertyChangeListener listener); /** * Adds a property change listener that should be added to the implementing * UI component. The UI component should fire a "date" property if the date * changes. * * @param propertyName * the property name, e.g. "date" * @param listener * the property change listener. */ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); /** * Removes a property change listener. * * @param listener * the property change listener. */ public void removePropertyChangeListener(PropertyChangeListener listener); /** * Removes the listener from the date editor's property change listeners for the specific property. * * @param propertyName * the property to listen for, e.g. "date" * @param listener * the listener */ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JCalendar.java0000644000175000017500000004077411176613654025244 0ustar twernertwerner/* * JCalendar.java - A bean for choosing a date * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.Calendar; import java.util.Date; import java.util.Locale; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; /** * JCalendar is a bean for entering a date by choosing the year, month and day. * * @author Kai Toedter * @version $LastChangedRevision: 95 $ * @version $LastChangedDate: 2006-05-05 18:43:15 +0200 (Fr, 05 Mai 2006) $ */ public class JCalendar extends JPanel implements PropertyChangeListener { private static final long serialVersionUID = 8913369762644440133L; private Calendar calendar; /** the day chooser */ protected JDayChooser dayChooser; private boolean initialized = false; /** indicates if weeks of year shall be visible */ protected boolean weekOfYearVisible = true; /** the locale */ protected Locale locale; /** the month chooser */ protected JMonthChooser monthChooser; private JPanel monthYearPanel; /** the year chhoser */ protected JYearChooser yearChooser; protected Date minSelectableDate; protected Date maxSelectableDate; /** * Default JCalendar constructor. */ public JCalendar() { this(null, null, true, true); } /** * JCalendar constructor which allows the initial date to be set. * * @param date * the date */ public JCalendar(Date date) { this(date, null, true, true); } /** * JCalendar constructor which allows the initial calendar to be set. * * @param calendar * the calendar */ public JCalendar(Calendar calendar) { this(null, null, true, true); setCalendar(calendar); } /** * JCalendar constructor allowing the initial locale to be set. * * @param locale * the new locale */ public JCalendar(Locale locale) { this(null, locale, true, true); } /** * JCalendar constructor specifying both the initial date and locale. * * @param date * the date * @param locale * the new locale */ public JCalendar(Date date, Locale locale) { this(date, locale, true, true); } /** * JCalendar constructor specifying both the initial date and the month * spinner type. * * @param date * the date * @param monthSpinner * false, if no month spinner should be used */ public JCalendar(Date date, boolean monthSpinner) { this(date, null, monthSpinner, true); } /** * JCalendar constructor specifying both the locale and the month spinner. * * @param locale * the locale * @param monthSpinner * false, if no month spinner should be used */ public JCalendar(Locale locale, boolean monthSpinner) { this(null, locale, monthSpinner, true); } /** * JCalendar constructor specifying the month spinner type. * * @param monthSpinner * false, if no month spinner should be used */ public JCalendar(boolean monthSpinner) { this(null, null, monthSpinner, true); } /** * JCalendar constructor with month spinner parameter. * * @param date * the date * @param locale * the locale * @param monthSpinner * false, if no month spinner should be used * @param weekOfYearVisible * true, if weeks of year shall be visible */ public JCalendar(Date date, Locale locale, boolean monthSpinner, boolean weekOfYearVisible) { setName("JCalendar"); // needed for setFont() etc. dayChooser = null; monthChooser = null; yearChooser = null; this.weekOfYearVisible = weekOfYearVisible; this.locale = locale; if (locale == null) { this.locale = Locale.getDefault(); } calendar = Calendar.getInstance(); setLayout(new BorderLayout()); monthYearPanel = new JPanel(); monthYearPanel.setLayout(new BorderLayout()); monthChooser = new JMonthChooser(monthSpinner); yearChooser = new JYearChooser(); monthChooser.setYearChooser(yearChooser); monthYearPanel.add(monthChooser, BorderLayout.WEST); monthYearPanel.add(yearChooser, BorderLayout.CENTER); monthYearPanel.setBorder(BorderFactory.createEmptyBorder()); dayChooser = new JDayChooser(weekOfYearVisible); dayChooser.addPropertyChangeListener(this); monthChooser.setDayChooser(dayChooser); monthChooser.addPropertyChangeListener(this); yearChooser.setDayChooser(dayChooser); yearChooser.addPropertyChangeListener(this); add(monthYearPanel, BorderLayout.NORTH); add(dayChooser, BorderLayout.CENTER); // Set the initialized flag before setting the calendar. This will // cause the other components to be updated properly. if (date != null) { calendar.setTime(date); } initialized = true; setCalendar(calendar); } /** * Creates a JFrame with a JCalendar inside and can be used for testing. * * @param s * The command line arguments */ public static void main(String[] s) { JFrame frame = new JFrame("JCalendar"); JCalendar jcalendar = new JCalendar(); frame.getContentPane().add(jcalendar); frame.pack(); frame.setVisible(true); } /** * Returns the calendar property. * * @return the value of the calendar property. */ public Calendar getCalendar() { return calendar; } /** * Gets the dayChooser attribute of the JCalendar object * * @return the dayChooser value */ public JDayChooser getDayChooser() { return dayChooser; } /** * Returns the locale. * * @return the value of the locale property. * * @see #setLocale */ public Locale getLocale() { return locale; } /** * Gets the monthChooser attribute of the JCalendar object * * @return the monthChooser value */ public JMonthChooser getMonthChooser() { return monthChooser; } /** * Gets the yearChooser attribute of the JCalendar object * * @return the yearChooser value */ public JYearChooser getYearChooser() { return yearChooser; } /** * Indicates if the weeks of year are visible.. * * @return boolean true, if weeks of year are visible */ public boolean isWeekOfYearVisible() { return dayChooser.isWeekOfYearVisible(); } /** * JCalendar is a PropertyChangeListener, for its day, month and year * chooser. * * @param evt * the property change event */ public void propertyChange(PropertyChangeEvent evt) { if (calendar != null) { Calendar c = (Calendar) calendar.clone(); if (evt.getPropertyName().equals("day")) { c.set(Calendar.DAY_OF_MONTH, ((Integer) evt.getNewValue()).intValue()); setCalendar(c, false); } else if (evt.getPropertyName().equals("month")) { c.set(Calendar.MONTH, ((Integer) evt.getNewValue()).intValue()); setCalendar(c, false); } else if (evt.getPropertyName().equals("year")) { c.set(Calendar.YEAR, ((Integer) evt.getNewValue()).intValue()); setCalendar(c, false); } else if (evt.getPropertyName().equals("date")) { c.setTime((Date) evt.getNewValue()); setCalendar(c, true); } } } /** * Sets the background color. * * @param bg * the new background */ public void setBackground(Color bg) { super.setBackground(bg); if (dayChooser != null) { dayChooser.setBackground(bg); } } /** * Sets the calendar property. This is a bound property. * * @param c * the new calendar * @throws NullPointerException - * if c is null; * @see #getCalendar */ public void setCalendar(Calendar c) { setCalendar(c, true); } /** * Sets the calendar attribute of the JCalendar object * * @param c * the new calendar value * @param update * the new calendar value * @throws NullPointerException - * if c is null; */ private void setCalendar(Calendar c, boolean update) { if (c == null) { setDate(null); } Calendar oldCalendar = calendar; calendar = c; if (update) { // Thanks to Jeff Ulmer for correcting a bug in the sequence :) yearChooser.setYear(c.get(Calendar.YEAR)); monthChooser.setMonth(c.get(Calendar.MONTH)); dayChooser.setDay(c.get(Calendar.DATE)); } firePropertyChange("calendar", oldCalendar, calendar); } /** * Enable or disable the JCalendar. * * @param enabled * the new enabled value */ public void setEnabled(boolean enabled) { super.setEnabled(enabled); if (dayChooser != null) { dayChooser.setEnabled(enabled); monthChooser.setEnabled(enabled); yearChooser.setEnabled(enabled); } } /** * Returns true, if enabled. * * @return true, if enabled. */ public boolean isEnabled() { return super.isEnabled(); } /** * Sets the font property. * * @param font * the new font */ public void setFont(Font font) { super.setFont(font); if (dayChooser != null) { dayChooser.setFont(font); monthChooser.setFont(font); yearChooser.setFont(font); } } /** * Sets the foreground color. * * @param fg * the new foreground */ public void setForeground(Color fg) { super.setForeground(fg); if (dayChooser != null) { dayChooser.setForeground(fg); monthChooser.setForeground(fg); yearChooser.setForeground(fg); } } /** * Sets the locale property. This is a bound property. * * @param l * the new locale value * * @see #getLocale */ public void setLocale(Locale l) { if (!initialized) { super.setLocale(l); } else { Locale oldLocale = locale; locale = l; dayChooser.setLocale(locale); monthChooser.setLocale(locale); firePropertyChange("locale", oldLocale, locale); } } /** * Sets the week of year visible. * * @param weekOfYearVisible * true, if weeks of year shall be visible */ public void setWeekOfYearVisible(boolean weekOfYearVisible) { dayChooser.setWeekOfYearVisible(weekOfYearVisible); setLocale(locale); // hack for doing complete new layout :) } /** * Gets the visibility of the decoration background. * * @return true, if the decoration background is visible. */ public boolean isDecorationBackgroundVisible() { return dayChooser.isDecorationBackgroundVisible(); } /** * Sets the decoration background visible. * * @param decorationBackgroundVisible * true, if the decoration background should be visible. */ public void setDecorationBackgroundVisible(boolean decorationBackgroundVisible) { dayChooser.setDecorationBackgroundVisible(decorationBackgroundVisible); setLocale(locale); // hack for doing complete new layout :) } /** * Gets the visibility of the decoration border. * * @return true, if the decoration border is visible. */ public boolean isDecorationBordersVisible() { return dayChooser.isDecorationBordersVisible(); } /** * Sets the decoration borders visible. * * @param decorationBordersVisible * true, if the decoration borders should be visible. */ public void setDecorationBordersVisible(boolean decorationBordersVisible) { dayChooser.setDecorationBordersVisible(decorationBordersVisible); setLocale(locale); // hack for doing complete new layout :) } /** * Returns the color of the decoration (day names and weeks). * * @return the color of the decoration (day names and weeks). */ public Color getDecorationBackgroundColor() { return dayChooser.getDecorationBackgroundColor(); } /** * Sets the background of days and weeks of year buttons. * * @param decorationBackgroundColor * the background color */ public void setDecorationBackgroundColor(Color decorationBackgroundColor) { dayChooser.setDecorationBackgroundColor(decorationBackgroundColor); } /** * Returns the Sunday foreground. * * @return Color the Sunday foreground. */ public Color getSundayForeground() { return dayChooser.getSundayForeground(); } /** * Returns the weekday foreground. * * @return Color the weekday foreground. */ public Color getWeekdayForeground() { return dayChooser.getWeekdayForeground(); } /** * Sets the Sunday foreground. * * @param sundayForeground * the sundayForeground to set */ public void setSundayForeground(Color sundayForeground) { dayChooser.setSundayForeground(sundayForeground); } /** * Sets the weekday foreground. * * @param weekdayForeground * the weekdayForeground to set */ public void setWeekdayForeground(Color weekdayForeground) { dayChooser.setWeekdayForeground(weekdayForeground); } /** * Returns a Date object. * * @return a date object constructed from the calendar property. */ public Date getDate() { return new Date(calendar.getTimeInMillis()); } /** * Sets the date. Fires the property change "date". * * @param date * the new date. * @throws NullPointerException - * if tha date is null */ public void setDate(Date date) { Date oldDate = calendar.getTime(); calendar.setTime(date); int year = calendar.get(Calendar.YEAR); int month = calendar.get(Calendar.MONTH); int day = calendar.get(Calendar.DAY_OF_MONTH); yearChooser.setYear(year); monthChooser.setMonth(month); dayChooser.setCalendar(calendar); dayChooser.setDay(day); firePropertyChange("date", oldDate, date); } /** * Sets a valid date range for selectable dates. If max is before * min, the default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date is * set to 01\01\0001) * @param max * the maximum selectable date or null (then the maximum date is * set to 01\01\9999) */ public void setSelectableDateRange(Date min, Date max) { dayChooser.setSelectableDateRange(min, max); }; /** * Gets the minimum selectable date. * * @return the minimum selectable date */ public Date getMaxSelectableDate() { return dayChooser.getMaxSelectableDate(); } /** * Gets the maximum selectable date. * * @return the maximum selectable date */ public Date getMinSelectableDate() { return dayChooser.getMinSelectableDate(); } /** * Sets the maximum selectable date. * * @param max maximum selectable date */ public void setMaxSelectableDate(Date max) { dayChooser.setMaxSelectableDate(max); } /** * Sets the minimum selectable date. * * @param min minimum selectable date */ public void setMinSelectableDate(Date min) { dayChooser.setMinSelectableDate(min); } /** * Gets the maximum number of characters of a day name or 0. If 0 is * returned, dateFormatSymbols.getShortWeekdays() will be used. * * @return the maximum number of characters of a day name or 0. */ public int getMaxDayCharacters() { return dayChooser.getMaxDayCharacters(); } /** * Sets the maximum number of characters per day in the day bar. Valid * values are 0-4. If set to 0, dateFormatSymbols.getShortWeekdays() will be * used, otherwise theses strings will be reduced to the maximum number of * characters. * * @param maxDayCharacters * the maximum number of characters of a day name. */ public void setMaxDayCharacters(int maxDayCharacters) { dayChooser.setMaxDayCharacters(maxDayCharacters); } } libjcalendar-java-1.3.3.orig/src/com/toedter/calendar/JYearChooserBeanInfo.java0000644000175000017500000000256111176613654027350 0ustar twernertwerner/* * JYearChooserBeanInfo.java - Bean Info for JYearChooser * Copyright (C) 2004 Kai Toedter * kai@toedter.com * www.toedter.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.toedter.calendar; import com.toedter.components.GenericBeanInfo; /** * A BeanInfo class for the JYearChooser bean. * * @author Kai Toedter * @version $LastChangedRevision: 85 $ * @version $LastChangedDate: 2006-04-28 13:50:52 +0200 (Fr, 28 Apr 2006) $ */ public class JYearChooserBeanInfo extends GenericBeanInfo { /** * Constructs a new BeanInfo class for the JYearChooser bean. */ public JYearChooserBeanInfo() { super("JYearChooser", false); } }libjcalendar-java-1.3.3.orig/src/jcalendar.manifest0000644000175000017500000000103311176613654022215 0ustar twernertwernerManifest-Version: 1.0 Main-Class: com.toedter.calendar.demo.JCalendarDemo Name: com/toedter/components/JLocaleChooser.class Java-Bean: True Name: com/toedter/calendar/JCalendar.class Java-Bean: True Name: com/toedter/calendar/JYearChooser.class Java-Bean: True Name: com/toedter/calendar/JMonthChooser.class Java-Bean: True Name: com/toedter/calendar/JDayChooser.class Java-Bean: True Name: com/toedter/calendar/JDateChooser.class Java-Bean: True Name: com/toedter/components/JSpinField.class Java-Bean: True libjcalendar-java-1.3.3.orig/jgoodies-looks-license.txt0000644000175000017500000000323211176613654023067 0ustar twernertwerner The BSD License for the JGoodies Looks ====================================== Copyright (c) 2001-2006 JGoodies Karsten Lentzsch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. o Neither the name of JGoodies Karsten Lentzsch nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.