how to select multiple column in tableview - javafx

In need of building a desktop application to deal table data imported from csv files, I have been working with JavaFX few months.
Now, I have hit a problem: I can't select multi-column in a tableview. What I want to do is that in my application users can select two columns, then trigger a button to combinate them into a new column and append the new one into the tableview. But it seem that JavaFX's TableView do not support to select multi-column or even a single column. In Swing I can finish this work easily with the link Java Swing Tutorials to Use Table.
However, I have done by adding listeners to column headers and setting corresponding trigger action like lighlight the selected columns and adding the selected to a recording List so that as user press the button my application could know what user selected.
But I think there must be some way nicely to meet the demand. And so what is it? Please give some useful imformation or tourials.

Related

Changing the function of dynamic links in info parts

I am trying to let an info part's dynamic link work so that it only opens the queried values in a list on the new form.
Basically now, if i click Installation No. on the form part below.
Then this form opens up with all the Installations, not only the related Installations.
What i want to happen is when the Installation No is clicked then the list should look like when the "more" button is clicked or like the image below.
It seems like this is the standard function but i want to know if there is a way to change it.
Does anyone know a solution to this or know if there is any?
Dynamic links should work on info part forms provided prerequisites are met:
A data relationship exists between two tables, usually as one-to-many (one parent row relates to many child rows).
Each table has a field of the same extended data type.
In the parent table, the extended data type field values uniquely identify each row.
The extended data type has a relation defined on it for the field in the parent table.
Each table is a data source for one of the two forms.
The parent form contains a button that launches the child form.

Create dynamic table using TableView in xamarin forms

I am new in Xamarin forms and I need to implement a table in Xamarin forms. Requirement is-
Initially table will be empty and has four columns. After feeling form and clicking on submit button, new entry will be added in table. First column is Test, second column is single radio button, third column is again single radio button and forth column is button to delete that row it self.
I need to know which approach will be suitable to implement this requirement. Is it grid layout or tableview or something else.
Consider Table View use cases vs List View use cases. Table views are meant for static content. You should really consider a list view for dynamic content. (like adding a row with views) Being new to Xamarin.Forms, you should take the time to read completely through the documentation as (at least for me) it wasn't straightforward. Also, consider a WebView as radio buttons are not going to play nicely across platforms, and your problem would be easily solvable with jQuery.

Possible ways to refresh tableview in Javafx

The one in the picture is what i need , whenever I press sell button the quatity in the backgroud tableview column should change What makes tableview refreshed automatically detecting the change in database value without running the program from scratch.
you attached an observableList to the Tableview, so it inmediatly detects any change and update the view. So, the thing here is you have to maintain updated your observableList, you should find a way to detects change in you database. If you database is only modified for you application this should not be a hard task to complete, on the other hand, if it's modified for another system I suppossed you have to maintain the list consulting the database every often.

TableView Enhancements

The TableView still leaves a lot to be desired. Does anyone have a more complex example of a TableView that you would like to share? Here's what I'm missing:
Insert and Delete row:
Possible solutions:
press TAB on the last cell and new row gets inserted automatically
right mouse button -> context menu -> insert line (or delete line)
a table footer with table navigation and insert/delete buttons (like MS Access)
keyboard shortcut
...
Insert and Delete should be either at the current row position or at the bottom of the table. Of course the new row should be highlighted.
Copying / Duplication of rows inside the TableView
Copy selected cells to the clipboard
(solution exists: copy multiple cells to clipboard, paste into table is missing)
Insert a row with default values
Type to Edit: I don't want to have to doubleclick on a cell first in order to edit it. When you type on a cell, the table should automatically go into edit mode.
Navigation options like e. g. TAB = cell in next column, ENTER = cell in next row
Filtering should be possible via components inside the tableview, not via components (TextField etc) outside of it. A filter indicator (like the sort indicator) would be nice.
Changing the visibility of columns should be convenient, not via multiple clicks of the tableview menu button (for every column you have to click the menu button separately to show the available columns). The tableview menu button should be customizable
(solutions exist with reflection and without reflection)
Row and column headers should be possible
Validation of cells, so that when you are in edit mode and enter text instead of digits into a numeric cell you get the option to cancel the edit mode and revert to the default value
A (fixed) table footer which could e. g. show the sum for each column would be nice
Freezing of columns (there's already a Jira task for this)
Some of these were covered partially years ago from what I've seen. But I couldn't get a clear How-To impression and maybe things have changed with JavaFX8.
In case someone likes to contribute to any of these mentioned features, please share your thoughts. Thank you very much.

Does progurad obfuscate tableview in javafx

I have created a JavaFX application, it have TableView to show table data. I am obfuscating final jar using Proguard-4.8, but unable to view data in TableView, we have created public static classes for table data binding. In my table if I have three columns say two columns show text and remaining one column have button added then after obfuscation I am able to see button only, rest two columns show blank rows.
Without obfuscation my jar showing all text data correctly. I have no CSS applied over TableView.
Can someone suggest me where I am doing wrong?
Thanks,
Are you using PropertyValueFactory? This would mean the property is accessed via reflection and if you obfuscate the property it can't be found anymore!

Resources