JXDatePicker picker = new JXDatePicker(); Calendar calendar = picker.getMonthView().getCalendar(); // starting today if we are in a hurry calendar.setTime(new Date()); picker.getMonthView().setLowerBound(calendar.getTime()); // end of next week CalendarUtils.endOfWeek(calendar); calendar.add(Calendar.WEEK_OF_YEAR); picker.getMonthView().setUpperBound(calendar.getTime());
/** * Installs DatePicker default properties. */ protected void installDefaults() { // PENDING JW: currently this is for testing only. boolean zoomable = Boolean.TRUE.equals(UIManager.get("JXDatePicker.forceZoomable")); if (zoomable) { datePicker.getMonthView().setZoomable(true); } }
/** * Installs DatePicker default properties. */ protected void installDefaults() { // PENDING JW: currently this is for testing only. boolean zoomable = Boolean.TRUE.equals(UIManager.get("JXDatePicker.forceZoomable")); if (zoomable) { datePicker.getMonthView().setZoomable(true); } }
/** * Installs DatePicker default properties. */ protected void installDefaults() { // PENDING JW: currently this is for testing only. boolean zoomable = Boolean.TRUE.equals(UIManager.get("JXDatePicker.forceZoomable")); if (zoomable) { datePicker.getMonthView().setZoomable(true); } }
/** * Updates the picker's linkDate to be in synch with monthView's today. */ protected void updateLinkDate() { datePicker.setLinkDay(datePicker.getMonthView().getToday()); }
/** * Updates the picker's linkDate to be in synch with monthView's today. */ protected void updateLinkDate() { datePicker.setLinkDay(datePicker.getMonthView().getToday()); }
@Override public void actionPerformed(ActionEvent e) { if (e == null) return; if (e.getSource() == datePicker.getMonthView()) { monthViewActionPerformed(e); } else if (e.getSource() == datePicker.getEditor()) { editorActionPerformed(e); } }
@Override public void actionPerformed(ActionEvent e) { if (e == null) return; if (e.getSource() == datePicker.getMonthView()) { monthViewActionPerformed(e); } else if (e.getSource() == datePicker.getEditor()) { editorActionPerformed(e); } }
/** * Updates the picker's linkDate to be in synch with monthView's today. */ protected void updateLinkDate() { datePicker.setLinkDay(datePicker.getMonthView().getToday()); }
public BasicDatePickerPopup() { setLayout(new BorderLayout()); add(datePicker.getMonthView(), BorderLayout.CENTER); updateLinkPanel(null); }
public BasicDatePickerPopup() { setLayout(new BorderLayout()); add(datePicker.getMonthView(), BorderLayout.CENTER); updateLinkPanel(null); }
/** * Sets the editor value to the model's selectedDate. */ private void updateEditorValue() { datePicker.getEditor().setValue(datePicker.getMonthView().getSelectionDate()); }
/** * Sets the editor value to the model's selectedDate. */ private void updateEditorValue() { datePicker.getEditor().setValue(datePicker.getMonthView().getSelectionDate()); }
/** * Sets the editor value to the model's selectedDate. */ private void updateEditorValue() { datePicker.getEditor().setValue(datePicker.getMonthView().getSelectionDate()); }
/** * Sets the editor value to the model's selectedDate. */ private void updateEditorValue() { datePicker.getEditor().setValue(datePicker.getMonthView().getSelectionDate()); }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
/** * Updates internals after picker's date property changed. */ protected void updateFromDateChanged() { Date visibleHook = datePicker.getDate() != null ? datePicker.getDate() : datePicker.getLinkDay(); datePicker.getMonthView().ensureDateVisible(visibleHook); datePicker.getEditor().setValue(datePicker.getDate()); }
/** * Updates internals after picker's date property changed. */ protected void updateFromDateChanged() { Date visibleHook = datePicker.getDate() != null ? datePicker.getDate() : datePicker.getLinkDay(); datePicker.getMonthView().ensureDateVisible(visibleHook); datePicker.getEditor().setValue(datePicker.getDate()); }
/** * Updates internals after picker's date property changed. */ protected void updateFromDateChanged() { Date visibleHook = datePicker.getDate() != null ? datePicker.getDate() : datePicker.getLinkDay(); datePicker.getMonthView().ensureDateVisible(visibleHook); datePicker.getEditor().setValue(datePicker.getDate()); }