AbstractButton
class in package klyn.gui.windows

    public abstract class AbstractButton extends Widget:

Widget
└ AbstractButton

Shared state for clickable buttons.

    button = Button("Save")
    button.clicked += lambda(e: ActionEvent): print("save")
    button.click()

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | icon `icon as Icon` | Optional image displayed before the button text.
public property | isDefaultButton `isDefaultButton as Boolean` | No summary.
public property | isPressed `isPressed as Boolean` | No summary.
public property | text `text as String` | No summary.

Inherited Properties
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Events

Modifier and Type | Member | Description
--- | --- | ---
public event | clicked `clicked as ActionEvent` | Action event emitted after the button is activated.
public event | pressed `pressed as ActionEvent` | Action event emitted when the button enters pressed state.
public event | released `released as ActionEvent` | Action event emitted when the button leaves pressed state.

Inherited Events
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | AbstractButton `AbstractButton(text as String = ""):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | click `click() as Void:` | Dispatches the button action.
public | performClick `performClick() as Void:` | Semantic alias of `click`.
public | press `press() as Boolean:` | Marks the button as pressed.
public | release `release(triggerAction as Boolean = true) as Void:` | Releases the button and optionally dispatches the action.

Inherited Methods
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds