public TableCellEditor getCellEditor() { return tableColumn.getCellEditor(); }
@Override public boolean isCellEditable(final int rowIndex, final int columnIndex) { if (columnIndex >= columnList.size()) { return false; } final TableColumn column = columnList.get(columnIndex); return column.getCellEditor() != null; }
@Override public boolean isCellEditable(final int rowIndex, final int columnIndex) { if (columnIndex >= columnList.size()) { return false; } final TableColumn column = columnList.get(columnIndex); return column.getCellEditor() != null; }
@Override public boolean isCellEditable(final int rowIndex, final int columnIndex) { if (columnIndex >= columnList.size()) { return false; } final TableColumn column = columnList.get(columnIndex); return column.getCellEditor() != null; }
protected boolean allowCellEdit(int row, int column) { TableColumn tCol = getColumnModel().getColumn(column); return (editable && !isColumnReadOnly(tCol)) || tCol instanceof RadioServiceColumn || tCol.getCellEditor() instanceof InsettedTreeEditor; }
public void setEditable(boolean aValue) { editable = aValue; for (int column = 0; column < getColumnModel().getColumnCount(); column++) { TableColumn tCol = getColumnModel().getColumn(column); if (tCol.getCellEditor() instanceof InsettedTreeEditor<?>) { InsettedTreeEditor<?> ie = (InsettedTreeEditor<?>) tCol.getCellEditor(); ie.setEditable(editable); } } }
private void stopEditing() { // Stop whatever editing may be taking place int col_index = table.getEditingColumn(); if (col_index >= 0) { TableColumn col = table.getColumnModel().getColumn(col_index); col.getCellEditor().stopCellEditing(); } }
public TableCellEditor getCellEditor(int row, int column) { TableColumn tableColumn = getColumnModel().getColumn(column); TableCellEditor editor = tableColumn.getCellEditor(); if (editor == null) { Class c = getColumnClass(column); if( c.equals(Object.class) ) { Object o = getValueAt(row,column); if( o != null ) c = getValueAt(row,column).getClass(); } editor = getDefaultEditor(c); } return editor; }
public TableCellEditor getCellEditor(int row, int column) { TableColumn tableColumn = getColumnModel().getColumn(column); TableCellEditor editor = tableColumn.getCellEditor(); if (editor == null) { Class c = getColumnClass(column); if( c.equals(Object.class) ) { Object o = getValueAt(row,column); if( o != null ) c = getValueAt(row,column).getClass(); } editor = getDefaultEditor(c); } return editor; }
@Override public TableCellEditor getCellEditor(int row, int column) { TableColumn tableColumn = getColumnModel().getColumn(column); TableCellEditor editor = tableColumn.getCellEditor(); if (editor == null) { Class<?> c = getColumnClass(column); if (c.equals(Object.class)) { Object o = getValueAt(row, column); if (o != null) { c = getValueAt(row, column).getClass(); } } editor = getDefaultEditor(c); } return editor; }
@Override public TableCellEditor getCellEditor(int row, int column) { TableColumn tableColumn = getColumnModel().getColumn(column); TableCellEditor editor = tableColumn.getCellEditor(); if (editor == null) { Class<?> c = getColumnClass(column); if (c.equals(Object.class)) { Object o = getValueAt(row, column); if (o != null) { c = getValueAt(row, column).getClass(); } } editor = getDefaultEditor(c); } return editor; }
private void configureTreedView() { if (rowsModel instanceof ArrayTreedModel && columnModel.getColumnCount() > 0) { TableColumn tCol = columnModel.getColumn(0); tCol.setCellRenderer(new InsettedTreeRenderer<>(tCol.getCellRenderer(), new TreeColumnLeadingComponent<>(deepModel, false, closedFolderIcon, openFolderIcon, leafIcon))); tCol.setCellEditor(new InsettedTreeEditor<>(tCol.getCellEditor(), new TreeColumnLeadingComponent<>(deepModel, true, closedFolderIcon, openFolderIcon, leafIcon))); } }
public TreeTableCellEditor getCellEditor(int row, int column) { if (column >= 0 && column < getColumnModel().getColumnCount()) { TableCellEditor editor = getColumnModel() .getColumn(column).getCellEditor(); if (editor instanceof TreeTableCellEditor) return (TreeTableCellEditor)editor; return getDefaultEditor(getTreeColumnModel().getColumnClass( convertColumnIndexToModel(column)), column); } return getDefaultEditor(Object.class, column); }
/** * Refresh the list of ObjEntity targets. Also refresh the table in case some * ObjRelationships were deleted. */ private void reloadEntityList(EntityEvent e) { if (e.getSource() != this) { return; } // If current model added/removed, do nothing. ObjEntity entity = mediator.getCurrentObjEntity(); if (entity == e.getEntity() || entity == null) { return; } TableColumn col = table.getColumnModel().getColumn( ObjRelationshipTableModel.REL_TARGET); DefaultCellEditor editor = (DefaultCellEditor) col.getCellEditor(); JComboBox combo = (JComboBox) editor.getComponent(); combo.setRenderer(CellRenderers.entityListRendererWithIcons(entity.getDataMap())); ObjRelationshipTableModel model = (ObjRelationshipTableModel) table.getModel(); model.fireTableDataChanged(); }
/** * Updates TableColumn after updateUI changes. This implementation delegates * to the column if it is of type UIDependent, takes over to try an update * of the column's cellEditor, Cell-/HeaderRenderer otherwise. * * @param column the tableColumn to update. */ protected void updateColumnUI(TableColumn column) { if (column instanceof UIDependent) { ((UIDependent) column).updateUI(); } else { updateEditorUI(column.getCellEditor()); updateRendererUI(column.getCellRenderer()); updateRendererUI(column.getHeaderRenderer()); } }
/** * Updates TableColumn after updateUI changes. This implementation delegates * to the column if it is of type UIDependent, takes over to try an update * of the column's cellEditor, Cell-/HeaderRenderer otherwise. * * @param column the tableColumn to update. */ protected void updateColumnUI(TableColumn column) { if (column instanceof UIDependent) { ((UIDependent) column).updateUI(); } else { updateEditorUI(column.getCellEditor()); updateRendererUI(column.getCellRenderer()); updateRendererUI(column.getHeaderRenderer()); } }
/** * Updates TableColumn after updateUI changes. This implementation delegates * to the column if it is of type UIDependent, takes over to try an update * of the column's cellEditor, Cell-/HeaderRenderer otherwise. * * @param column the tableColumn to update. */ protected void updateColumnUI(TableColumn column) { if (column instanceof UIDependent) { ((UIDependent) column).updateUI(); } else { updateEditorUI(column.getCellEditor()); updateRendererUI(column.getCellRenderer()); updateRendererUI(column.getHeaderRenderer()); } }
/** * Updates TableColumn after updateUI changes. This implementation delegates * to the column if it is of type UIDependent, takes over to try an update * of the column's cellEditor, Cell-/HeaderRenderer otherwise. * * @param column the tableColumn to update. */ protected void updateColumnUI(TableColumn column) { if (column instanceof UIDependent) { ((UIDependent) column).updateUI(); } else { updateEditorUI(column.getCellEditor()); updateRendererUI(column.getCellRenderer()); updateRendererUI(column.getHeaderRenderer()); } }
/** * Updates TableColumn after updateUI changes. This implementation delegates * to the column if it is of type UIDependent, takes over to try an update * of the column's cellEditor, Cell-/HeaderRenderer otherwise. * * @param column the tableColumn to update. */ protected void updateColumnUI(TableColumn column) { if (column instanceof UIDependent) { ((UIDependent) column).updateUI(); } else { updateEditorUI(column.getCellEditor()); updateRendererUI(column.getCellRenderer()); updateRendererUI(column.getHeaderRenderer()); } }
public void copyValues(TableColumn base) { modelIndex = base.getModelIndex(); identifier = base.getIdentifier(); width = base.getWidth(); minWidth = base.getMinWidth(); setPreferredWidth(base.getPreferredWidth()); maxWidth = base.getMaxWidth(); headerRenderer = base.getHeaderRenderer(); headerValue = base.getHeaderValue(); cellRenderer = base.getCellRenderer(); cellEditor = base.getCellEditor(); isResizable = base.getResizable(); } }