DefaultComponent

abstract class DefaultComponent(componentMetadata: ComponentMetadata, renderer: ComponentRenderingStrategy<out Component>, uiEventProcessor: DefaultUIEventProcessor, movable: Movable) : InternalComponent, ComponentEventSource, Movable, UIEventProcessor

Types

Companion
Link copied to clipboard
common
object Companion
ComponentStateKey
Link copied to clipboard
common
data class ComponentStateKey(oldState: ComponentState, isFocused: Boolean, eventType: DefaultComponent.EventType)
EventType
Link copied to clipboard
common
enum EventType : Enum<DefaultComponent.EventType>

Functions

acceptsFocus
Link copied to clipboard
common
open override fun acceptsFocus(): Boolean
Tells whether this Focusable accepts focus right now.
activated
Link copied to clipboard
common
open override fun activated(): UIEventResponse
The component was activated (mouse click or spacebar press typically).
asInternalComponent
Link copied to clipboard
common
open override fun asInternalComponent(): InternalComponent
Returns this Component as an InternalComponent which represents the internal API of Component.
clearCustomStyle
Link copied to clipboard
common
open override fun clearCustomStyle()
Clears any custom componentStyleSet (if present).
clearFocus
Link copied to clipboard
common
override fun clearFocus()
Clears focus from this Focusable.
close
Link copied to clipboard
common
open override fun close()
containsBoundable
Link copied to clipboard
common
open infix override fun containsBoundable(boundable: Boundable): Boolean
containsPosition
Link copied to clipboard
common
open infix override fun containsPosition(position: Position): Boolean
convertColorTheme
Link copied to clipboard
common
abstract fun convertColorTheme(colorTheme: ColorTheme): ComponentStyleSet
Converts the given ColorTheme to the equivalent ComponentStyleSet representation.
deactivated
Link copied to clipboard
common
open override fun deactivated(): UIEventResponse
The component was deactivated (mouse release or spacebar release typically).
equals
Link copied to clipboard
common
operator override fun equals(other: Any?): Boolean
focusGiven
Link copied to clipboard
common
open override fun focusGiven(): UIEventResponse
Focus was given to the component.
focusTaken
Link copied to clipboard
common
open override fun focusTaken(): UIEventResponse
Focus was taken away from the component.
handleComponentEvents
Link copied to clipboard
common
open override fun handleComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> UIEventResponse): Subscription
handleKeyboardEvents
Link copied to clipboard
common
open override fun handleKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
handleMouseEvents
Link copied to clipboard
common
open override fun handleMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
hashCode
Link copied to clipboard
common
override fun hashCode(): Int
intersects
Link copied to clipboard
common
open infix override fun intersects(boundable: Boundable): Boolean
keyPressed
Link copied to clipboard
common
open fun keyPressed(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
keyReleased
Link copied to clipboard
common
open fun keyReleased(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
keyTyped
Link copied to clipboard
common
open fun keyTyped(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
mouseClicked
Link copied to clipboard
common
open fun mouseClicked(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseDragged
Link copied to clipboard
common
open fun mouseDragged(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseEntered
Link copied to clipboard
common
open override fun mouseEntered(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseExited
Link copied to clipboard
common
open override fun mouseExited(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseMoved
Link copied to clipboard
common
open fun mouseMoved(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mousePressed
Link copied to clipboard
common
open fun mousePressed(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseReleased
Link copied to clipboard
common
open override fun mouseReleased(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseWheelRotatedDown
Link copied to clipboard
common
open fun mouseWheelRotatedDown(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseWheelRotatedUp
Link copied to clipboard
common
open fun mouseWheelRotatedUp(event: MouseEvent, phase: UIEventPhase): UIEventResponse
moveBy
Link copied to clipboard
common
open override fun moveBy(position: Position): Boolean
Moves this Movable relative to its current position by the given position.
moveDownBy
Link copied to clipboard
common
open override fun moveDownBy(delta: Int): Boolean
moveLeftBy
Link copied to clipboard
common
open override fun moveLeftBy(delta: Int): Boolean
moveRightBy
Link copied to clipboard
common
open override fun moveRightBy(delta: Int): Boolean
moveTo
Link copied to clipboard
common
open override fun moveTo(position: Position): Boolean
Sets the position of this Movable.
moveUpBy
Link copied to clipboard
common
open override fun moveUpBy(delta: Int): Boolean
onActivated
Link copied to clipboard
common
override fun onActivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is activated.
onDeactivated
Link copied to clipboard
common
override fun onDeactivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is deactivated.
onFocusGiven
Link copied to clipboard
common
override fun onFocusGiven(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component gains focus.
onFocusTaken
Link copied to clipboard
common
override fun onFocusTaken(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component loses focus.
process
Link copied to clipboard
common
open override fun process(event: UIEvent, phase: UIEventPhase): UIEventResponse
processComponentEvents
Link copied to clipboard
common
open override fun processComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> Unit): Subscription
processKeyboardEvents
Link copied to clipboard
common
open override fun processKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> Unit): Subscription
processMouseEvents
Link copied to clipboard
common
open override fun processMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> Unit): Subscription
render
Link copied to clipboard
common
open override fun render(graphics: TileGraphics)
Renders this Renderable onto the given TileGraphics object.
requestFocus
Link copied to clipboard
common
override fun requestFocus(): Boolean
Requests focus for this Focusable.
resetState
Link copied to clipboard
common
open override fun resetState()
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

absolutePosition
Link copied to clipboard
common
override val absolutePosition: Position
The absolute position of this Component, eg: the Position relative to the top left corner of the grid it is displayed on.
children
Link copied to clipboard
common
open override val children: ObservableList<InternalComponent>
The immediate child Components of this Component.
closed
Link copied to clipboard
common
open override val closed: Boolean
closedValue
Link copied to clipboard
common
open override val closedValue: ObservableValue<Boolean>
componentState
Link copied to clipboard
common
override var componentState: ComponentState
componentStateValue
Link copied to clipboard
common
override val componentStateValue: Property<ComponentState>
componentStyleSet
Link copied to clipboard
common
override var componentStyleSet: ComponentStyleSet
componentStyleSetProperty
Link copied to clipboard
common
override val componentStyleSetProperty: Property<ComponentStyleSet>
contentOffset
Link copied to clipboard
common
override val contentOffset: Position
The position of the top left corner of the content area (where the component is rendered without the decorations) relative to the top left corner of this Component.
contentSize
Link copied to clipboard
common
override val contentSize: Size
The Size of the content of this Component.
currentStyle
Link copied to clipboard
common
open val currentStyle: StyleSet
The current style based on componentStyleSet according to the current componentState.
disabledProperty
Link copied to clipboard
common
override val disabledProperty: Property<Boolean>
hasFocus
Link copied to clipboard
common
override val hasFocus: Boolean
Tells whether this Focusable has focus or not.
hasFocusValue
Link copied to clipboard
common
override val hasFocusValue: Property<Boolean>
hasParent
Link copied to clipboard
common
override val hasParent: ObservableValue<Boolean>
height
Link copied to clipboard
common
open override val height: Int
hiddenProperty
Link copied to clipboard
common
override val hiddenProperty: Property<Boolean>
id
Link copied to clipboard
common
override val id: UUID
isAttached
Link copied to clipboard
common
open val isAttached: Boolean
isAttachedToRoot
Link copied to clipboard
common
open val isAttachedToRoot: Boolean
isClosed
Link copied to clipboard
common
open override val isClosed: ObservableValue<Boolean>
isDisabled
Link copied to clipboard
common
override var isDisabled: Boolean
isHidden
Link copied to clipboard
common
override var isHidden: Boolean
parent
Link copied to clipboard
common
override var parent: Maybe<InternalContainer>
parentProperty
Link copied to clipboard
common
override val parentProperty: Property<Maybe<InternalContainer>>
position
Link copied to clipboard
common
open override val position: Position
rect
Link copied to clipboard
common
open override val rect: Rect
rectValue
Link copied to clipboard
common
open override val rectValue: ObservableValue<Rect>
relativeBounds
Link copied to clipboard
common
override val relativeBounds: Rect
The bounds of this Component relative to its parent.
relativePosition
Link copied to clipboard
common
override var relativePosition: Position
The relative position is the position of the top left corner of this Component relative to the contentOffset of its parent.
root
Link copied to clipboard
common
override var root: Maybe<RootContainer>
rootValue
Link copied to clipboard
common
override val rootValue: Property<Maybe<RootContainer>>
size
Link copied to clipboard
common
open override val size: Size
theme
Link copied to clipboard
common
override var theme: ColorTheme
The (mutable) ColorTheme.
themeProperty
Link copied to clipboard
common
override val themeProperty: Property<ColorTheme>
A Property that wraps the theme and offers data binding and observability features.
tileset
Link copied to clipboard
common
open override var tileset: TilesetResource
tilesetProperty
Link copied to clipboard
common
override val tilesetProperty: Property<TilesetResource>
updateOnAttach
Link copied to clipboard
common
override val updateOnAttach: Boolean
Tells whether the Component's observable properties should be updated from the parent when the component is attached.
width
Link copied to clipboard
common
open override val width: Int
x
Link copied to clipboard
common
open override val x: Int
y
Link copied to clipboard
common
open override val y: Int

Inheritors

BaseNumberInput
Link copied to clipboard
BaseScrollBar
Link copied to clipboard
BaseSlider
Link copied to clipboard
DefaultButton
Link copied to clipboard
DefaultCheckBox
Link copied to clipboard
DefaultContainer
Link copied to clipboard
DefaultHeader
Link copied to clipboard
DefaultIcon
Link copied to clipboard
DefaultLabel
Link copied to clipboard
DefaultListItem
Link copied to clipboard
DefaultParagraph
Link copied to clipboard
DefaultProgressBar
Link copied to clipboard
DefaultRadioButton
Link copied to clipboard
DefaultTextArea
Link copied to clipboard
DefaultToggleButton
Link copied to clipboard

Sources

(source)
Link copied to clipboard