void (final int index) { if (isNodePopupActive()) { cancelPopup(); if (myModel.getSelectedIndex() == index) { return; } } final Object object = myModel.getElement(index); final List<Object> objects = myModel.getChildren(object); if (!objects.isEmpty()) { final Object[] siblings = new Object[objects.size()]; for (int i = 0; i < objects.size(); i++) { siblings[i] = objects.get(i); } final NavBarItem item = getItem(index); if (item != null) { final int selectedIndex = index < myModel.size() - 1 ? objects.indexOf(myModel.getElement(index + 1)) : 0; myNodePopup = new NavBarPopup(this, index, siblings, index, selectedIndex); myModel.setSelectedIndex(index); myNodePopup.show(item); item.update(); } } }