You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
966 B

  1. package nova.monadic_sfx.implicits
  2. import com.jfoenix.{controls => jfoenixc}
  3. import javafx.scene.{control => jfxsc}
  4. import scalafx.Includes._
  5. import scalafx.beans.property.ReadOnlyObjectProperty
  6. import scalafx.delegate.SFXDelegate
  7. import scalafx.scene.control.IndexedCell
  8. import scalafx.scene.control.ListView
  9. object JFXListCell {
  10. implicit def sfxListCell2jfx[T](
  11. l: JFXListCell[T]
  12. ): jfoenixc.JFXListCell[T] =
  13. if (l != null) l.delegate else null
  14. }
  15. class JFXListCell[T](
  16. override val delegate: jfoenixc.JFXListCell[T] = new jfoenixc.JFXListCell[T]
  17. ) extends IndexedCell(delegate)
  18. with SFXDelegate[jfoenixc.JFXListCell[T]] {
  19. /**
  20. * The ListView associated with this Cell.
  21. */
  22. def listView: ReadOnlyObjectProperty[jfxsc.ListView[T]] =
  23. delegate.listViewProperty
  24. /**
  25. * Updates the ListView associated with this Cell.
  26. */
  27. def updateListView(listView: ListView[T]): Unit = {
  28. delegate.updateListView(listView)
  29. }
  30. }