Java 8 TableCellEditor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 TableCellEditor class.

This code example shows how to use the following methods:removeCellEditorListener, stopCellEditing
    invalidate();
  } 
 
  public boolean editCellAt(final int index, final EventObject e)
  { 
    if (cellEditor != null && !cellEditor.stopCellEditing())
    { 
      return false; 
    } 
    if (!isCellEditable(index))
    { 
      return false; 
    } 
    final TableCellEditor editor = getCellEditor(index);
 
    if (editor != null && editor.isCellEditable(e))
    { 
      editorComp = prepareEditor(editor, index);
      editorComp.setBounds(getHeaderRect(index));
      add(editorComp);

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
	 */ 
	public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
		if (table!=null&&lastTable!=null&&table!=lastTable){
			if(lastTable.isEditing()){
				TableCellEditor lastEditor=lastTable.getCellEditor();
				if (lastEditor!=null) lastEditor.stopCellEditing();
			} 
			lastTable.clearSelection();
		} 
		lastTable=table;
		 
		JComponent component=(JComponent)editor.getTableCellEditorComponent(table,value,isSelected,row,column);
		CellUtility.setAppearance(table,value,isSelected,true,row,column,component);
		 
		if (table instanceof SpreadSheet){
			final SpreadSheet spreadSheet=(SpreadSheet)table;
			JComponent edit = (component instanceof DateEditor.ExtDateField) ? ((DateEditor.ExtDateField)component).getTextField() : component;
			edit.getActionMap().put("cut",new AbstractAction(){
				public void actionPerformed(java.awt.event.ActionEvent e) {
					spreadSheet.prepareAction(MenuActionConstants.ACTION_CUT).actionPerformed(new ActionEvent(spreadSheet,e.getID(),e.getActionCommand()));
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
    } 
 
    public void stopEditing() { 
        TableCellEditor editor = tblTagEditor.getCellEditor();
        if (editor != null) {
            editor.stopCellEditing();
        } 
    } 
     
    public void setAutoCompletionList(AutoCompletionList autoCompletionList) {
        tblTagEditor.setAutoCompletionList(autoCompletionList);
    } 
 
    public void setAutoCompletionManager(AutoCompletionManager autocomplete) {
        tblTagEditor.setAutoCompletionManager(autocomplete);
    } 
 
    public void autoCompletionItemSelected(String item) {
        logger.info("autocompletion item selected ...");
        TagSpecificationAwareTagCellEditor editor = (TagSpecificationAwareTagCellEditor)tblTagEditor.getCellEditor();
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
 
	public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
		if (table!=null&&lastTable!=null&&table!=lastTable){
			if(lastTable.isEditing()){
				TableCellEditor lastEditor=lastTable.getCellEditor();
				if (lastEditor!=null) lastEditor.stopCellEditing();
			} 
			lastTable.clearSelection();
		} 
		lastTable=table;
		 
		 
//		JTextComponent textComponent=(JTextComponent)editor.getTableCellEditorComponent(table,value,isSelected,row,column); 
		component=NameCellComponent.getComponent(table,value,isSelected,true,row,column/*,textComponent*/);
		//textComponent.selectAll(); 
		return component;
	} 
	 
	 
	/** 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
        public Object getCellEditorValue() { 
            return editor.getCellEditorValue();
        } 
 
        public boolean stopCellEditing() { 
            return editor.stopCellEditing();
        } 
 
        public void cancelCellEditing() { 
            editor.cancelCellEditing();
        } 
 
        public boolean isCellEditable(EventObject anEvent) {
            selectEditor((MouseEvent) anEvent);
            return editor.isCellEditable(anEvent);
        } 
 
        public void addCellEditorListener(CellEditorListener l) {
            editor.addCellEditorListener(l);
        } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
                focused.addFocusListener(this);
            } else { 
                focused = null;
                TableCellEditor editor = table.getCellEditor();
                if (editor != null) {
                    editor.stopCellEditing();
                } 
            } 
        } 
    } 
 
    private Component focused;
    private JTable table;
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
	@Override 
	public boolean stopCellEditing() { 
		if (editor == null) {
			return true; 
		} 
		return editor.stopCellEditing();
	} 
 
	@Override 
	public void cancelCellEditing() { 
		if (editor == null) {
			return; 
		} 
		editor.cancelCellEditing();
	} 
 
	@Override 
	public boolean isCellEditable(EventObject eventObject) {
		if (!(eventObject instanceof MouseEvent)){
			return true; 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
      if( column > -1 )
      { 
         TableCellEditor editor = propertiesTable.getDefaultEditor( propertiesTable.getColumnClass(column));
         if( editor != null ) 
         { 
            editor.stopCellEditing();
         } 
      } 
       
      return result;       
   } 
 
    
   /** 
	 * A table model that is used to show the properties. The model links directly  
	 * to the underlying properties object. As changes are made in the table, the  
	 * corresponding changes are made in the properties object. The user can only  
	 * edit the value column in the table.  
	 */ 
	public class PropertiesModel extends AbstractTableModel
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
    } 
 
    public boolean stopCellEditing () 
    { 
        final TableCellEditor cellEditor = getCellEditor ();
        return cellEditor != null && cellEditor.stopCellEditing ();
    } 
 
    @Override 
    public boolean isCellEditable ( final int row, final int column )
    { 
        return editable && super.isCellEditable ( row, column );
    } 
 
    public boolean isEditable () 
    { 
        return editable;
    } 
 
    public void setEditable ( final boolean editable )
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopCellEditing
  public void stopEditing() 
  { 
    final TableCellEditor cellEditor = getCellEditor();
    if (cellEditor != null)
    { 
      cellEditor.stopCellEditing();
    } 
  } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 TableCellEditor Methods: