ExtendMode (int index) { ListPopupStep<Object> listStep = getListStep(); Object selectedValue = myListModel.getElementAt(index); if (selectedValue == null || !listStep.hasSubstep(selectedValue)) return ExtendMode.NO_EXTEND; return myShowSubmenuOnHover ? ExtendMode.EXTEND_ON_HOVER : ExtendMode.NO_EXTEND; }