Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I know if a TableView is empty?

I'm trying to do a BooleanBinding in JavaFX 8 that determinates if a TableView is empty. How can I do this?

like image 574
Marco Canora Avatar asked Mar 26 '16 16:03

Marco Canora


People also ask

What is difference between Tableview and collection?

Suggested approach: Collection views are there to display grids, but also handle entirely custom layouts, whereas table views are simple linear lists with headers and footers.

How does a Tableview work?

A table view displays a single column of vertically scrolling content, divided into rows and sections. Each row of a table displays a single piece of information related to your app. Sections let you group related rows together. For example, the Contacts app uses a table to display the names of the user's contacts.

How do you clear a Tableview in Swift?

So, to remove a cell from a table view you first remove it from your data source, then you call deleteRows(at:) on your table view, providing it with an array of index paths that should be zapped. You can create index paths yourself, you just need a section and row number.

How do I return an empty table view cell?

If we want to show an empty table view cell, we can feed the table view a different . dataSource , then do a reload to refresh the cells.


1 Answers

Use

Bindings.isEmpty(table.getItems())
like image 88
James_D Avatar answered Oct 01 '22 09:10

James_D