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.
44 lines
1.1 KiB
44 lines
1.1 KiB
package nova.monadic_sfx.implicits
|
|
|
|
import javafx.{scene => jfxs}
|
|
import org.kordamp.ikonli.{javafx => ikonlifx}
|
|
import scalafx.scene.paint.Paint
|
|
import scalafx.scene.text.Text
|
|
|
|
object FontIcon {
|
|
implicit def sfxText2jfx(v: FontIcon): jfxs.text.Text =
|
|
if (v != null) v.delegate else null
|
|
|
|
}
|
|
|
|
// extends Shape(delegate)
|
|
// with PositionDelegate[ikonlifx.FontIcon]
|
|
// with SFXDelegate[ikonlifx.FontIcon]
|
|
|
|
class FontIcon(override val delegate: ikonlifx.FontIcon = new ikonlifx.FontIcon)
|
|
extends Text(delegate) {
|
|
|
|
// def iconCode_=(v: Ikon) = delegate.setIconCode(v)
|
|
|
|
def iconColor = delegate.getIconColor()
|
|
|
|
def iconColor_=(color: Paint) = delegate.setIconColor(color)
|
|
|
|
def iconSize = delegate.getIconSize()
|
|
|
|
def iconSize_=(size: Int) = delegate.setIconSize(size)
|
|
|
|
def iconLiteral = delegate.getIconLiteral()
|
|
|
|
def iconLiteral_=(literal: IconLiteral) =
|
|
delegate.setIconLiteral(literal.value)
|
|
|
|
def iconLiteral_=(literal: String) = delegate.setIconLiteral(literal)
|
|
|
|
}
|
|
|
|
sealed abstract class IconLiteral(val value: String)
|
|
object IconLiteral {
|
|
// fab-accusoft
|
|
case object Gmi10k extends IconLiteral("gmi-10k")
|
|
}
|