ThreadSafeTileGrid

class ThreadSafeTileGrid(initialTileset: TilesetResource, initialSize: Size, layerable: InternalLayerable, animationHandler: InternalAnimationRunner, cursorHandler: InternalCursorHandler, eventProcessor: UIEventProcessor) : InternalTileGrid, ShutdownHook, UIEventProcessor, ViewContainer

Functions

addLayer
Link copied to clipboard
common
open override fun addLayer(layer: Layer): LayerHandle
applyStyle
Link copied to clipboard
common
open override fun applyStyle(styleSet: StyleSet)
Applies the given styleSet to all currently present Tiles in this TileGraphics.
clear
Link copied to clipboard
common
open override fun clear()
close
Link copied to clipboard
common
open override fun close()
Closes this Closeable.
delegateTo
Link copied to clipboard
common
open override fun delegateTo(tileGrid: InternalTileGrid)
Starts delegating all actions to the given tileGrid.
dock
Link copied to clipboard
common
open override fun dock(view: View)
draw
Link copied to clipboard
common
open override fun draw(tileMap: Map<Position, Tile>)
Same as draw with 3 parameters, with the difference that size will be used for drawArea, and Position.zero as drawPosition
open override fun draw(tileComposite: TileComposite)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
open override fun draw(tileMap: Map<Position, Tile>, drawPosition: Position)
Same as draw with 3 parameters, with the difference that size will be used for drawArea.
open override fun draw(tile: Tile, drawPosition: Position)
Draws the given Tile on this TileGraphics at the given drawPosition.
open override fun draw(tileComposite: TileComposite, drawPosition: Position)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
open override fun draw(tileMap: Map<Position, Tile>, drawPosition: Position, drawArea: Size)
Draws the given tileMap onto this TileGraphics.
open override fun draw(tileComposite: TileComposite, drawPosition: Position, drawArea: Size)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
fill
Link copied to clipboard
common
open override fun fill(filler: Tile)
Fills the empty parts of this TileGraphics with the given filler.
getLayerAt
Link copied to clipboard
common
open override fun getLayerAt(level: Int): Maybe<LayerHandle>
getTileAt
Link copied to clipboard
common
open override fun getTileAt(position: Position): Maybe<Tile>
Returns the Tile stored at a particular position in this TileComposite.
getTileAtOrNull
Link copied to clipboard
common
open fun getTileAtOrNull(position: Position): Tile?
Returns the Tile stored at a particular position or null if there is no such Tile.
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
open fun hashCode(): Int
insertLayerAt
Link copied to clipboard
common
open override fun insertLayerAt(level: Int, layer: Layer): LayerHandle
moveCursorBackward
Link copied to clipboard
common
open override fun moveCursorBackward()
Moves the cursor one Position to the left.
moveCursorForward
Link copied to clipboard
common
open override fun moveCursorForward()
Moves the cursor one Position to the right.
onShutdown
Link copied to clipboard
common
open override fun onShutdown(listener: () -> Unit)
process
Link copied to clipboard
common
open override fun process(event: UIEvent, phase: UIEventPhase): UIEventResponse
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
putTile
Link copied to clipboard
common
open override fun putTile(tile: Tile)
Adds the tile at the current cursor location.
removeLayer
Link copied to clipboard
common
open override fun removeLayer(layer: Layer): Boolean
reset
Link copied to clipboard
common
open override fun reset()
Stops delegating actions to an other TileGrid.
setLayerAt
Link copied to clipboard
common
open override fun setLayerAt(level: Int, layer: Layer): LayerHandle
start
Link copied to clipboard
common
open override fun start(animation: Animation): AnimationHandle
stop
Link copied to clipboard
common
open override fun stop(animation: InternalAnimation)
Stops the given InternalAnimation.
toString
Link copied to clipboard
common
open fun toString(): String
transform
Link copied to clipboard
common
open override fun transform(transformer: (Position, Tile) -> Tile)
Transforms all of the Tiles in this TileGraphics with the given transformer and overwrites them with the results of calling transformer.
updateAnimations
Link copied to clipboard
common
open override fun updateAnimations(currentTimeMs: Long, layerable: Layerable)
Updates the Animations this AnimationRunner has with the given currentTimeMs using the given layerable.

Properties

animationHandler
Link copied to clipboard
common
open override var animationHandler: InternalAnimationRunner
The InternalAnimationRunner this InternalTileGrid currently uses.
backend
Link copied to clipboard
common
open override var backend: Layer
The base layer of this InternalTileGrid (at index 0).
closed
Link copied to clipboard
common
open override val closed: Boolean
closedValue
Link copied to clipboard
common
open override val closedValue: ObservableValue<Boolean>
cursorHandler
Link copied to clipboard
common
open override var cursorHandler: InternalCursorHandler
The InternalCursorHandler this InternalTileGrid currently uses.
cursorPosition
Link copied to clipboard
common
open override var cursorPosition: Position
Returns the position of the cursor.
height
Link copied to clipboard
common
open override val height: Int
heightInPixels
Link copied to clipboard
common
open val heightInPixels: Int
isClosed
Link copied to clipboard
common
open override val isClosed: Property<Boolean>
isCursorAtTheEndOfTheLine
Link copied to clipboard
common
open override val isCursorAtTheEndOfTheLine: Boolean
Tells whether the cursor is at the end of the line.
isCursorAtTheFirstRow
Link copied to clipboard
common
open override val isCursorAtTheFirstRow: Boolean
Tells whether the cursor is at the first (index 0) row.
isCursorAtTheLastRow
Link copied to clipboard
common
open override val isCursorAtTheLastRow: Boolean
Tells whether the cursor is at the last row.
isCursorAtTheStartOfTheLine
Link copied to clipboard
common
open override val isCursorAtTheStartOfTheLine: Boolean
Tells whether the cursor is at the start of the line.
isCursorVisible
Link copied to clipboard
common
open override var isCursorVisible: Boolean
Tells whether the cursor is visible.
layerable
Link copied to clipboard
common
open override var layerable: InternalLayerable
The Layerable this InternalTileGrid currently uses.
layers
Link copied to clipboard
common
open override val layers: ObservableList<out InternalLayer>
renderables
Link copied to clipboard
common
open override val renderables: List<Renderable>
Contains the Renderable objects ordered from bottom to top.
size
Link copied to clipboard
common
open override val size: Size
tiles
Link copied to clipboard
common
open override val tiles: Map<Position, Tile>
The Tiles this TileComposite contains.
tileset
Link copied to clipboard
common
open override var tileset: TilesetResource
The (mutable) tileset value.
tilesetProperty
Link copied to clipboard
common
open override val tilesetProperty: Property<TilesetResource>
A Property that wraps the tileset and offers data binding and observability features.
width
Link copied to clipboard
common
open override val width: Int
widthInPixels
Link copied to clipboard
common
open val widthInPixels: Int

Sources

(source)
Link copied to clipboard