void (JCheckBox checkBox, ColorPanel colorPanel, boolean isEnabled, boolean isChecked, @Nullable Color color, boolean supportTransparency) { checkBox.setEnabled(isEnabled); checkBox.setSelected(isChecked); if (color != null) { colorPanel.setSelectedColor(color); } else { colorPanel.setSelectedColor(JBColor.WHITE); } colorPanel.setSupportTransparency(supportTransparency); colorPanel.setEnabled(isChecked); }