home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 1.2 KB | 44 lines |
- package symantec.itools.awt.util.spinner;
-
- // 08/28/97 LAB Updated version to 1.1. Made it get list of days from java localization
- // support (Addresses Mac Bug #7371).
- // 08/29/97 CAR constructor now sets max to index 6
-
- /**
- * Day of the week spin control.<br>
- * Creates a text box, containing a list of the days of the week,
- * with up and down arrows. Allows your user
- * to move through a set of fixed values or type a valid value in the box.
- *
- * @see ListSpinner
- *
- * @version 1.1, August 28, 1997
- *
- * @author Symantec
- *
- */
- public class DaySpinner extends ListSpinner
- {
- /**
- * Construct DaySpinner component. This component includes
- * the weekdays in the order Sunday through Saturday. By default,
- * the inial display of this component is the item "Sunday".
- */
-
- public DaySpinner()
- {
- java.text.DateFormatSymbols dfs = new java.text.DateFormatSymbols();
- String days[] = dfs.getWeekdays();
- int length = days.length ;
-
- //??? LAB ??? The first item is blank, why?
- int i = days[0].equals("") ? 1 : 0;
- for(; i < length; ++i)
- addItem(days[i]);
-
- try {
- setMax(6);
- } catch (java.beans.PropertyVetoException e) {}
- }
- }
-