Example usage for javax.swing SpinnerDateModel SpinnerDateModel

List of usage examples for javax.swing SpinnerDateModel SpinnerDateModel

Introduction

In this page you can find the example usage for javax.swing SpinnerDateModel SpinnerDateModel.

Prototype

public SpinnerDateModel(Date value, Comparable<Date> start, Comparable<Date> end, int calendarField) 

Source Link

Document

Creates a SpinnerDateModel that represents a sequence of dates between start and end.

Usage

From source file:org.eclipse.wb.internal.swing.model.property.editor.models.spinner.DateSpinnerComposite.java

@Override
public SpinnerModel getModel() {
    Date value = m_valueField.getSelection();
    Date minimum = m_minButton.getSelection() ? m_minField.getSelection() : null;
    Date maximum = m_maxButton.getSelection() ? m_maxField.getSelection() : null;
    String stepField = CALENDAR_FIELDS[m_stepCombo.getSelectionIndex()];
    int step = ReflectionUtils.getFieldInt(Calendar.class, stepField);
    return new SpinnerDateModel(value, minimum, maximum, step);
}