Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class BasicConfinedValueModel<T : Comparable<T>>(limit: ClosedRange<T>, value: T = limit.start) : ConfinedValueModel<T>
Link copied to clipboard
interface Binding

Represents a relationship between items that can be dissolved.

Link copied to clipboard
open class BooleanVisualizer(defaultSize: Size = Size(16)) : ItemVisualizer<Boolean, Any>

Visualizes Booleans using CheckBoxes.

Link copied to clipboard
class ColorPicker(color: Color) : View

Control for selecting a Color from within a palette.

Link copied to clipboard

Created by Nicholas Eddy on 2/12/18.

Link copied to clipboard
Link copied to clipboard
interface DynamicListModel<T> : ListModel<T>

A model that can change over time. These models do not directly expose mutators, but they admit to being mutable.

Link copied to clipboard
interface EditOperation<T>

Represents an ongoing edit operation of some View. The operation defines any View associated with the edit and the data that gets returned when completed.

Link copied to clipboard

An indexed item with an expanded state that is often used as the context with ItemVisualizer.

Link copied to clipboard
interface IndexedItem

A selectable item with an index that is often used as the context with ItemVisualizer.

Link copied to clipboard
interface ItemVisualizer<T, in C>

Provides a mapping between an item and a View to represent it.

Link copied to clipboard
@ExperimentalCoroutinesApi
class LazyPhoto(pendingImage: Deferred<Image>, initialized: (imageSize: Size) -> Unit = {}, placeHolder: Canvas.() -> Unit = {}) : View

A simple wrapper around a deferred Image. It renders a placeHolder while the image loads. Then the image is scaled to fit within the bounds of the Photo when it finally loads.

Link copied to clipboard
interface ListModel<T> : Iterable<T>

Holds data in a list-like structure for use with controls like List.

Link copied to clipboard
class ListSelectionManager(selectionModel: SelectionModel<Int>?, numRows: () -> Int) : Selectable<Int>
Link copied to clipboard
typealias ModelObserver<T> = (source: DynamicListModel<T>, Differences<T>) -> Unit
Link copied to clipboard
Link copied to clipboard

A ListModel model that lets callers modify it.

Link copied to clipboard
class Photo(image: Image) : View

A simple wrapper around an Image. The image is scaled to fit within the bounds of this Photo when drawn.

Link copied to clipboard
class ProgressBar(model: ConfinedValueModel<Double> = BasicConfinedValueModel(0.0 .. 100.0), val orientation: Orientation = Horizontal) : ProgressIndicator

Represents a progress indicator that can be Horizontal or Vertical.

Link copied to clipboard
abstract class ProgressIndicator(model: ConfinedValueModel<Double>, role: RangeRole = ProgressBarRole()) : View

Control that shows progress of some activity. That progress comes via the model. Changes to the model will update the control.

Link copied to clipboard

Places the item (which is a View) within a ScrollPanel.

Link copied to clipboard
interface Selectable<T>

Created by Nicholas Eddy on 3/19/18.

Link copied to clipboard
interface SelectionModel<T> : Iterable<T>
Link copied to clipboard
open class SimpleIndexedItem(val index: Int, val selected: Boolean) : IndexedItem
Link copied to clipboard
open class SimpleListModel<T>(list: List<T>) : ListModel<T>

ListModel based directly on a List.

Link copied to clipboard
Link copied to clipboard
class StarRater(max: Int = 5, displayRounded: Float = 0.0f, pathMetrics: PathMetrics? = null) : View

Creates a control that shows a star rating.

Link copied to clipboard
open class StringVisualizer(fitText: Set<Dimension>? = null) : ItemVisualizer<String, Any>

Visualizes Strings using Labels.

Link copied to clipboard
open class StyledTextVisualizer(fitText: Set<Dimension>? = null) : ItemVisualizer<StyledText, Any>

Visualizes StyledText using Labels.

Link copied to clipboard

Simply uses the item (which is a View) as its own visualizer

Functions

Link copied to clipboard

Tracks a Binding and unbinds it when a new one replaces it.

Link copied to clipboard
inline fun <T, C> itemVisualizer(crossinline block: (item: T, previous: View?, context: C) -> View): ItemVisualizer<T, C>

Creates an ItemVisualizer from the given lambda.

Link copied to clipboard
fun <T> mutableListModelOf(vararg elements: T): MutableListModel<T>

Creates a MutableListModel from the given set of elements.

Link copied to clipboard
Link copied to clipboard
fun <T, C> toString(delegate: ItemVisualizer<String, C>, mapper: (T) -> String = { "$it" }): ItemVisualizer<T, C>

Visualizes a string representation of the item (obtained from mapper) using delegate.

Inherited functions

Link copied to clipboard
fun <T, R, C> ItemVisualizer<R, C>.after(mapper: (T) -> R): ItemVisualizer<T, C>

Creates a visualizer for T using a visualizer for R by mapping T -> R.

Link copied to clipboard
inline fun <T : Number, Comparable<T>> RangeRole.bind(model: ConfinedValueModel<T>, noinline labeler: (T) -> String? = null): Binding
fun <T : Comparable<T>> RangeRole.bind(model: ConfinedValueModel<T>, interpolator: Interpolator<T>, labeler: (T) -> String? = null): Binding

Creates a binding between the role and model, keeping the role synchronized with the given model

Link copied to clipboard
operator fun <T> ItemVisualizer<T, Any>.invoke(item: T, previous: View? = null): View
Link copied to clipboard
Link copied to clipboard