diff options
| author | Paul Buetow <paul@buetow.org> | 2009-03-04 17:31:40 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2009-03-04 17:31:40 +0000 |
| commit | 9129838d208c0df7293e5b757661125545cd6df8 (patch) | |
| tree | cde0b095a7ad120b68450f705d8fc16d278bfff8 /libs/FLib/JCalendar/doc | |
| parent | e2c501ba5aaffd9d5ace6bc1706353d9f83329b7 (diff) | |
flib added
Diffstat (limited to 'libs/FLib/JCalendar/doc')
17 files changed, 885 insertions, 0 deletions
diff --git a/libs/FLib/JCalendar/doc/example/Example1.java b/libs/FLib/JCalendar/doc/example/Example1.java new file mode 100644 index 0000000..57e3b87 --- /dev/null +++ b/libs/FLib/JCalendar/doc/example/Example1.java @@ -0,0 +1,181 @@ +//********************************************************************** +// Package +//********************************************************************** + +package doc.example; + +//********************************************************************** +// Import list +//********************************************************************** + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import javax.swing.border.*; +import java.util.Calendar; +import java.util.Locale; +import org.freixas.jcalendar.*; + +/** + * This example shows various instances of the JCalendar class. + * <hr> + * This program is free software; you can redistribute it and/or + * modify it under the terms of the Artistic License. You should have + * received a copy of the Artistic License along with this program. If + * not, a copy is available at + * <a href="http://opensource.org/licenses/artistic-license.php"> + * opensource.org</a>. + * + * @author Antonio Freixas + */ + +// Copyright © 2004 Antonio Freixas +// All Rights Reserved. + +public class Example1 + extends JFrame +{ + +//********************************************************************** +// main +//********************************************************************** + +public static void +main( + String[] args) +{ + new Example1(); +} + +//********************************************************************** +// Constructors +//********************************************************************** + +/** + * Create various instances of a JCalendar. + */ + +public +Example1() +{ + // Set up the frame + + setTitle("Example1"); + setDefaultCloseOperation(EXIT_ON_CLOSE); + + Container contentPane = getContentPane(); + contentPane.setLayout(new GridLayout(2, 2, 5, 5)); + + // Create a border for all calendars + + Border etchedBorder = + BorderFactory.createEtchedBorder(); + Border emptyBorder = + BorderFactory.createEmptyBorder(10, 10, 10, 10); + Border compoundBorder = + BorderFactory.createCompoundBorder(etchedBorder, emptyBorder); + + // Create a date listener to be used for all calendars + + MyDateListener listener = new MyDateListener(); + + // Display date and time using the default calendar and locale. + // Display today's date at the bottom. + + JCalendar calendar1 = + new JCalendar( + JCalendar.DISPLAY_DATE | JCalendar.DISPLAY_TIME, + true); + calendar1.addDateListener(listener); + calendar1.setBorder(compoundBorder); + + // Set fonts rather than using defaults + + calendar1.setTitleFont(new Font("Serif", Font.BOLD|Font.ITALIC, 24)); + calendar1.setDayOfWeekFont(new Font("SansSerif", Font.ITALIC, 12)); + calendar1.setDayFont(new Font("SansSerif", Font.BOLD, 16)); + calendar1.setTimeFont(new Font("DialogInput", Font.PLAIN, 10)); + calendar1.setTodayFont(new Font("Dialog", Font.PLAIN, 14)); + + // Display date only + + JCalendar calendar2 = new JCalendar(JCalendar.DISPLAY_DATE, false); + calendar2.addDateListener(listener); + calendar2.setBorder(compoundBorder); + + // Display time only and set the time pattern to use as a duration + // from 00:00 to 23:59 + + JCalendar calendar3 = + new JCalendar( + Calendar.getInstance(), + Locale.getDefault(), + JCalendar.DISPLAY_TIME, + false, + "HH:mm"); + calendar3.addDateListener(listener); + calendar3.setBorder(compoundBorder); + + // Display a French calendar + + JCalendar calendar4 = + new JCalendar( + Calendar.getInstance(Locale.FRENCH), + Locale.FRENCH, + JCalendar.DISPLAY_DATE | JCalendar.DISPLAY_TIME, + false); + calendar4.addDateListener(listener); + calendar4.setBorder(compoundBorder); + + // Add all the calendars to the content pane + + JPanel panel1 = new JPanel(new FlowLayout()); + panel1.add(calendar1); + contentPane.add(panel1); + + JPanel panel2 = new JPanel(new FlowLayout()); + panel2.add(calendar2); + contentPane.add(panel2); + + JPanel panel3 = new JPanel(new FlowLayout()); + panel3.add(calendar3); + contentPane.add(panel3); + + JPanel panel4 = new JPanel(new FlowLayout()); + panel4.add(calendar4); + contentPane.add(panel4); + + // Make the window visible + + pack(); + setVisible(true); +} + +//********************************************************************** +// Inner Classes +//********************************************************************** + +private class MyDateListener + implements DateListener +{ + +public void +dateChanged( + DateEvent e) +{ + Calendar c = e.getSelectedDate(); + if (c != null) { + System.out.println(c.getTime()); + } + else { + System.out.println("No time selected."); + } +} + +} + +//********************************************************************** +// End Inner Classes +//********************************************************************** + +} diff --git a/libs/FLib/JCalendar/doc/example/Example2.java b/libs/FLib/JCalendar/doc/example/Example2.java new file mode 100644 index 0000000..0866447 --- /dev/null +++ b/libs/FLib/JCalendar/doc/example/Example2.java @@ -0,0 +1,173 @@ +//********************************************************************** +// Package +//********************************************************************** + +package doc.example; + +//********************************************************************** +// Import list +//********************************************************************** + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import java.util.Calendar; +import java.util.Locale; +import java.text.SimpleDateFormat; +import org.freixas.jcalendar.*; + +/** + * This example shows various instances of the JCalendarCombo class. + * <hr> + * This program is free software; you can redistribute it and/or + * modify it under the terms of the Artistic License. You should have + * received a copy of the Artistic License along with this program. If + * not, a copy is available at + * <a href="http://opensource.org/licenses/artistic-license.php"> + * opensource.org</a>. + * + * @author Antonio Freixas + */ + +// Copyright © 2004 Antonio Freixas +// All Rights Reserved. + +class Example2 + extends JFrame +{ + +//********************************************************************** +// main +//********************************************************************** + +public static void +main( + String[] args) +{ + new Example2(); +} + +//********************************************************************** +// Constructors +//********************************************************************** + +/** + * Create various instances of a JCalendarCombo. + */ + +public +Example2() +{ + // Set up the frame + + setTitle("Example2"); + setDefaultCloseOperation(EXIT_ON_CLOSE); + + Container contentPane = getContentPane(); + contentPane.setLayout(new GridLayout(2, 2, 5, 5)); + + // Create a date listener to be used for all calendars + + MyDateListener listener = new MyDateListener(); + + // Display date and time using the default calendar and locale. + // Display today's date at the bottom. Allow editing + + JCalendarCombo calendar1 = + new JCalendarCombo( + JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, + true); + calendar1.setEditable(true); + calendar1.addDateListener(listener); + + // Set fonts rather than using defaults + + calendar1.setFont(new Font("DialogInput", Font.PLAIN, 16)); + + calendar1.setTitleFont(new Font("Serif", Font.BOLD|Font.ITALIC, 24)); + calendar1.setDayOfWeekFont(new Font("SansSerif", Font.ITALIC, 12)); + calendar1.setDayFont(new Font("SansSerif", Font.BOLD, 16)); + calendar1.setTimeFont(new Font("DialogInput", Font.PLAIN, 10)); + calendar1.setTodayFont(new Font("Dialog", Font.PLAIN, 14)); + + // Display date only + + JCalendarCombo calendar2 = + new JCalendarCombo(JCalendarCombo.DISPLAY_DATE, false); + calendar2.addDateListener(listener); + + // Display time only and set the time pattern to use as a duration + // from 00:00 to 23:59 + + JCalendarCombo calendar3 = + new JCalendarCombo( + Calendar.getInstance(), + Locale.getDefault(), + JCalendarCombo.DISPLAY_TIME, + false, + "HH:mm:ss"); + calendar3.setDateFormat(new SimpleDateFormat("HH:mm:ss")); + calendar3.addDateListener(listener); + + // Display a French calendar + + JCalendarCombo calendar4 = + new JCalendarCombo( + Calendar.getInstance(Locale.FRENCH), + Locale.FRENCH, + JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, + false); + calendar4.addDateListener(listener); + + // Add all the calendars to the content pane + + JPanel panel1 = new JPanel(new BorderLayout()); + panel1.add(calendar1, BorderLayout.NORTH); + contentPane.add(panel1); + + JPanel panel2 = new JPanel(new BorderLayout()); + panel2.add(calendar2, BorderLayout.NORTH); + contentPane.add(panel2); + + JPanel panel3 = new JPanel(new BorderLayout()); + panel3.add(calendar3, BorderLayout.NORTH); + contentPane.add(panel3); + + JPanel panel4 = new JPanel(new BorderLayout()); + panel4.add(calendar4, BorderLayout.NORTH); + contentPane.add(panel4); + + // Make the window visible + + pack(); + setVisible(true); +} + +//********************************************************************** +// Inner Classes +//********************************************************************** + +private class MyDateListener + implements DateListener +{ + +public void +dateChanged( + DateEvent e) +{ + Calendar c = e.getSelectedDate(); + if (c != null) { + System.out.println(c.getTime()); + } + else { + System.out.println("No time selected."); + } +} + +} + +//********************************************************************** +// End Inner Classes +//********************************************************************** + +} diff --git a/libs/FLib/JCalendar/doc/examples.html b/libs/FLib/JCalendar/doc/examples.html new file mode 100644 index 0000000..b741ca1 --- /dev/null +++ b/libs/FLib/JCalendar/doc/examples.html @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Examples</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Examples</h1>
+ <p>There are two example programs provided for JCalendar. The two programs
+ are similar except one uses the JCalendar component and the other uses
+ the JCalendarCombo component.</p>
+ <p>View the <a href="example/Example1.java">Example1</a> program. View the
+ <a href="example/Example2.java">Example2</a> program. </p>
+ <p>If you download the FLib source, you can use Ant to build and run
+ the example programs:</p>
+ <pre>cd JCalendar
+ant runExample1
+ant runExample2</pre>
+ <p>Four calendars appear in each example. The upper-left calendar is used
+ to select a date and time. Today's date is displayed at the bottom of
+ the calendar. In Example2, it is the only one of the four combo box calendars
+ which is editable.</p>
+ <p>The upper-right calendar selects just a date. The lower-left calendar
+ selects just a time.</p>
+ <p>The lower-right calendar uses the French locale (all the others use the
+ default locale). Because the JCalendar component takes advantage of the
+ localization in the Calendar class, we get a French-version of the Gregorian
+ calendar. The month and weekday names are in French. The week starts on
+ a Monday. The time uses a 24-hour clock.</p>
+ <p>The JCalendar package is not completely localized for French. For instance,
+ the tool tips on the calendar buttons appear in English. See the <a href="tutorial.html">tutorial</a>
+ for instructions on fully localizing the package.</p>
+ <p>When you run either example, each date selection will be echoed to the
+ window from which you ran the <code>ant</code> command.</p>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
diff --git a/libs/FLib/JCalendar/doc/features.html b/libs/FLib/JCalendar/doc/features.html new file mode 100644 index 0000000..2e3c824 --- /dev/null +++ b/libs/FLib/JCalendar/doc/features.html @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Features</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Features</h1>
+ <p>The main features of JCalendar are:</p>
+ <ul>
+ <li>Easy to use.</li>
+ <li>Can input the date, time or both.</li>
+ <li>Can set entry format for time selection.</li>
+ <li>Can optionally display today's date.</li>
+ <li>Can use as a panel (JCalendar) or combo-box (JCalendarCombo).</li>
+ <li>The combo-box can be editable.</li>
+ <li>Can select date format for selected date in combo-box.</li>
+ <li>Can select the font to use for all display elements.</li>
+ <li>Can optionally allow null date (no date) to be selected.</li>
+ <li>Keyboard access to all functionality.</li>
+ <li>Combo-box can adopt current L&F (requires modifications for new
+ L&F's). </li>
+ <li>Fully internationalized and ready for localization. Most localization
+ is already done by taking advantage of the localization in the Java
+ Calendar class.</li>
+ </ul>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
diff --git a/libs/FLib/JCalendar/doc/images/Logo.png b/libs/FLib/JCalendar/doc/images/Logo.png Binary files differnew file mode 100644 index 0000000..774900e --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/Logo.png diff --git a/libs/FLib/JCalendar/doc/images/screenshot-combo-meta-noedit.gif b/libs/FLib/JCalendar/doc/images/screenshot-combo-meta-noedit.gif Binary files differnew file mode 100644 index 0000000..46a9ed5 --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-combo-meta-noedit.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-combo-metal-all.gif b/libs/FLib/JCalendar/doc/images/screenshot-combo-metal-all.gif Binary files differnew file mode 100644 index 0000000..7e9889c --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-combo-metal-all.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-combo-skin1.gif b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin1.gif Binary files differnew file mode 100644 index 0000000..1a22a98 --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin1.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-combo-skin2.gif b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin2.gif Binary files differnew file mode 100644 index 0000000..848f520 --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin2.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-combo-skin3.gif b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin3.gif Binary files differnew file mode 100644 index 0000000..91d2e98 --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-combo-skin3.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-all.gif b/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-all.gif Binary files differnew file mode 100644 index 0000000..a10a5f3 --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-all.gif diff --git a/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-french.gif b/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-french.gif Binary files differnew file mode 100644 index 0000000..15a5f9f --- /dev/null +++ b/libs/FLib/JCalendar/doc/images/screenshot-panel-metal-french.gif diff --git a/libs/FLib/JCalendar/doc/index.html b/libs/FLib/JCalendar/doc/index.html new file mode 100644 index 0000000..8059eeb --- /dev/null +++ b/libs/FLib/JCalendar/doc/index.html @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Introduction</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Introduction</h1>
+ <p>Hi! My name is Tony Freixas and I am currently working on an application
+ that I intend to release as Open Source. In the process of building the
+ application, I am using as many Open Source classes and components as
+ I can find.</p>
+ <p>In some cases, I have been disappointed with what I have found on the
+ web:</p>
+ <ul>
+ <li>Classes that are not free.</li>
+ <li>Classes with restrictive licensing.</li>
+ <li>Classes which ignore internationalization.</li>
+ <li>Classes which are not easy to use.</li>
+ <li>Components which are limited with respect to the Look & Feel that
+ can be used.</li>
+ </ul>
+ <p>When I have not found a suitable Java class, I have implemented my own.
+ I have decided to release these for use by others as part of a library
+ I call FLib.</p>
+ <p>Currently, there are three components available in FLib and I have chosen
+ to make them completely independent of each other. In the future, you
+
+ may have to load some common code in order to use the FLib classes.</p>
+ <p>These web pages are for the Swing-based JCalendar component. Use the
+ links on the left to learn more.</p>
+ <p><a href="http://sourceforge.net/donate/index.php?group_id=113939"><img src="http://images.sourceforge.net/images/project-support.jpg" width="88" height="32" border="0" alt="Support This Project" title=""/></a></p>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
diff --git a/libs/FLib/JCalendar/doc/resources.html b/libs/FLib/JCalendar/doc/resources.html new file mode 100644 index 0000000..a384e20 --- /dev/null +++ b/libs/FLib/JCalendar/doc/resources.html @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Other Resources</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Other Resources</h1>
+ <p>I think it's only fair to note some of the other Java calendar component
+ implementations. Some of these have appeared since I wrote my version.
+ You may do a Google search to find yet other versions.</p>
+ <p>I tried the JCalendarCombo from <a href="http://in.geocities.com/onlyjava2003/">OnlyJava</a>.
+ It looked nice at first, but I had several problems with it:</p>
+ <ul>
+ <li>You had to set start/end years since the year was chosen from a combo
+ box.</li>
+ <li>The combo box (textfield and down-arrow) always had the Metal L&F.</li>
+ <li>The component was not internationalized.</li>
+ <li>The license does not allow for derivative works.</li>
+ </ul>
+ <p>The JCalendar from <a href="http://www.toedter.com/en/jcalendar/index.html">toedter.com</a>
+ looks promising. There doesn't seem to be an option for a combo-box version,
+ though. It uses the LGPL license.</p>
+ <p>A <a href="http://pachome1.pacific.net.sg/%7Ewongkw/CalendarPanel.html">CalendarPanel</a>
+ was written by Wong Kok Wai. It also lacks combo-box entry. I'm not sure
+ about the license.</p>
+ <p>There are a number of commercial products you could try if you're willing
+ to pay:</p>
+ <ul>
+ <li><a href="http://www.javadatepicker.com/">JavaDatePicker</a> starts
+ at $119 for a single-developer license.</li>
+ <li><a href="http://www.zfqjava.com/docs-calendar.html">ExtremeComponent</a>
+ offers a JCalendar component binary license for $19. I didn't see a
+ combo-box option.</li>
+ <li><a href="http://www.lavantech.com/datetimepicker/">LavanTech</a> has
+ a pretty fancy date/time selector starting at $75 for a single-user
+ license. It does provide a combo-box selection, but I'm not sure how
+ well it adapts to the various L&F's.</li>
+ <li><a href="http://www.jproductivity.com/products/components/component-calendar.htm">jProductivity</a>
+ offers a calendar with a lot of options, including a combo-box version.
+ Again, I'm not sure how it adapts to various L&F's since the only
+ way I've found to do it is to modify the code for each L&F.</li>
+ </ul>
+ <p>There are some less-fancy calendar selectors which might be useful for
+ applets. <a href="http://www.javaside.com/asp/mus.asp?page=/us/tcaldate.shtml">tCalDate</a>
+ is free for personal use and appears to only require registration for
+ professional use. <a href="http://scand.com/products/awtx/calendar/">Scand
+ LLC</a> offers two versions of a calendar: one for free and an advanced
+ version for $29.</p>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
diff --git a/libs/FLib/JCalendar/doc/screenshots.html b/libs/FLib/JCalendar/doc/screenshots.html new file mode 100644 index 0000000..9b3f70e --- /dev/null +++ b/libs/FLib/JCalendar/doc/screenshots.html @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Screen Shots</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Screen Shots</h1>
+ <p>The following are screen shots of JCalendar components using various
+ look-and-feels:</p>
+ <p align="center"><img src="images/screenshot-panel-metal-all.gif" width="329" height="239" /></p>
+ <p align="center">A JCalendar from the Example1 program using the Metal
+ L&F. Both date and time are input and today's date is displayed on
+ the bottom.</p>
+ <p align="center"><img src="images/screenshot-panel-metal-french.gif" width="330" height="223" /></p>
+ <p align="center">A JCalendar from the Example1 program using the French
+ locale. Note that the week starts on a Monday and that the time entry
+ uses a 24-hour clock.</p>
+ <p align="center"><img src="images/screenshot-combo-metal-all.gif" width="324" height="263" /></p>
+ <p align="center">An editable JCalendarCombo from the Example2 program with
+ the calendar pop-up displayed.</p>
+ <p align="center"><img src="images/screenshot-combo-meta-noedit.gif" width="324" height="219" /></p>
+ <p align="center">A non-editable JCalendarCombo from the Example2 program.
+ Only the date (not the time) is requested.</p>
+ <p align="center"><img src="images/screenshot-combo-skin1.gif" width="314" height="200" /></p>
+ <p align="center">An editable JCalendarCombo using the Skin L&F with
+ the <em>Aqua</em> package.</p>
+ <p align="center"><img src="images/screenshot-combo-skin2.gif" width="314" height="200" /></p>
+ <p align="center">An editable JCalendarCombo using the Skin L&F with
+ the <em>Modern</em> package.</p>
+ <p align="center"><img src="images/screenshot-combo-skin3.gif" width="314" height="200" /></p>
+ <p align="center">An editable JCalendarCombo using the Skin L&F with
+ the <em>XPLuna</em> package.</p>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
diff --git a/libs/FLib/JCalendar/doc/stylesheet.css b/libs/FLib/JCalendar/doc/stylesheet.css new file mode 100644 index 0000000..dc693da --- /dev/null +++ b/libs/FLib/JCalendar/doc/stylesheet.css @@ -0,0 +1,48 @@ +body {
+ font-family: Arial, Helvetica, sans-serif;
+ background: white:
+ color: black;
+}
+
+td {
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+th {
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+#sidebar {
+ font-family: "Times New Roman", Times, serif;
+ font-weight: bold;
+ font-style: italic;
+ font-size: 20px;
+}
+
+#content {
+ font-size: 100%;
+}
+
+a:visited {
+ color: #8080FF;
+ text-decoration: none;
+}
+
+a:link {
+ color: #8080FF;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #C00000;
+ text-decoration: none;
+}
+
+a:active {
+ color: #C00000;
+ text-decoration: none;
+}
+
+pre {
+ margin-left: 1em;
+}
diff --git a/libs/FLib/JCalendar/doc/tutorial.html b/libs/FLib/JCalendar/doc/tutorial.html new file mode 100644 index 0000000..6fd8422 --- /dev/null +++ b/libs/FLib/JCalendar/doc/tutorial.html @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/JCalendar.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>JCalendar - Tutorial</title>
+<!-- InstanceEndEditable -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- InstanceBeginEditable name="head" -->
+<!-- InstanceEndEditable -->
+<link href="stylesheet.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<p><img src="images/Logo.png" width="800" height="150" /></p>
+<table width="800" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td width="150" align="left" valign="top" id="sidebar">
+ <p><a href="index.html">Introduction</a></p>
+ <p><a href="features.html">Features</a></p>
+ <p><a href="screenshots.html">Screen<br />
+ shots</a></p>
+ <p><a href="tutorial.html">Tutorial</a></p>
+ <p><a href="examples.html">Examples</a></p>
+ <p><a href="api/index.html">API<br />
+ documentation</a></p>
+ <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
+ <p><a href="resources.html">Other<br />
+ resources</a></p>
+ <p><a href="../../index.html">Return to<br />
+ FLib </a></p>
+ <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
+ <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p> </td>
+ <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
+ <h1>Tutorial</h1>
+ <h2>JCalendar</h2>
+ <p>JCalendar is the generic name for two Java components: one is called
+ JCalendar and the other is called JCalendarCombo. They both share common
+ features, particularly the ability to select a date and/or time. The former
+ accomplishes this with a panel and the latter with a combo-box.</p>
+ <h3>Creating the Components</h3>
+ <p>The simplest constructors for JCalendar and JCalendarCombo have no arguments.
+ They create calendar components that allow a date to be selected from
+ the default calendar in the default locale.</p>
+ <p>The next step is to select the specific Calendar and Locale classes to
+ use (but the JCalendar components have only been tested with the Gregorian
+ calendar). There are three more parameters that can be specified:</p>
+ <ul>
+ <li>Whether to select a date, a time or both.</li>
+ <li>Whether to display today's date at the bottom of the component.</li>
+ <li>The SimpleDateFormat pattern to use in displaying the time selection
+ field.</li>
+ </ul>
+ <p>Normally, the calendar components allow you to select a null date/time
+ (press Delete or Backspace to set a null selection). This is useful for
+ cases where the user has an option of not specifying a date/time. You
+ can turn this off by calling <code>setNullAllowed(false)</code>.</p>
+ <p>For the JCalendarCombo, you also have the option of making the combo-box
+ editable (as with any combo-box). You can control the date format that
+ appears in the combo-box field with <code>setDateFormat()</code>.</p>
+ <h3>Date Selections</h3>
+ <p>You can set the selected date with <code>setDate()</code>. The default
+ date/time selection will be today's date/time unless you explicitly set
+ a date. You can read the currently selected date at any time using <code>getDate()</code>
+ or <code>getCalendar()</code>. Finally, you can add a DateListener to
+ listen for date changes. Each time the date/time changes, the listener
+ is called. </p>
+
+ <h3>Fonts</h3>
+ <p>You may specify the font to use for each elements that makes
+ up a calendar component. The elements are:</p>
+ <ul>
+ <li>The month-year title.</li>
+ <li>The day-of-week labels (Mon, Tue, etc.).</li>
+ <li>The day buttons.</li>
+ <li>The time spinner.</li>
+ <li>The today's date message.</li>
+ </ul>
+ <p>In addition, the combo box text can be changed in the usual
+ way—by calling setFont() on the combo box component.</p>
+ <h3>Keyboard Control</h3>
+ <p>The calendar appears with buttons that allow the user to move a month
+ or year backwards or forward. You can use the arrow keys to do the same:</p>
+ <ul>
+ <li>Left Arrow - Move back a month.</li>
+ <li>Right Arrow - Move forward a month.</li>
+ <li>Shift Left Arrow - Move back a year.</li>
+ <li>Shift Right Arrow - Move forward a year.</li>
+ </ul>
+ <p>In addition, you can use Delete or Backspace to select a null date (if
+ null dates are allowed).</p>
+ <p>As normal, you can tab through the various buttons (including the day
+ buttons) and press Enter to activate the button.</p>
+ <p>If there is a time field, it can be a little problematic. Once it has
+ focus, the up/down arrow keys increment/decrement portions of the time
+ field. The left/right keys select the portion of the time to increment/decrement.
+ You will need to tab out of the time field or use the mouse to select
+ a button elsewhere in the calendar in order to restore the normal keyboard
+ controls.</p>
+ <p>The JCalendarCombo has some additional keyboard controls. The down arrow
+ pops up a calendar if one is not visible. The up arrow hides the calendar
+ pop-up (as does the Enter key). The Escape key also hides the calendar,
+ but restores the date to the value it had before the calendar was popped
+ up.</p>
+ <h3>Internationalization</h3>
+ <p>The JCalendar components take advantage of the internationalization and
+ localization work done by the Calendar class. In order to fully localize
+ JCalendar to other than US English, you will need to obtain the source
+ code for JCalendar and create a org.freixas.jcalendar.Bundle_<em><locale></em>.properties
+ file which translates the text in org.freixas.jcalendar.Bundle.properties,
+ where <em><locale></em> is a two-letter country code.</p>
+ <p>The main thing in this file are the tooltips for the various buttons
+ and the text for displaying today's date as well as some error messages.</p>
+ <h3>Look-and-Feel</h3>
+ <p>It was important for my own use that the JCalendar combo-box adopt the
+ current Java Look-and-Feel (L&F). As it turns out, it is impossible
+ to design a class that can automatically do this for all possible L&F's.
+ If you need to use a L&F other than Metal, Windows or Motif, you will
+ need to obtain the JCalendar source code and make some changes.</p>
+ <p>In the <code>updateUI()</code> method of JCalendarCombo.java, you will
+ need to add some code that looks like this:</p>
+ <pre>else if (cui instanceof SomeComboBoxUI) {
+ cui = new SomeDateComboBoxUI();
+}</pre>
+
+ <p>Then in the inner class section of the code, add a new inner class:</p>
+ <pre>class SomeDateComboBoxUI
+ extends SomeComboBoxUI
+{
+ protected ComboPopup createPopup() {
+ return new CalendarComboPopup();
+ }
+}
+</pre>
+ <p>Of course, the word "Some" would be replaced by the name of
+ your L&F (Metal, Motif, etc.). When your L&F is installed, the
+ JCalendarCombo combo-box will now look the same as a normal JComboBox.</p>
+ <h3>Summary</h3>
+ <p>The JCalendar components are designed to be easy to use—create
+ the component you want, set up a few options and register a DateListener
+ and you're in business. </p>
+ <p>After reading this tutorial, you should examine the <a href="examples.html">example
+ programs</a> provided which exercise many of the features of JCalendar
+ components.</p>
+ <!-- InstanceEndEditable --></td>
+ </tr>
+</table>
+</body>
+<!-- InstanceEnd --></html>
|
