@Override public boolean isFirstId(Object itemId) { if (ordered) { return ((Container.Ordered) container).isFirstId(itemId); } return first != null && first.equals(itemId); }
/** * Tests if the Item corresponding to the given Item ID is the first Item in * the Container. * * @see Container.Ordered#isFirstId(java.lang.Object) */ @Override public boolean isFirstId(Object itemId) { return ((Container.Ordered) items).isFirstId(itemId); }
/** * Sets the previous value - if the current value is not the first available in the set. */ public void goBack() { Object currentItemId = combobox.getValue(); if (getContainerDataSource().isFirstId(currentItemId)) { return; } setValue(getContainerDataSource().prevItemId(currentItemId)); }