CommonTextButtonBehavior
abstract class CommonTextButtonBehavior<in T : Button>(textMetrics: TextMetrics, defaultFont: Font? = null, insets: Insets = None, focusManager: FocusManager? = null) : CommonButtonBehavior<T> (source)
A Behavior<Button> that handles most of the commonly expected behavior of buttons with text. This makes it a good base for more complex behaviors.
Parameters
textMetrics
used for measuring the button's text
defaultFont
used for buttons without a Font
insets
that determine padding around text.
focusManager
used to request focus
Inheritors
Constructors
Link copied to clipboard
constructor(textMetrics: TextMetrics, defaultFont: Font? = null, insets: Insets = None, focusManager: FocusManager? = null)
Functions
Link copied to clipboard
fun iconPosition(button: Button, text: String = button.text, icon: Icon<Button>, stringPosition: Point = textPosition(button, text, icon), bounds: Rectangle = button.bounds.atOrigin): Point
fun iconPosition(button: Button, text: String = button.text, icon: Icon<Button>, textSpacing: TextSpacing = default, stringPosition: Point = textPosition(button, text, icon, textSpacing = textSpacing), bounds: Rectangle = button.bounds.atOrigin): Point
Link copied to clipboard
fun textPosition(button: Button, text: String = button.text, icon: Icon<Button>? = button.icon, bounds: Rectangle = button.bounds.atOrigin, textSpacing: TextSpacing = default): Point
Inherited functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard