void (Object anItem) { if (anItem == null) { mySelectedItem = myNoFontItem; } else if (anItem instanceof String) { mySelectedItem = ContainerUtil.find(myItems, item -> item.isSelectable() && item.myFamilyName.equals(anItem)); if (mySelectedItem == null) { mySelectedItem = new MyWarningItem((String)anItem); } } else if (anItem instanceof MyFontItem) { mySelectedItem = (MyFontItem)anItem; } fireContentsChanged(this, -1, -1); }