tableview

Default Table Model in JavaFX

回眸只為那壹抹淺笑 提交于 2020-01-15 09:10:00
问题 I have encountered some problem when trying to select single row from table view in JavaFX. Here is how I populate my table with data from database: public void populateCategoryTable() { data = FXCollections.observableArrayList(); try { db.getConnection(); String sql = "SELECT * FROM sm_category"; ResultSet rs = null; // Call readRequest to get the result rs = db.readRequest(sql); while (rs.next()) { ObservableList<String> row = FXCollections.observableArrayList(); //All the rows are added

Default Table Model in JavaFX

情到浓时终转凉″ 提交于 2020-01-15 09:09:10
问题 I have encountered some problem when trying to select single row from table view in JavaFX. Here is how I populate my table with data from database: public void populateCategoryTable() { data = FXCollections.observableArrayList(); try { db.getConnection(); String sql = "SELECT * FROM sm_category"; ResultSet rs = null; // Call readRequest to get the result rs = db.readRequest(sql); while (rs.next()) { ObservableList<String> row = FXCollections.observableArrayList(); //All the rows are added

Sort Javafx table on multiple columns

断了今生、忘了曾经 提交于 2020-01-14 06:29:10
问题 Can a default Javafx table sort on multiple fields by dragging the columns on a dropzone? My user need to select one or multiple columns to sort on different columns. The application is fully written in Java8 with JavaFX. The source code that I now use is: import java.util.Collections; import java.util.Comparator; import java.util.function.Function; import javafx.application.Application; import javafx.beans.property.SimpleObjectProperty; import javafx.geometry.Insets; import javafx.geometry

JavaFX TableView: open detail information between rows on click

╄→гoц情女王★ 提交于 2020-01-14 04:22:08
问题 I'm trying to display travel connections in a TableView. So far that works like a charm. Now I'm kinda stuck trying to get details of a connection to be displayed in between table rows. This should happen on selecting a table item. The problem is, that the details are in a different format than the connections I'm displaying. So I would need to put a panel between two table rows. Is this at all possible? 回答1: The "proper" way to do this would be to create a custom skin for TableRow and use a

iOS Swift 4 searchBar in TableView

让人想犯罪 __ 提交于 2020-01-14 03:11:10
问题 I build tableView with searchBar inside tableView . What i want to do is.. search name from searchText and display it on tableView . when my searchText is empty, display full user list i have main array of users : var users = [User]() current array with use searchBar var currentUserArray = [User]() user model: import Foundation import Firebase class User: NSObject { var id: String? var name: String? var login: String? var email: String? var profileImageUrl: String? var role: String? init

[self.tableview reloadData]; causes flickering

青春壹個敷衍的年華 提交于 2020-01-13 01:52:50
问题 The problem is the UI appears and then gets updated : giving a flickering affect. I want the UI to be updated only once when user enters app, thus i've put reload in ViewDidLoad.. Here is the code .. Any help how can remove this flickering ... Some code example would help. - (void)viewDidLoad { [super viewDidLoad]; self.myTableView.dataSource = self; self.myTableView.delegate = self; PFQuery * getCollectionInfo = [PFQuery queryWithClassName:@"Collection"]; // make query [getCollectionInfo

TableViewController doesn't flash scroll indicators even if the table is bigger that the view

自作多情 提交于 2020-01-12 13:47:54
问题 I've got a weird problem with a TableViewController. In the doc it says that a tableViewController deals also with the method -flashScrollIndicators when the table is "oversized" respect the visible area. My app consists in 3 nav controller loaded in a tab controller. Each nav controller has as root view controller a subclass of a table view controller. Each "model" is populated from a plist file, that loads its contents into an array in the -viewDIdLoad, later everything is passed to the

JavaFx TableView issues with big data

蹲街弑〆低调 提交于 2020-01-11 09:34:07
问题 I have been using JavaFx's tableview to display a huge amount of data from the database. The table is like 150+ columns and millions of rows. I can handle the rows by getting the data in chunks and implementing paginations(link). But the no of columns is also an area of concern. It takes a lot of time to paint the data and does not update the data when I change the values in the model(ref). I dont have a predefined data structure and so the method at this is not useful. I moved on to use

iPhone SDK: Opening a cell with a dedicated button, not by cell tapping

為{幸葍}努か 提交于 2020-01-10 04:36:25
问题 I have a simple TableView containing several cells. Normally, I switch to selected cell details by tapping this cell. But what if I need a dedicated button for every cell? I've seen "Table View Cell" properties in Interface Builder, it has what I need, but it can't be added to existing cells. How to properly add this kind of button to every cell of standard TableView? 回答1: I do something similar in an app I am working on right now. I have a cell that has a button on it, and I need to know

How to enable commit on focusLost for TableView/TreeTableView?

帅比萌擦擦* 提交于 2020-01-08 14:40:11
问题 Is there any simple approach to let the TreeTableView (or TableView) try to commit values on focus lost? Unfortunatly I didn't succed with any default-implementations of javafx TableCellFactories, which is why I tried my own TreeTableCell implementations and also some different tableCell implementations like the one from Graham Smith, which seemed the most straight forward, since it already implemented a hook for focus lost, but nevertheless the value is never committed and the userchanges