Scala Library
|
|
scala/swing/ListView.scala
]
object
Renderer
extends
AnyRefMethod Summary | |
def
|
apply
[A, B](f : (A) => B)(implicit renderer : Renderer[B]) : Renderer[A]
Returns a renderer for items of type
A . The given function
converts items of type A to items of type B
for which a renderer is implicitly given. This allows chaining of
renderers, e.g.:
case class Person(name: String, email: String)
val persons = List(Person("John", "[email protected]"), Person("Mary", "[email protected]"))
new ListView(persons) {
renderer = ListView.Renderer(_.name)
}
|
def
|
wrap [A](r : javax.swing.ListCellRenderer) : Renderer[A] |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
class
|
Wrapped
[A](val override peer : javax.swing.ListCellRenderer) extends Renderer[A]
Wrapper for
javax.swing.ListCellRenderer |
Method Details |
def
wrap[A](r : javax.swing.ListCellRenderer) : Renderer[A]
A
. The given function
converts items of type A
to items of type B
for which a renderer is implicitly given. This allows chaining of
renderers, e.g.:
case class Person(name: String, email: String)
val persons = List(Person("John", "[email protected]"), Person("Mary", "[email protected]"))
new ListView(persons) {
renderer = ListView.Renderer(_.name)
}
Scala Library
|
|