AbstractButton
classin packageklyn.gui.windows
public abstract class AbstractButton extends Widget:
└ AbstractButton

Shared state for clickable buttons.

button = Button("Save")
button.clicked += lambda(e: ActionEvent): print("save")
button.click()
Fields
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.
Attributes inherited from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Properties
Modifier and Type Member Description
public property icon
icon as Icon
No summary.
public property isDefaultButton
isDefaultButton as Boolean
No summary.
public property isPressed
isPressed as Boolean
No summary.
public property text
text as String
No summary.
Properties inherited from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
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.
Methods inherited from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds