Giter VIP home page Giter VIP logo

tablefilterfx's Introduction

TableFilterFX

An extension for the JavaFX TableView that adds the possibility of applying a filter to the column headers

Travis Build Status

Maven Central

Hex.pm

screenshot1

Maven dependency

<dependency>
        <groupId>com.github.maimart</groupId>
        <artifactId>TableFilterFX</artifactId>
        <version>1.0.0</version>
</dependency>

Implementation

The implementation of the filter is quite easy. You wrap your TableView with the TableFilter and add the columns that should be filterd by tableFilter.filterColumn(TableColumn column)

######1 Build your TableView like usual by code or fxml

TableView<Pojo> table = new TableView<>();
table.getItems().addAll(pojoList);
TableColumn<Pojo, String> columnA = new TableColumn<>("ColA");
TableColumn<Pojo, String> columnB = new TableColumn<>("ColB");
table.getColumns().add(columnA);
table.getColumns().add(columnB);	
..

######2 After that apply the filter

TableFilter<Pojo> tableFilter = new TableFilter<>(table);
tableFilter.filterColumn(columnA);
tableFilter.filterColumn(columnB);

ā• You can initialize the table data by using TableView.getItems(), but you must not bind the TableView.itemsProperty(). If you want to bind the table data use the TableFilter.unfilteredItemsProperty() instead.

TODOs

This is a early version of the filter. If you find any bugs please feel free to create an issue. IĀ“m glad to every reported bug.

  • Deployment on center maven repository will come soon
  • Improve performance on big lists (10k+)
  • Intensive testing of the filter will happen in nearest future

tablefilterfx's People

Contributors

maimart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tablefilterfx's Issues

Filter popup screen width

Screen - 1
Screen - 2

Hi,

I added TableFilterFX to my own project. It worked, but the width increases when you move up and down on the filter. Can I set the date format as dd.MM.yyyy? Is there a solution?

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.