On Tue, 21 Dec 2021 02:00:32 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>>> After going on through the example, what I felt is "Adds to CellEditor the 
>>> extensions necessary to configure an editor in a tree" is little generic 
>>> description than the updated PR Definition.
>> 
>> The interface is generic, so the generic description fits well.
>> 
>> I still find the proposed version quite hard to parse. In my first comment, 
>> I suggested rephrasing the Javadoc to make it clearer and easier to 
>> understand.
>
>> No, they don't. At the same time `TableCellEditor` interface can't be used 
>> to return a cell editor for `JComboBox` and for `JTree` components. These 
>> components use `ComboBoxEditor` and `TreeCellEditor` correspondingly.
> 
> Right the TableCellEditor should not be used as a JComboBox/JTree editor, it 
> is only for JTable. But the objects implemented TableCellEditor interface can 
> be used to modify the values stored as the JComboBox/JTree when the user 
> edits the cell of the table. So the user selects the cell -> the 
> TableCellEditor is activated for editing that cell -> if the data for the 
> cell may be stored as a list then the JComboBox could be shown -> the user 
> may change/edit the current value of the cell using JComboBox and its values? 
> And the list of components in the spec is just an example of what components 
> can be used by the TableCellEditor.
> 
> At least this is how I read it, might be wrong.

I agree it probably referred to components which can be used as an editor. 
`DefaultEditorCell` supports three components: `JCheckBox`, `JComboBox`, and 
`JTextField`.

> But the objects implemented TableCellEditor interface can be used to modify 
> the values stored as the JComboBox/JTree when the user edits the cell of the 
> table.

And this just adds to the confusion rather than clarifies the purpose of the 
interface.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6608

Reply via email to