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.

42 lines
1.1 KiB

  1. package nova.monadic_sfx.implicits
  2. import com.jfoenix.{controls => jfoenixc}
  3. import javafx.{scene => jfxs}
  4. import scalafx.Includes._
  5. import scalafx.beans.property.ObjectProperty
  6. import scalafx.scene.Node
  7. import scalafx.scene.control.Button
  8. import jfxs.{paint => jfxsp}
  9. object JFXButton {
  10. implicit def sfxButton2jfx(v: JFXButton): jfoenixc.JFXButton =
  11. if (v != null) v.delegate else null
  12. }
  13. // extends ButtonBase(delegate)
  14. // with SFXDelegate[jfoenixc.JFXButton]
  15. class JFXButton(
  16. override val delegate: jfoenixc.JFXButton = new jfoenixc.JFXButton
  17. ) extends Button(delegate) {
  18. /**
  19. * Creates a button with the specified text as its label.
  20. */
  21. def this(text: String) = this(new jfoenixc.JFXButton(text))
  22. /**
  23. * Creates a button with the specified text and icon for its label.
  24. */
  25. def this(text: String, graphic: Node) =
  26. this(new jfoenixc.JFXButton(text, graphic))
  27. def ripplerFill: ObjectProperty[jfxsp.Paint] =
  28. jfxObjectProperty2sfx(delegate.ripplerFillProperty)
  29. def ripplerFill_=(b: jfxsp.Paint): Unit = {
  30. ripplerFill() = b
  31. }
  32. }