Search in sources :

Example 1 with DatePicker

use of com.github.lgooddatepicker.components.DatePicker in project briefcase by opendatakit.

the class ConfigurationPanelForm method createDatePicker.

/**
 * The DatePicker default text box and calendar button don't match with the rest of the UI.
 * This tweaks those elements to be consistent with the rest of the application.
 */
private DatePicker createDatePicker() {
    JTextField model = new JTextField();
    DatePicker datePicker = new DatePicker();
    datePicker.getComponentDateTextField().setBorder(model.getBorder());
    datePicker.getComponentDateTextField().setMargin(new Insets(0, 0, 0, 0));
    datePicker.getComponentDateTextField().setEditable(false);
    datePicker.getComponentToggleCalendarButton().setText("Choose...");
    datePicker.getComponentToggleCalendarButton().setMargin(new Insets(0, 0, 0, 0));
    return datePicker;
}
Also used : Insets(java.awt.Insets) DatePicker(com.github.lgooddatepicker.components.DatePicker) JTextField(javax.swing.JTextField)

Example 2 with DatePicker

use of com.github.lgooddatepicker.components.DatePicker in project Kernbeisser-Gradle by julikiller98.

the class AccountingReportsView method createUIComponents.

private void createUIComponents() {
    user = new AdvancedComboBox<>(User::getFullName);
    tillRollStartDate = new DatePicker(new DatePickerSettings(Locale.GERMANY));
    tillRollEndDate = new DatePicker(new DatePickerSettings(Locale.GERMANY));
}
Also used : DatePickerSettings(com.github.lgooddatepicker.components.DatePickerSettings) DatePicker(com.github.lgooddatepicker.components.DatePicker)

Aggregations

DatePicker (com.github.lgooddatepicker.components.DatePicker)2 DatePickerSettings (com.github.lgooddatepicker.components.DatePickerSettings)1 Insets (java.awt.Insets)1 JTextField (javax.swing.JTextField)1