void () { boolean archetypesEnabled = myUseArchetypeCheckBox.isSelected(); myAddArchetypeButton.setEnabled(archetypesEnabled); myArchetypesTree.setEnabled(archetypesEnabled); myArchetypesTree.setBackground(archetypesEnabled ? UIUtil.getListBackground() : UIUtil.getPanelBackground()); }