@Override public TableCellEditor getCellEditor(int row, int column) { MyTableModel model = (MyTableModel) getModel(); if (column == 0) { return null; } // code repetition with getCellRenderer because of TableCell{Renderer, Editor} // non-inheritance Class<?> klass = model.getClassAt(row, column); PropertyEditorTableAdapter javaBeansEditor = PropertyEditorTableAdapter.forClass(klass); if (javaBeansEditor != null) { return javaBeansEditor; } TableCellEditor defaultEditor = getDefaultEditor(klass); if (defaultEditor == null) { log.warning("No TableCellEditor for " + klass.getName()); } if (defaultEditor instanceof DefaultCellEditor) { // default double-click is bad user interaction ((DefaultCellEditor) defaultEditor).setClickCountToStart(0); } return defaultEditor; }
public static <T extends Enum<T>> String getPropertyID(T algo) { Class<T> clazz = algo.getDeclaringClass(); return "net.java.sip.communicator." + clazz.getName().replace('$', '_'); }