Source:
protected ConfigurationPanelForm(ConfigurationPanelMode mode) { this.mode = mode; startDatePicker = createDatePicker(); endDatePicker = createDatePicker(); pullBeforeOverrideField = new JComboBox<>(PullBeforeOverrideOption.values()); pullBeforeOverrideField.setSelectedItem(INHERIT); $$$setupUI$$$(); startDatePicker.getSettings().setGapBeforeButtonPixels(0); startDatePicker.getComponentDateTextField().setPreferredSize(exportDirField.getPreferredSize()); startDatePicker.getComponentToggleCalendarButton().setPreferredSize(exportDirChooseButton.getPreferredSize()); endDatePicker.getSettings().setGapBeforeButtonPixels(0); endDatePicker.getComponentDateTextField().setPreferredSize(exportDirField.getPreferredSize()); endDatePicker.getComponentToggleCalendarButton().setPreferredSize(exportDirChooseButton.getPreferredSize()); pullBeforeHintPanel.setBackground(new Color(255, 255, 255, 0)); mode.decorate(pullBeforeField, pullBeforeOverrideLabel, pullBeforeOverrideField, pullBeforeHintPanel); GridBagLayout layout = (GridBagLayout) container.getLayout(); GridBagConstraints constraints = layout.getConstraints(pullBeforeHintPanel); constraints.insets = new Insets(0, isMac() ? 6 : isWindows() ? 2 : 0, 0, 0); layout.setConstraints(pullBeforeHintPanel, constraints); exportDirChooseButton.addActionListener(__ -> buildExportDirDialog().choose().ifPresent(file -> setExportDir(Paths.get(file.toURI()))) ); exportDirCleanButton.addActionListener(__ -> clearExportDir()); pemFileChooseButton.addActionListener(__ -> buildPemFileDialog().choose().ifPresent(file -> setPemFile(Paths.get(file.toURI()))) ); pemFileClearButton.addActionListener(__ -> clearPemFile()); startDatePicker.addDateChangeListener(event -> { endDatePicker.getSettings().setDateRangeLimits(event.getNewDate(), null); onSelectStartDateCallbacks.forEach(consumer -> consumer.accept(event.getNewDate())); }); endDatePicker.addDateChangeListener(event -> { startDatePicker.getSettings().setDateRangeLimits(null, event.getNewDate()); onSelectEndDateCallbacks.forEach(consumer -> consumer.accept(event.getNewDate())); }); pullBeforeField.addActionListener(__ -> triggerChangePullBefore()); pullBeforeOverrideField.addActionListener(__ -> triggerChangePullBeforeOverride()); overwriteExistingFilesCheckBox.addActionListener(__ -> triggerOverwriteExistingFiles()); }

Target:
protected ConfigurationPanelForm(ConfigurationPanelMode mode) { this.mode = mode; startDatePicker = createDatePicker(); endDatePicker = createDatePicker(); pullBeforeOverrideField = new JComboBox<>(PullBeforeOverrideOption.values()); pullBeforeOverrideField.setSelectedItem(INHERIT); $$$setupUI$$$(); startDatePicker.getSettings().setGapBeforeButtonPixels(0); startDatePicker.getComponentDateTextField().setPreferredSize(exportDirField.getPreferredSize()); startDatePicker.getComponentToggleCalendarButton().setPreferredSize(exportDirChooseButton.getPreferredSize()); endDatePicker.getSettings().setGapBeforeButtonPixels(0); endDatePicker.getComponentDateTextField().setPreferredSize(exportDirField.getPreferredSize()); endDatePicker.getComponentToggleCalendarButton().setPreferredSize(exportDirChooseButton.getPreferredSize()); pullBeforeHintPanel.setBackground(new Color(255, 255, 255, 0)); mode.decorate(pullBeforeField, pullBeforeOverrideLabel, pullBeforeOverrideField, pullBeforeHintPanel); GridBagLayout layout = (GridBagLayout) container.getLayout(); GridBagConstraints constraints = layout.getConstraints(pullBeforeHintPanel); constraints.insets = new Insets(0, isMac() ? 6 : isWindows() ? 2 : 0, 0, 0); layout.setConstraints(pullBeforeHintPanel, constraints); exportDirChooseButton.addActionListener(__ -> buildExportDirDialog().choose().ifPresent(file -> setExportDir(Paths.get(file.toURI()))) ); exportDirCleanButton.addActionListener(__ -> clearExportDir()); pemFileChooseButton.addActionListener(__ -> buildPemFileDialog().choose().ifPresent(file -> setPemFile(Paths.get(file.toURI()))) ); pemFileClearButton.addActionListener(__ -> clearPemFile()); startDatePicker.addDateChangeListener(event -> { endDatePicker.getSettings().setDateRangeLimits(event.getNewDate(), null); onSelectStartDateCallbacks.forEach(consumer -> consumer.accept(event.getNewDate())); }); endDatePicker.addDateChangeListener(event -> { startDatePicker.getSettings().setDateRangeLimits(null, event.getNewDate()); onSelectEndDateCallbacks.forEach(consumer -> consumer.accept(event.getNewDate())); }); pullBeforeField.addActionListener(__ -> triggerChangePullBefore()); pullBeforeOverrideField.addActionListener(__ -> triggerChangePullBeforeOverride()); overwriteFilesField.addActionListener(__ -> { if (!overwriteFilesField.isSelected() || confirmOverwriteFiles()) triggerOverwriteExistingFiles(); }); }