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.

35 lines
1.1 KiB

  1. package nova.monadic_sfx.implicits
  2. import com.jfoenix.{controls => jfoenixc}
  3. import scalafx.Includes._
  4. import scalafx.beans.property.BooleanProperty
  5. import scalafx.scene.control.TextField
  6. import scalafx.scene.paint.Paint
  7. object JFXTextField {
  8. implicit def sfxTextField2jfx(v: JFXTextField): jfoenixc.JFXTextField =
  9. if (v != null) v.delegate else null
  10. }
  11. // TextInputControl(delegate)
  12. // with AlignmentDelegate[jfoenixc.JFXTextField]
  13. // with SFXDelegate[jfoenixc.JFXTextField] {
  14. class JFXTextField(
  15. override val delegate: jfoenixc.JFXTextField = new jfoenixc.JFXTextField
  16. ) extends TextField(delegate) {
  17. def labelFloat = delegate.labelFloatProperty()
  18. def labelFloat_=(v: Boolean) = delegate.setLabelFloat(v)
  19. def focusColor: Paint = delegate.getFocusColor()
  20. def focusColor_=(color: Paint) = delegate.setFocusColor(color)
  21. def unFocusColor = delegate.getUnFocusColor()
  22. def unFocusColor_=(color: Paint) = delegate.setUnFocusColor(color)
  23. def disableAnimation: BooleanProperty = delegate.disableAnimationProperty()
  24. def disableAnimation_=(disable: Boolean) =
  25. delegate.setDisableAnimation(disable)
  26. }