Examples of CalendarDate


Examples of org.apache.pivot.util.CalendarDate

            numericSpinner.setSpinnerData(numericSpinnerData);
            numericSpinner.setSelectedIndex(0);
        }

        private void initializeDateSpinner(Spinner dateSpinner) {
            CalendarDate lowerBound = new CalendarDate(2008, 0, 0);
            CalendarDate upperBound = new CalendarDate(2019, 11, 30);
            CalendarDateSpinnerData spinnerData = new CalendarDateSpinnerData(lowerBound, upperBound);

            CalendarDate today = new CalendarDate();
            dateSpinner.setSpinnerData(spinnerData);
            dateSpinner.setSelectedItem(today);
        }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

        super(buttonData);

        setDataRenderer(DEFAULT_DATA_RENDERER);
        installThemeSkin(CalendarButton.class);

        setSelectedDate(new CalendarDate());
    }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

     *
     * @param selectedDate
     * The date to select, or <tt>null</tt> to clear the selection.
     */
    public void setSelectedDate(CalendarDate selectedDate) {
        CalendarDate previousSelectedDate = this.selectedDate;

        if (previousSelectedDate != selectedDate) {
            this.selectedDate = selectedDate;
            calendarButtonSelectionListeners.selectedDateChanged(this,
                previousSelectedDate);
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

    public static final String LANGUAGE_KEY = "language";
    public static final String COUNTRY_KEY = "country";
    public static final String VARIANT_KEY = "variant";

    public Calendar() {
        this(new CalendarDate());
    }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

     *
     * @param selectedDate
     * The selected date, or <tt>null</tt> to specify no selection
     */
    public void setSelectedDate(CalendarDate selectedDate) {
        CalendarDate previousSelectedDate = this.selectedDate;

        if (previousSelectedDate != selectedDate) {
            this.selectedDate = selectedDate;
            calendarSelectionListeners.selectedDateChanged(this, previousSelectedDate);
        }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

        if (dataMutable == null) {
            dataMutable = "";
        } else {
            if (dataMutable instanceof CalendarDate) {
                CalendarDate date = (CalendarDate)dataMutable;

                DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
                dataMutable = dateFormat.format(date.toCalendar().getTime());
            }
        }

        super.render(dataMutable, button, highlight);
    }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

    // Calendar button selection events
    @Override
    public void selectedDateChanged(CalendarButton calendarButton,
        CalendarDate previousSelectedDate) {
        // Set the selected date as the button data
        CalendarDate date = calendarButton.getSelectedDate();
        calendarButton.setButtonData(date);

        calendar.setSelectedDate(date);

        if (date != null) {
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

        }
    }

    private static Component addCalendarDateControl(final Dictionary<String, Object> dictionary,
        final String key, Form.Section section) {
        CalendarDate calendarDate = (CalendarDate)dictionary.get(key);

        CalendarButton calendarButton = new CalendarButton();
        calendarButton.setMinimumWidth(75);
        calendarButton.setSelectedDate(calendarDate);
        section.add(calendarButton);
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

    private void updateCalendarDateControl(Dictionary<String, Object> dictionary, String key) {
        CalendarButton calendarButton = (CalendarButton)controls.get(key);

        if (calendarButton != null) {
            CalendarDate value = (CalendarDate)dictionary.get(key);
            calendarButton.setSelectedDate(value);
        }
    }
View Full Code Here

Examples of org.apache.pivot.util.CalendarDate

            spinner.setSpinnerData(numericSpinnerData);
            spinner.setSelectedIndex(0);
        }

        private void initializeDateSpinner(Spinner spinner) {
            CalendarDate lowerBound = new CalendarDate(2008, 0, 0);
            CalendarDate upperBound = new CalendarDate(2019, 11, 30);
            CalendarDateSpinnerData spinnerData = new CalendarDateSpinnerData(lowerBound, upperBound);

            CalendarDate today = new CalendarDate();
            spinner.setSpinnerData(spinnerData);
            spinner.setSelectedItem(today);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.