As discussed here, Outline
requires your implementation of the RowModel
interface, which should be passed to your OutlineModel
constructor.
class MyRowModel implements RowModel {…}
TreeModel myModel = new MyTreeModel(…);
OutlineModel outlineModel = DefaultOutlineModel.createOutlineModel(
myModel, new MyRowModel(), …);
Outline outline = new Outline();
outline.setModel(outlineModel);
In your implementation of RowModel
, follow the familiar JTable
edit/render scheme for a model value of type Boolean
:
The getColumnClass()
implementation should return Boolean.class
for the relevant column.
The isCellEditable()
implementation should return true
for the relevant column.
The getColumnClass()
implementation should return the value from the given node in myModel
.
The setValueFor()
implementation should update the given node, so the renderer will see the new value when editing concludes.
