(create-jtree ctx)(safe-tree-model-set tree f attribute)(safe-tree-set tree f attribute)(set-tree-data c ctx data)Set the raw application data vector or collection consumed by :tree-model-fn. Changing this will cause the model to rebuild the tree using the current :tree-model-fn and then update selection/scroll path according to the current :tree-selection-fn and :tree-scroll-path-fn.
Set the raw application data vector or collection consumed by :tree-model-fn. Changing this will cause the model to rebuild the tree using the current :tree-model-fn and then update selection/scroll path according to the current :tree-selection-fn and :tree-scroll-path-fn.
(set-tree-large-model c ctx large-model?)(set-tree-model-fn c ctx tree-model-fn)Set the model function used to derive the tree structure from :tree-data.
tree-model-fn: (fn [tree-root data] [new-tree-root tree]) where tree is a
map parent->vector-of-children. The nodes may be any values; they are passed
to :tree-render-fn.
Returning a different root replaces the root shown by the JTree.
Set the model function used to derive the tree structure from :tree-data. tree-model-fn: (fn [tree-root data] [new-tree-root tree]) where `tree` is a map parent->vector-of-children. The nodes may be any values; they are passed to :tree-render-fn. Returning a different root replaces the root shown by the JTree.
(set-tree-render-fn c ctx tree-render-fn)Set the render function for nodes. tree-render-fn: (fn [node] <string | {:value string :icon Icon}>). If a map is returned, :value provides the label text and :icon (optional) is applied to the DefaultTreeCellRenderer. Any other return type will render as "<unrecognized>" and log a warning.
Set the render function for nodes.
tree-render-fn: (fn [node] <string | {:value string :icon Icon}>). If a map
is returned, :value provides the label text and :icon (optional) is applied
to the DefaultTreeCellRenderer.
Any other return type will render as "<unrecognized>" and log a warning.(set-tree-scroll-path-fn c ctx tree-scroll-path-fn)Set a function that computes a single path to scroll into view. tree-scroll-path-fn: (fn [tree-root tree data] <single-path>) where the path is a vector of nodes from the root down to the node to reveal.
Set a function that computes a single path to scroll into view. tree-scroll-path-fn: (fn [tree-root tree data] <single-path>) where the path is a vector of nodes from the root down to the node to reveal.
(set-tree-selection-fn c ctx tree-selection-fn)Set a selection function for the tree model. tree-selection-fn: (fn [tree-root tree data] <vector-of-paths>) where each path is a vector of nodes from the root to the selected node. Example return: [[root a] [root b c]].
Set a selection function for the tree model. tree-selection-fn: (fn [tree-root tree data] <vector-of-paths>) where each path is a vector of nodes from the root to the selected node. Example return: [[root a] [root b c]].
(set-tree-toggle-click-count c ctx t-count)Set the number of clicks to toggle expand/collapse on the JTree. Typical values are 1 or 2. Applied directly on the JTree component.
Set the number of clicks to toggle expand/collapse on the JTree. Typical values are 1 or 2. Applied directly on the JTree component.
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 |