/** Implements the <code>TableCellEditor</code> interface. */ @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { delegate.setValue(value); return new JScrollPane(editorComponent); }
/** Implements the <code>TreeCellEditor</code> interface. */ @Override public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { String stringValue = tree.convertValueToText(value, isSelected, expanded, leaf, row, false); delegate.setValue(stringValue); return new JScrollPane(editorComponent); }