public boolean isSelected() { final NavBarModel model = myPanel.getModel(); return isPopupElement ? myPanel.isSelectedInPopup(myObject) : model.getSelectedIndex() == myIndex; }