KeyValueTable

class KeyValueTable<K, V>(model: KeyValueModel<K, V>, keyColumn: ColumnInfo<K, V, K>, valueColumn: ColumnInfo<K, V, V>, selectionModel: SelectionModel<Int>? = null, scrollCache: Int = 0) : Table<Pair<K, V>, KeyValueModel<K, V>> (source)

A visual component that renders an immutable list of key (K) - value (V) pairs using a TableBehavior. Items are obtained via the model and selection is managed via the optional selectionModel. Large ("infinite") lists are supported efficiently, since Table recycles the Views generated to render its items.

Note that this class assumes the given SimpleKeyValueModel is immutable and will not automatically respond to changes in the model.

KeyValueTable provides vertical scrolling internally, so it does not need to be embedded in a ScrollPanel or similar component, unless horizontal scrolling is desired.

Parameters

model

that holds the data for the table

keyColumn

defines the key (K) column's properties

valueColumn

defines the value (V) column's properties

selectionModel

that manages the Table's selection state

scrollCache

determining how many "hidden" items are rendered above and below the Table's view-port. A value of 0 means only visible items are rendered, but quick scrolling is more likely to show blank areas.

Constructors

Link copied to clipboard
constructor(model: KeyValueModel<K, V>, keyColumn: ColumnInfo<K, V, K>, valueColumn: ColumnInfo<K, V, V>, selectionModel: SelectionModel<Int>? = null, scrollCache: Int = 0)

Types

Link copied to clipboard
object Companion

Inherited properties

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
override var bounds: Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open val children: ObservableList<View>
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
val displayChange: BooleanObservers
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val displayRectHandlingChanged: BooleanObservers
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val enabledChanged: BooleanObservers
Link copied to clipboard
protected open val factory: ColumnFactory<Pair<K, V>>
Link copied to clipboard
Link copied to clipboard
open override val firstSelectable: Int?
Link copied to clipboard
open override val firstSelection: Int?
Link copied to clipboard
val focusabilityChanged: BooleanObservers
Link copied to clipboard
open var focusable: Boolean
Link copied to clipboard
val focusChanged: BooleanObservers
Link copied to clipboard
protected val focusCycleRoot: View?
Link copied to clipboard
Link copied to clipboard
var font: Font?
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
override var height: Double
Link copied to clipboard
override var idealSize: Size?
Link copied to clipboard
open override var insets: Insets
Link copied to clipboard
Link copied to clipboard
protected open var isFocusCycleRoot: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val lastSelectable: Int?
Link copied to clipboard
open override val lastSelection: Int?
Link copied to clipboard
protected open var layout: Layout?
Link copied to clipboard
override var minimumSize: Size
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val model: KeyValueModel<K, V>

that holds the data for the Table

Link copied to clipboard
Link copied to clipboard
open override val numItems: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var parent: View?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var position: Point
Link copied to clipboard
Link copied to clipboard
open override val selection: Set<Int>
Link copied to clipboard
open override val selectionAnchor: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

that manages the Table's selection state

Link copied to clipboard
override var size: Size
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val visibilityChanged: BooleanObservers
Link copied to clipboard
override var visible: Boolean
Link copied to clipboard
override var width: Double
Link copied to clipboard
override var x: Double
Link copied to clipboard
override var y: Double
Link copied to clipboard
var zOrder: Int

Functions

Link copied to clipboard
fun containsKey(key: K): Boolean

Tells whether the table contains the given key.

Link copied to clipboard
fun containsValue(value: V): Boolean

Tells whether the table contains the given value.

Inherited functions

Link copied to clipboard
protected open override fun addedToDisplay()
Link copied to clipboard
open override fun addSelection(items: Set<Int>)
Link copied to clipboard
protected open infix fun ancestorOf(view: View): Boolean
Link copied to clipboard
protected open fun child(at: Point): View?
Link copied to clipboard
open override fun clearSelection()
Link copied to clipboard
fun contains(value: Pair<K, V>): Boolean
protected operator fun contains(child: View): Boolean
open operator override fun contains(point: Point): Boolean
Link copied to clipboard
protected fun contentDirectionChanged()
Link copied to clipboard
protected fun cursorChanged(old: Cursor?, new: Cursor?)
Link copied to clipboard
protected open override fun doLayout()
Link copied to clipboard
protected fun enabledChanged(old: Boolean, new: Boolean, filter: (View) -> Boolean)
Link copied to clipboard
protected open fun filterKeyEvent(event: KeyEvent)
Link copied to clipboard
protected open fun filterPointerEvent(event: PointerEvent)
Link copied to clipboard
protected open fun filterPointerMotionEvent(event: PointerEvent)
Link copied to clipboard
fun fromAbsolute(point: Point): Point
Link copied to clipboard
operator fun get(index: Int): Result<Pair<K, V>>
operator fun get(traversalType: FocusTraversalPolicy.TraversalType): Set<KeyState>?
Link copied to clipboard
protected open override fun handleDisplayRectEvent(old: Rectangle, new: Rectangle)
Link copied to clipboard
protected open fun handleKeyEvent(event: KeyEvent)
Link copied to clipboard
protected open fun handlePointerEvent(event: PointerEvent)
Link copied to clipboard
protected open fun handlePointerMotionEvent(event: PointerEvent)
Link copied to clipboard
open infix fun intersects(point: Point): Boolean
Link copied to clipboard
open override fun next(after: Int): Int?
Link copied to clipboard
open override fun previous(before: Int): Int?
Link copied to clipboard
protected open fun relayout()
Link copied to clipboard
protected open override fun removedFromDisplay()
Link copied to clipboard
open override fun removeSelection(items: Set<Int>)
Link copied to clipboard
open override fun render(canvas: Canvas)
Link copied to clipboard
fun rerender()
Link copied to clipboard
Link copied to clipboard
protected fun revalidate()
Link copied to clipboard
open override fun selectAll()
Link copied to clipboard
open override fun selected(item: Int): Boolean
Link copied to clipboard
operator fun set(traversalType: FocusTraversalPolicy.TraversalType, keyStates: Set<KeyState>?)
Link copied to clipboard
open override fun setSelection(items: Set<Int>)
Link copied to clipboard
protected open fun shouldHandlePointerEvent(event: PointerEvent): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected fun styleChanged(filter: (View) -> Boolean)
Link copied to clipboard
fun toAbsolute(point: Point): Point
Link copied to clipboard
open override fun toggleSelection(items: Set<Int>)
Link copied to clipboard
fun toLocal(point: Point, from: View?): Point
Link copied to clipboard
Link copied to clipboard
fun toParent(point: Point): Point