Giter Site home page Giter Site logo

flowless's Introduction

Clojars Project

cljfx-flowless

Cljfx-flowless is an idiomatic wrapper of Flowless library โ€” an efficient virtual flow implementation similar to list view.

Installation

See latest version of io.github.vlaaad/cljfx-flowless on Clojars.

Requirements

cljfx/flowless requires Java 11.

Usage

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)})}}}}))

Documentation

virtual-flow

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.
  • other region props

virtualized-scroll-pane

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).
  • other region props.

flowless's People

Contributors

vlaaad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.