private void editPressed() {
   setPresentsDefaultValue(false);
   String value = list.getItem(list.getSelectionIndex());
   value = promptForText(local.getString("entNewVal"), value);
   if (value != null && isTextValid(value)) {
     list.setItem(list.getSelectionIndex(), value);
     selectionChanged();
   } else {
     showErrorMessage(local.getString("invalid") + value);
   }
 }
Example #2
0
 /**
  * Sets the text of the item in the receiver's list at the given zero-relative index to the string
  * argument. This is equivalent to <code>remove</code>'ing the old item at the index, and then
  * <code>add</code>'ing the new item at that index.
  *
  * @param index the index for the item
  * @param string the new text for the item
  * @exception IllegalArgumentException
  *     <ul>
  *       <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the
  *           list minus 1 (inclusive)
  *       <li>ERROR_NULL_ARGUMENT - if the string is null
  *     </ul>
  *
  * @exception SWTException
  *     <ul>
  *       <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  *       <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  *     </ul>
  */
 public void setItem(int index, String string) {
   checkWidget();
   list.setItem(index, string);
 }
 public void setItem(int index, Node node) {
   listIntermediary.setItem(index, getQualifiedName(node));
   //			nodes.put(index, node);
   nodes.set(index, node);
 }
 @Override
 protected void listSetItem(int index, String string) {
   list.setItem(index, string);
 }