Code Monkey home page Code Monkey logo

javafx-filterable-table-columns's Introduction

javafx-filterable-table-columns

Description

Provides a set of JavaFX TableColumn's widgets that allow the user to create filters. This library only concerns itself with the UI portion, leaving the filtering up to the user.

Filter Headers Numeric Filter Text Filter Choice Filter DateTime Filter Boolean Filter

Use

Preferred Method The simplest way to use this library is to use the FilteredTableView class as a drop-in replacement for a TableView.

Then select the type of filtered column you wish to use as a drop-in replacement for the normal TableColumn class. There are built-in column filters for the following Java types:

  • String
  • Boolean
  • Object Arrays / Enums
  • Calendar
  • Byte
  • Short
  • Integer
  • Long
  • Double
  • Float
  • BigInteger
  • BigDecimal

To react to changes in the table filter, add an EventHandler of type ColumnFilterEvent.FILTER_CHANGED_EVENT to your FilteredTableColumn. You may also access the bound filtered columns on the table via exposed properties to see which columns are currently filtered, and to fetch the column filters.

Each returned filter has a Type and a Value. You can use this information to determine how to filter properly filter the data in the ObservableList backing your TableView.

Dependencies

Misc

Calendar widget code taken from Christian Schudt from http://myjavafx.blogspot.com/2012/01/javafx-calendar-control.html

Example

There's an example GUI in the test folder that shows how to configure and setup a filterable table with a few different column types.

Download

To download via maven, add the following to your settings.xml or pom.xml

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

And add the dependency to your pom.xml file

<dependency>
    <groupId>com.github.jhsheets</groupId>
    <artifactId>javafx-filterable-table-columns</artifactId>
    <version>1.0.1</version>
</dependency>

javafx-filterable-table-columns's People

Contributors

jhsheets 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.