@Override
 public void reset() {
   dateBox.setValue(null);
   hours.setSelectedIndex(0);
   minutes.setSelectedIndex(0);
   seconds.setSelectedIndex(0);
   calendar = null;
 }
Пример #2
0
 public void setSelectedValue(final Object value, final boolean selected) {
   for (int i = 0; i < items.size(); i++) {
     if (value.equals(items.get(i).value)) {
       setSelectedIndex(i, selected);
       break;
     }
   }
 }
Пример #3
0
 public void setSelectedItem(final String item, final boolean selected) {
   for (int i = 0; i < items.size(); i++) {
     if (items.get(i).label.equals(item)) {
       setSelectedIndex(i, selected);
       break;
     }
   }
 }
Пример #4
0
  private void sendRemoveItemInstruction(final int index) {
    final Update update = new Update(getID());

    update.put(PROPERTY.ITEM_REMOVED);
    update.put(PROPERTY.INDEX, index);
    getUIContext().stackInstruction(update);

    if (selectedIndex >= index) setSelectedIndex((selectedIndex - 1));
  }
Пример #5
0
 public void setSelectedIndex(final int index) {
   setSelectedIndex(index, true);
 }