コード例 #1
0
 @Override
 public void cancelCellEditing() {
   final ChangeEvent e = new ChangeEvent(this);
   for (final CellEditorListener listener : new ArrayList<>(myListeners)) {
     listener.editingCanceled(e);
   }
 }
コード例 #2
0
 protected void fireEditingStopped() {
   final CellEditorListener[] listeners = eventListenerList.getListeners(CellEditorListener.class);
   final ChangeEvent event = new ChangeEvent(this);
   for (int i = 0; i < listeners.length; i++) {
     final CellEditorListener listener = listeners[i];
     listener.editingStopped(event);
   }
 }
コード例 #3
0
 @Override
 public boolean stopCellEditing() {
   final ChangeEvent e = new ChangeEvent(this);
   for (final CellEditorListener listener : new ArrayList<>(myListeners)) {
     listener.editingStopped(e);
   }
   return true;
 }
コード例 #4
0
 /** DOCUMENT ME! */
 @Override
 public void cancelCellEditing() {
   for (int i = 0; i < listeners.size(); i++) {
     CellEditorListener l = (CellEditorListener) listeners.get(i);
     ChangeEvent evt = new ChangeEvent(this);
     l.editingCanceled(evt);
   }
 }
コード例 #5
0
 /**
  * Si cambiado es true, se avisa a los suscriptores de que se ha terminado la edición. Si es
  * false, se avisa de que se ha cancelado la edición.
  */
 protected void editado(boolean cambiado) {
   javax.swing.event.ChangeEvent evento = new javax.swing.event.ChangeEvent(this);
   int i;
   for (i = 0; i < suscriptores.size(); i++) {
     javax.swing.event.CellEditorListener aux =
         (javax.swing.event.CellEditorListener) suscriptores.get(i);
     if (cambiado) aux.editingStopped(evento);
     else aux.editingCanceled(evento);
   }
 }
コード例 #6
0
  /** Editing stopped */
  protected void fireEditingStopped() {
    if (editing && editingRow < table.getRowCount()) {
      ChangeEvent ce = new ChangeEvent(this);
      for (int i = 0; i < listeners.size(); i++) {
        CellEditorListener l = listeners.get(i);
        l.editingStopped(ce);
      }
    }

    editing = false;
  }
コード例 #7
0
 protected void fireEditingCanceled() {
   CellEditorListener listener;
   Object[] listeners = listenerList.getListenerList();
   for (int i = 0; i < listeners.length; i++) {
     // if (listeners == CellEditorListener.class) {
     if (listeners[i] == CellEditorListener.class) {
       listener = (CellEditorListener) listeners[i + 1];
       listener.editingCanceled(changeEvent);
     }
   }
 }
コード例 #8
0
  protected void fireEditingStopped() {
    System.out.println("fireEditingStopped called ");

    CellEditorListener listener;
    Object[] listeners = listenerList.getListenerList();
    for (int i = 0; i < listeners.length; i++) {
      if (listeners[i] == CellEditorListener.class) {
        listener = (CellEditorListener) listeners[i + 1];
        listener.editingStopped(changeEvent);
      }
    }
  }
コード例 #9
0
 protected void fireEditingStopped() {
   for (CellEditorListener l : listeners) {
     l.editingStopped(new ChangeEvent(this));
   }
 }