void (@Nullable ListSelectionEvent event) { if (event != null) { PaletteItemsComponent sourceItemsComponent = (PaletteItemsComponent)event.getSource(); for (int i = event.getFirstIndex(); i <= event.getLastIndex(); i++) { if (sourceItemsComponent.isSelectedIndex(i)) { for (PaletteItemsComponent itemsComponent : myItemsComponents) { if (itemsComponent != sourceItemsComponent) { itemsComponent.clearSelection(); } } PaletteItem paletteItem = (PaletteItem)sourceItemsComponent.getSelectedValue(); if (paletteItem != null && !paletteItem.isEnabled()) { sourceItemsComponent.clearSelection(); } break; } } } if (myDesigner != null) { myDesigner.activatePaletteItem(getActiveItem()); } }