Package javax.swing.table

Examples of javax.swing.table.TableCellEditor


      this.attrModel = attrModel;
    }
   
    void setAttrTableModel(AttrTableModel value) {
      if (attrModel != value) {
        TableCellEditor editor = table.getCellEditor();
        if (editor != null) editor.cancelCellEditing();
        attrModel.removeAttrTableModelListener(this);
        attrModel = value;
        attrModel.addAttrTableModelListener(this);
        fireTableChanged();
      }
View Full Code Here


        public void ancestorMoved(AncestorEvent event) {}

        public void ancestorRemoved(AncestorEvent event) {
          if (mChannelTable.isEditing()) {
            TableCellEditor editor = mChannelTable.getCellEditor();
            if (editor != null) {
              editor.stopCellEditing();
            }
          }
        }
      });
       
View Full Code Here

     
      public void ancestorMoved(AncestorEvent event) {}

      public void ancestorRemoved(AncestorEvent event) {
        if (mVariableTable.isEditing()) {
          TableCellEditor editor = mVariableTable.getCellEditor();
          if (editor != null) {
            editor.stopCellEditing();
          }
        }
      }
    });
   
View Full Code Here

  }
 
  public void synchronizeDataPanel(){
    if (transformAvailable){
      for(int i=0; i<transformTables.size();i++){
        TableCellEditor tce=( ( (JTable)transformTables.get(i)).getCellEditor());
        if(tce!=null){
          tce.stopCellEditing();
        }
      } 
    }
  }
View Full Code Here

 
   
  public void synchronizeDataPanel(){
    super.synchronizeDataPanel();
    for (int i=0; i<propertyData.length; i++){
      TableCellEditor tce=propertiesTable[i].getCellEditor();
      if(tce!=null){
        tce.stopCellEditing();
      }
    }   
  }
View Full Code Here

  col.setCellRenderer(renderer);
  col.setResizable(false);

  // Setup  Media file column
  col = getColumn("Media");
  TableCellEditor cellEditor = new DefaultCellEditor(new JTextField());
  MediaFileCellEditorListener mcl =
      new MediaFileCellEditorListener();
  cellEditor.addCellEditorListener(mcl);
        col.setCellEditor(cellEditor);
  MediaFileCellRenderer m_renderer = new MediaFileCellRenderer();
  col.setCellRenderer(m_renderer);

  // Setup StartTime column
  col = getColumn("Start Time");
  cellEditor = new DefaultCellEditor(new JTextField());
  StartCellEditorListener scl = new StartCellEditorListener(this);
  cellEditor.addCellEditorListener(scl);
        col.setCellEditor(cellEditor);
        col.setResizable(false);
  col.setCellRenderer(renderer);

  // Setup PlayingTime column
  col = getColumn("Play Time");
  cellEditor = new DefaultCellEditor(new JTextField());
  PlayingTimeCellEditorListener dcl = new PlayingTimeCellEditorListener();
  cellEditor.addCellEditorListener(dcl);
        col.setCellEditor(cellEditor);
  col.setResizable(false);
  col.setCellRenderer(renderer);
    }
View Full Code Here

     * Our ASSUMPTION is that the cell editor is only requested
     * when it is about to be activated.
     */
    public TableCellEditor getCellEditor(int row, int col)
    {
      TableCellEditor cellEditor = super.getCellEditor(row, col);
      currentCellEditor = (DefaultCellEditor)cellEditor;
      return cellEditor;
    }
View Full Code Here

    myProject = project;
  }
 
    protected TableColumnExt newTableColumnExt(int modelIndex) {
      TableColumnExt result = new TableColumnExt(modelIndex);
      TableCellEditor defaultEditor = getTreeTable().getDefaultEditor(getTreeTableModel().getColumnClass(modelIndex));
      if (defaultEditor!=null) {
        result.setCellEditor(new TreeTableCellEditorImpl(defaultEditor));
      }
      return result;
    }
View Full Code Here

     */
    private 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) {
            tableModel.removeRow(rowSelected);
View Full Code Here

     * Stop any editing that is currently being done on the table. This will
     * save any changes that have already been made.
     */
    private void stopTableEditing() {
        if (table.isEditing()) {
            TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
            cellEditor.stopCellEditing();
        }
    }
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.