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.
45 lines
1.1 KiB
45 lines
1.1 KiB
package nova.monadic_sfx.implicits
|
|
|
|
import com.jfoenix.{controls => jfoenixc}
|
|
import javafx.{scene => jfxs}
|
|
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
|
|
}
|
|
|
|
// extends ButtonBase(delegate)
|
|
// with SFXDelegate[jfoenixc.JFXButton]
|
|
|
|
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] =
|
|
jfxObjectProperty2sfx(delegate.ripplerFillProperty)
|
|
|
|
def ripplerFill_=(b: jfxsp.Paint): Unit = {
|
|
ripplerFill() = b
|
|
}
|
|
|
|
def obsAction =
|
|
new ActionObservableBuilder(this.observableAction())
|
|
|
|
}
|