List of usage examples for javax.swing SpinnerDateModel SpinnerDateModel
public SpinnerDateModel(Date value, Comparable<Date> start, Comparable<Date> end, int calendarField)
SpinnerDateModel
that represents a sequence of dates between start
and end
. 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); }