Cljfx/flowless is a wrapper of Flowless library — a virtual flow implementation (like a list view) with "dumb cells".
A minimal code to try it out:
(require '[cljfx.api :as fx]
'[cljfx.flowless :as fx.flowless])
(fx/on-fx-thread
(fx/create-component
{:fx/type :stage
:showing true
:scene {:fx/type :scene
:root {:fx/type fx.flowless/virtualized-scroll-pane ;; add scroll bars
:content {:fx/type fx.flowless/virtual-flow
:cell-factory identity
:items (for [i (range 1000)]
{:fx/type :label :text (str i)})}}}}))
This lifecycle defines a VirtualFlow.
Supported props:
:items - list of any objects.:cell-factory - a function that converts item to cljfx description of any node
that will display the item. Required, can't be changed.:orientation - either :vertical (default) or :horizontal.:gravity - either :front (default) or :rear, defines alignment of cell when
they don't fill the whole view.This lifecycle defines a node that wraps VirtualFlow pane and shows it with scroll bars. Supported props:
:content (required) - component description that defines a VirtualFlow instance.
Can't be changed.:hbar-policy and :vbar-policy - scroll bar policies, either :never, :always
or :as-needed (default).Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |