Ejemplo n.º 1
0
  @Override
  public void cancelEdit() {
    super.cancelEdit();

    setText((String) getItem());
    setContentDisplay(ContentDisplay.TEXT_ONLY);
  }
 @Override
 public void cancelEdit() {
   super.cancelEdit();
   setText(getString());
   setContentDisplay(ContentDisplay.TEXT_ONLY);
   // Once the edit has been cancelled we no longer need the text field
   // so we mark it for cleanup here. Note though that you have to handle
   // this situation in the focus listener which gets fired at the end
   // of the editing.
   textField = null;
 }
Ejemplo n.º 3
0
  private void updateEditing() {
    if (getIndex() == -1 || getTableView() == null) return;

    TablePosition editCell = getTableView().getEditingCell();
    boolean match = match(editCell);

    if (match && !isEditing()) {
      startEdit();
    } else if (!match && isEditing()) {
      // If my index is not the one being edited then I need to cancel
      // the edit. The tricky thing here is that as part of this call
      // I cannot end up calling list.edit(-1) the way that the standard
      // cancelEdit method would do. Yet, I need to call cancelEdit
      // so that subclasses which override cancelEdit can execute. So,
      // I have to use a kind of hacky flag workaround.
      updateEditingIndex = false;
      cancelEdit();
      updateEditingIndex = true;
    }
  }
Ejemplo n.º 4
0
 @Override
 public void cancelEdit() {
   super.cancelEdit();
   setText((String) getItem());
   setGraphic(null);
 }
Ejemplo n.º 5
0
 /** Cancels cell editing */
 @Override
 public void cancelEdit() {
   super.cancelEdit();
   setText(getString());
   setGraphic(null);
 }