javafx-8

How to control the JavaFX TextArea auto scroll?

二次信任 提交于 2019-12-25 16:46:24
问题 In my application I am appending the text to TextArea every 2 minutes. When ever I append new line to TextArea the auto scroll automatically going to down. But I want to stay the scroll where i am keep the scroll button. How to do it in JavaFX. logTextArea.appendText("Here i am appending text to text area"+"\n"); logTextArea.setScrollTop(Double.MIN_VALUE); I tried this but scroll automatically going to down , but I need to keep my scroll chosen position I don't want to go automatically down.

Changing background color (or just color) of row (javafx)

我们两清 提交于 2019-12-25 13:14:43
问题 I've a TableView . I want to change background color of rows according to some condition. For instance, if balance ( getBalance() ) is less than zero - set background color of that row to red. Here is my setCellValueFactory : tc_proj_number.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getId().toString())); tc_proj_date.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getValueDate().toInstant().atZone(ZoneId.systemDefault())

JavaFX: How to add serveral series dynimically on Area Chart and delete line(series) from chart?

会有一股神秘感。 提交于 2019-12-25 13:08:48
问题 I am working with Area Chart of JavaFX. I want to add series dynamically after user will enter values in text fields and press Add button. I also want to add delete and undo functionality in it. Delete functionality working would be like for instance if there are several lines on the Area Chart each line represents series, user can delete any line he want by clicking on that line and after clicking on delete button. I also want to add undo functionality so user can undo his actions. The

Also select parents up to the root when selecting child in TreeTableView

北城以北 提交于 2019-12-25 11:57:15
问题 We try to achieve the following: When a node gets selected in a JavaFX TreeTableView , also "the path to the root", i.e., the parent, the grandparent, and so on should get selected. Selected in this case means highlighted with a different background color , see the image (in the example, the node on Level 2 has been clicked by the user). Is there a built-in function how to achieve this? We tried using CSS but did not succeed. 回答1: There's no "built-in function" to do this. Use a row factory

Also select parents up to the root when selecting child in TreeTableView

旧城冷巷雨未停 提交于 2019-12-25 11:56:07
问题 We try to achieve the following: When a node gets selected in a JavaFX TreeTableView , also "the path to the root", i.e., the parent, the grandparent, and so on should get selected. Selected in this case means highlighted with a different background color , see the image (in the example, the node on Level 2 has been clicked by the user). Is there a built-in function how to achieve this? We tried using CSS but did not succeed. 回答1: There's no "built-in function" to do this. Use a row factory

javafx mediaview white flash on transition

左心房为你撑大大i 提交于 2019-12-25 09:36:57
问题 Folks... I'm using the following code to transition between two videos. public void loadMedia(Media media) { MediaPlayer newPlayer = new MediaPlayer(media); newPlayer.setAutoPlay(true); mediaView.setMediaPlayer(newPlayer); player = newPlayer; } When I call loadMedia with the new video, the mediaplayer flashes white briefly. I'm guessing this has to do with the status taking time. But I need these transitions to go smoothly with no flash. What to do? Thanks, GeePaw 回答1: As so often, I answered

JavaFX populate tableview with a OneToMany relationship

被刻印的时光 ゝ 提交于 2019-12-25 09:09:51
问题 to populate a table is easy when you populate it with data from one class, but what is when I want to populate it with data from a OneToMany relationship? for example: Class Person: Id, firstname, lastname, cars(cars have a onetomany relationship with Class Cars, so one person can have one or more cars) Now, if a person got two cars, how can I add this to a table? It should look something like this: ID | firstname | lastname | vehicleBrand(from cars) ==========================================

JavaFX populate tableview with a OneToMany relationship

烂漫一生 提交于 2019-12-25 09:07:14
问题 to populate a table is easy when you populate it with data from one class, but what is when I want to populate it with data from a OneToMany relationship? for example: Class Person: Id, firstname, lastname, cars(cars have a onetomany relationship with Class Cars, so one person can have one or more cars) Now, if a person got two cars, how can I add this to a table? It should look something like this: ID | firstname | lastname | vehicleBrand(from cars) ==========================================

Is it possible to placing Plugins(.appex) at a common location beforehand where JavaFX maven plugin would pick it and build the app

元气小坏坏 提交于 2019-12-25 08:14:09
问题 I am working with JavaFX Maven Plugin to build my app on OS X. During the build process , whatever lies in the app folder will be automatically placed in Java folder to the main app. Whatever lies in Info.plist and .icns will be picked up from deploy/package/macosx folder But I have still not been able to figure out the position for placing the .appex file (Finder Extensions) in order to get them placed automatically inside the Plugins folder during the build process of the main application

How to change values in tableview simultaneously whenever i select an corresponding item from comboboxtablecell

孤人 提交于 2019-12-25 07:51:56
问题 I tried but I got stuck at a point where am getting the corresponding values of the selected item from comboboxtablecell but cannot add the values to the corresponding column in the table view Controller.java public class controller { GetConnection gc = new GetConnection(); PreparedStatement pst; ResultSet rs; Statement st; private ObservableList<Users> datas = FXCollections.observableArrayList(); public controller(){} @FXML private TableView<Users> table; @FXML private TableColumn<Users