Package javax.swing

Examples of javax.swing.CellEditor


    }
  }

  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

    @Override
    public void focusLost(FocusEvent e) {
        final int editingRow = table.getEditingRow();
        final int editingColumn = table.getEditingColumn();
        CellEditor ce = null;
        if (editingRow != -1 && editingColumn != -1){
            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

        DOMUtilInternal.removeAllChildren(cellElem); // Se quita el/los elemento/s editor/es, en teor�a se detectar� y autom�ticamente los dem�s listeners se quitan en el cliente
        if (children != null) cellElem.appendChild(children); // Restauramos el markup original antes de editar

        if (acceptNewValue)
        {
            CellEditor cellEditor = getCellEditor();
            Object value = cellEditor.getCellEditorValue();
            try
            {
                acceptNewValue(value);
            }
            finally
View Full Code Here

        if (!isEditingEnabled())
            return false; // Puede haber ya una sesi�n abierta que no quiere que la "molesten"

        finalizeEdition(false); // Terminar una posible sesi�n actualmente abierta

        CellEditor cellEditor = getCellEditor();
        return (cellEditor != null);
    }
View Full Code Here

  //editing for example
  public int[] finishCurrentOperations(){
    int[] rows=null;
    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

                deleteTags();
                break;
            }

            if (isEditing()) {
                CellEditor editor = getCellEditor();
                if (editor != null) {
                    editor.cancelCellEditing();
                }
            }

            if (model.getRowCount() == 0) {
                model.ensureOneTag();
View Full Code Here

            updateEnabledState();
        }

        @Override
        public void run() {
            CellEditor editor = getCellEditor();
            if (editor != null) {
                getCellEditor().stopCellEditing();
            }
            final int rowIdx = model.getRowCount()-1;
            String key = ((TagModel)model.getValueAt(rowIdx, 0)).getName();
View Full Code Here

   */
  public void changeSelection(int newRow, int newCol, boolean toggle, boolean extend)
  {
    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

Related Classes of javax.swing.CellEditor

Copyright © 2018 www.massapicom. 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.