Package javax.swing

Examples of javax.swing.CellEditor.stopCellEditing()


  public void stopCellEditing() {
    // we need to stop the current editing before launching batch
    CellEditor cellEditor = getBatchViewerPanel().getTable()
        .getCellEditor();
    if (cellEditor != null) {
      cellEditor.stopCellEditing();
    }
  }

  // --------------------------------------------------------------------------
  // -------------------------------------------------------
View Full Code Here


  public void stopCellEditing() {
    // we need to stop the current editing before launching batch
    CellEditor cellEditor = getBatchViewerPanel().getTable()
        .getCellEditor();
    if (cellEditor != null) {
      cellEditor.stopCellEditing();
    }
  }

  // --------------------------------------------------------------------------
  // -------------------------------------------------------
View Full Code Here

    private static class StartEditingAction extends AbstractAction {
        public void actionPerformed(ActionEvent e) {
            JListMutable list = (JListMutable)e.getSource();
            if (!list.hasFocus()) {
                CellEditor cellEditor = list.getListCellEditor();
                if(cellEditor!=null && !cellEditor.stopCellEditing()) {
                    return;
                }
                list.requestFocus();
                return;
            }
View Full Code Here

      public void focusLost(FocusEvent e) {
        if (!e.isTemporary()) {
          JTable t = (JTable) e.getSource();
          CellEditor ce = t.getCellEditor();
          if (ce != null) {
            ce.stopCellEditing();
          }
        }
      }

      public void focusGained(FocusEvent e) {
View Full Code Here

            ce = table.getCellEditor(editingRow,editingColumn);
        }
        Component editor = table.getEditorComponent();
        if(ce != null && (editor == null || editor != e.getOppositeComponent()))
        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
View Full Code Here

            ce = table.getCellEditor(editingRow,editingColumn);
        }
        Component editor = table.getEditorComponent();
        if(ce != null && (editor == null || editor != e.getOppositeComponent()))
        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
View Full Code Here

  private static class StartEditingAction extends AbstractAction {
    public void actionPerformed(ActionEvent e) {
      JTable table = (JTable)e.getSource();
      if (!table.hasFocus()) {
        CellEditor cellEditor = table.getCellEditor();
        if (cellEditor != null && !cellEditor.stopCellEditing()) { return; }
        table.requestFocus();
        return;
      }
      ListSelectionModel rsm = table.getSelectionModel();
      int anchorRow = rsm.getAnchorSelectionIndex();
View Full Code Here

    if (isEditing()){
      lastEditingRow = getEditingRow();
      CellEditor editor=getCellEditor();
      if (editor!=null){
        rows=getSelectedRows();
        editor.stopCellEditing();//editor.cancelCellEditing();

      }
    }
    //System.out.println("finishCurrentOperations()="+rows);
    return rows;
View Full Code Here

    if (currentCol >= 0 && currentRow >= 0)
    {
      CellEditor cellEditor = getCellEditor(currentRow, currentCol);
      if (cellEditor != null)
      {
        cellEditor.stopCellEditing();
      }
    }

    // If the method is being called from inside the editCellAt method, fall back to the base implementation
    if (!performingEditCellAt)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.