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.

40 lines
1.2 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.TextArea
  6. import scalafx.scene.paint.Paint
  7. object JFXTextArea {
  8. implicit def sfxTextArea2jfx(v: JFXTextArea): jfoenixc.JFXTextArea =
  9. if (v != null) v.delegate else null
  10. }
  11. // extends TextInputControl(delegate)
  12. // with SFXDelegate[jfoenixc.JFXTextArea]
  13. class JFXTextArea(
  14. override val delegate: jfoenixc.JFXTextArea = new jfoenixc.JFXTextArea()
  15. ) extends TextArea(delegate) {
  16. /**
  17. * Creates a TextArea with initial text content.
  18. *
  19. * @param text - A string for text content.
  20. */
  21. def this(text: String) = this(new jfoenixc.JFXTextArea(text))
  22. def labelFloat = delegate.labelFloatProperty()
  23. def labelFloat_=(v: Boolean) = delegate.setLabelFloat(v)
  24. def focusColor: Paint = delegate.getFocusColor()
  25. def focusColor_=(color: Paint) = delegate.setFocusColor(color)
  26. def unFocusColor = delegate.getUnFocusColor()
  27. def unFocusColor_=(color: Paint) = delegate.setUnFocusColor(color)
  28. def disableAnimation: BooleanProperty = delegate.disableAnimationProperty()
  29. def disableAnimation_=(disable: Boolean) =
  30. delegate.setDisableAnimation(disable)
  31. }