tableview

How to enable commit on focusLost for TableView/TreeTableView?

Deadly 提交于 2020-01-08 14:36:33
问题 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

TableView add a new Label that changes automatically

两盒软妹~` 提交于 2020-01-07 09:33:14
问题 Ok so I was recently helped by Darren to solve a problem that my tableview data wasn't showing. I will leave a document here which I am going to be reffering to. Download File (3.12mb) In the storyboard, at the end there are 3 object and 2 of them are automatically changing dependening on what item is chosen on the tableView. I would like to add another label (alread did in the project) and se it so some information will appear here depending on what item was chosen in the table view. Just

JavaFX TableView edit not editing

蹲街弑〆低调 提交于 2020-01-07 04:19:13
问题 In JavaFX 8 I'm trying to get a cell to edit after a new row has been added to the table, to optimize the experience for the user. hourTableView.getSelectionModel().select(newHour); int row = hourTableView.getSelectionModel().getSelectedIndex(); hourTableView.edit(row, hourTableAmountTableColumn); The correct row is selected, but the cell does not go into edit mode. Well, I have seen it happen very incidentally, but hardly reproducable. What am I doing wrong? 回答1: found the solution in Insert

JavaFX - TableView doesn't update items

非 Y 不嫁゛ 提交于 2020-01-07 03:21:12
问题 I'm programming a little vocabulary trainer for my wife using JavaFX. Each word stores it's own statistic values like how often she encountered the word and how often she provided a correct answer. I've set up a TableView for that, but after a training session the stats won't update. The word objects themselves have the right values but they're just not shown in the TableView. Usually the TableView always displays the current values of on object due to the nature of ObservableList, right? Not

JavaFX: TableView(fxml) filling with data

流过昼夜 提交于 2020-01-06 23:45:40
问题 either i am looking at it for to long... or i did not really understand it. In any case i am trying to fill a tableview that has been created using fxml (inc. Columns) with data. My Code works for the first (Title) column but not for the rest. (Yes "data" has all the info in it... checked with debug.) So can any1 tell me what i am doing wrong?? Here (hopefully all relevant) code (copied together): @FXML private TableColumn<sresult,String> cl_title; @FXML private TableColumn<sresult, String>

JavaFX: TableView(fxml) filling with data

北城余情 提交于 2020-01-06 23:45:08
问题 either i am looking at it for to long... or i did not really understand it. In any case i am trying to fill a tableview that has been created using fxml (inc. Columns) with data. My Code works for the first (Title) column but not for the rest. (Yes "data" has all the info in it... checked with debug.) So can any1 tell me what i am doing wrong?? Here (hopefully all relevant) code (copied together): @FXML private TableColumn<sresult,String> cl_title; @FXML private TableColumn<sresult, String>

Bind over the observableList in JavaFx

穿精又带淫゛_ 提交于 2020-01-06 18:37:47
问题 I have a entity of some datasource. It has List of object Pojo. It can be get by ds.getRows(). I'm trying to bind TableView on this list very hard. tblHlp.itemsProperty().bindBidirectional(new SimpleListProperty<>(FXCollections.observableArrayList(ds.getRows()))); When I change that ObservableList which I created FXCollections.observableArrayList(ds.getRows())) tableView is changed too. But I want to get the same effect when I change List in ds (ds.getRows). Any ideas? 回答1: I don't think you

Why is my tableViewController not loading any data?

夙愿已清 提交于 2020-01-06 15:08:47
问题 Im creating an app where different buttons in a ViewController load different menu's into the tableViewController. The buttons are linked by a prepare for segue and the menu's (arrays) are linked by a contentMode. 1: breakfast menu & 2: lunch menu. I had allot of help from someone setting this up but now the table is not loading any data... The cell has 3 labels which display an item, info and price. It changes value within the code when a contentMode is selected. Does anyone see the problem

Why is my tableViewController not loading any data?

荒凉一梦 提交于 2020-01-06 15:07:13
问题 Im creating an app where different buttons in a ViewController load different menu's into the tableViewController. The buttons are linked by a prepare for segue and the menu's (arrays) are linked by a contentMode. 1: breakfast menu & 2: lunch menu. I had allot of help from someone setting this up but now the table is not loading any data... The cell has 3 labels which display an item, info and price. It changes value within the code when a contentMode is selected. Does anyone see the problem

Want to make a detailview just like Pinterest

你离开我真会死。 提交于 2020-01-06 14:18:12
问题 I've been struggling with a view in xcode this whole weekend but still can't get it as I want. I want to do a detailview like Pinterest (see link below) but can't find out how to do it, is it a tableview with custom cells, collectionview or something else.. Which way's the easiest way to build it? Would be so grateful if someone got some good inputs for me.. Have a great upcoming week!! Pinterest DeatilView EDIT: This is what I got at the moment.. But feels like there should be an easier way