package nova.monadic_sfx.util.controls import com.jfoenix.{controls => jfoenixc} import javafx.{scene => jfxs} import nova.monadic_sfx.implicits._ import scalafx.Includes._ import scalafx.beans.property.ObjectProperty import scalafx.scene.Node import scalafx.scene.control.Button import jfxs.{paint => jfxsp} object JFXButton { implicit def sfxButton2jfx(v: JFXButton): jfoenixc.JFXButton = if (v != null) v.delegate else null } class JFXButton( override val delegate: jfoenixc.JFXButton = new jfoenixc.JFXButton ) extends Button(delegate) { /** * Creates a button with the specified text as its label. */ def this(text: String) = this(new jfoenixc.JFXButton(text)) /** * Creates a button with the specified text and icon for its label. */ def this(text: String, graphic: Node) = this(new jfoenixc.JFXButton(text, graphic)) def ripplerFill: ObjectProperty[jfxsp.Paint] = delegate.ripplerFillProperty def ripplerFill_=(b: jfxsp.Paint): Unit = ripplerFill() = b def obsAction = new ActionObservableBuilder(this.observableAction) }