Wrapper for javax.swing.tree.TreeCellEditor
Returns an editor for items of type A
.
Returns an editor for items of type A
. The given function
converts items of type A
to items of type B
for which an editor is implicitly given. This allows chaining of
editors, e.g.:
case class Person(name: String, subordinates: List[Person])
val persons = Person("John", List(Person("Jack", Nil), Person("Jill", List(Person("Betty", Nil)))))
val tree = new Tree[Person](persons, _.subordinates) {
editor = Editor(_.name, s => Person(s, Nil))
}