Package javax.swing.table

Examples of javax.swing.table.TableCellEditor


    return (cellEditor != null);
  }

  public void editingStopped(final ChangeEvent e)
  {
    final TableCellEditor editor = getCellEditor();
    if (editor != null)
    {
      final Object value = editor.getCellEditorValue();
      final int index = getEditingColumn();
      columnModel.getColumn(index).setHeaderValue(value);

      removeEditor();
View Full Code Here


    return tableModel.createModel();
  }

  public void stopEditing()
  {
    final TableCellEditor cellEditor = getCellEditor();
    if (cellEditor != null)
    {
      cellEditor.stopCellEditing();
    }
  }
View Full Code Here

    if (super.performEdit() == false)
    {
      return null;
    }

    final TableCellEditor cellEditor = parameterMappingTable.getCellEditor();
    if (cellEditor != null)
    {
      cellEditor.stopCellEditing();
    }

    return new EditResult(parameterMappingTableModel.getMappings());
  }
View Full Code Here

    /**
     * Invoked when an action occurs.
     */
    public void actionPerformed(final ActionEvent e)
    {
      final TableCellEditor tableCellEditor = parameterMappingTable.getCellEditor();
      if (tableCellEditor != null)
      {
        tableCellEditor.stopCellEditing();
      }
      final int i = parameterMappingTable.getSelectedRow();
      if (i == -1)
      {
        return;
View Full Code Here

    /**
     * Invoked when an action occurs.
     */
    public void actionPerformed(final ActionEvent e)
    {
      final TableCellEditor tableCellEditor = parameterMappingTable.getCellEditor();
      if (tableCellEditor != null)
      {
        tableCellEditor.stopCellEditing();
      }
      final ParameterMappingTableModel tableModel = (ParameterMappingTableModel) parameterMappingTable.getModel();
      tableModel.addRow();
    }
View Full Code Here

    private class DeleteRowAction implements ActionListener {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (paramTable.isEditing()) {
                TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable
                        .getEditingColumn());
                cellEditor.cancelCellEditing();
            }

            int rowSelected = paramTable.getSelectedRow();
            if (rowSelected >= 0) {
                tableModel.removeRow(rowSelected);
View Full Code Here

    private class DeleteColumnAction implements ActionListener {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (paramTable.isEditing()) {
                TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable
                        .getEditingColumn());
                cellEditor.cancelCellEditing();
            }

            int colSelected = paramTable.getSelectedColumn();
            if (colSelected == 0 || colSelected == 1) {
                JOptionPane.showMessageDialog(null,
View Full Code Here

     */
    protected void deleteArgument() {
        // If a table cell is being edited, we must cancel the editing before
        // deleting the row
        if (table.isEditing()) {
            TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
            cellEditor.cancelCellEditing();
        }

        int rowSelected = table.getSelectedRow();

        if (rowSelected >= 0) {
View Full Code Here

     */
    private void cancelEditing() {
        // If a table cell is being edited, we must cancel the editing before
        // deleting the row
        if (table.isEditing()) {
            TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
            cellEditor.cancelCellEditing();
        }
    }
View Full Code Here

        if (action.equals(DELETE_COMMAND)) {
            if (tableModel.getRowCount() > 0) {
                // If a table cell is being edited, we must cancel the editing
                // before deleting the row.
                if (cookieTable.isEditing()) {
                    TableCellEditor cellEditor = cookieTable.getCellEditor(cookieTable.getEditingRow(),
                            cookieTable.getEditingColumn());
                    cellEditor.cancelCellEditing();
                }

                int rowSelected = cookieTable.getSelectedRow();

                if (rowSelected != -1) {
View Full Code Here

TOP

Related Classes of javax.swing.table.TableCellEditor

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.