javafx-8

JavaFX Ubuntu stage dock icon does not update

元气小坏坏 提交于 2020-01-04 05:49:10
问题 I am developing a JavaFX 8 application that runs cross-platform on Windows/OSX/Ubuntu via JWrapper. Right now I am using stage.getIcons().add(..) to set the stage icon to a 256x256 PNG bundled with the application. This works on Windows, however on Ubuntu, the dock icon remains the Oracle/Java default icon, as shown below. Is there some third party library, or some technique I can use to get my own icon and tooltip/title to display for the Ubuntu dock icon? 回答1: Ubuntu is a bit different: You

JavaFx: In TreeView Need Only Scroll to Index number when treeitem is out of View

北慕城南 提交于 2020-01-04 03:51:08
问题 I need to do a simple thing. I have a large TreeView. and a menu item Next and Previous. on Next I have to select next Tree Item. Tree List Look like this -Root(set visible hide is true for root) --Parent 1 ----Child 1 ----Child 2 ----Child 3 --Parent 2 ----Child 1 ----Child 2 Now By pressing Next or previous menu item i call myTreeView.getSelectionModel().clearAndSelect(newIndex); By This I have manage to select next item and by myTreeView.getSelectionModel().scrollTo(newIndex) i have manage

JavaFx: In TreeView Need Only Scroll to Index number when treeitem is out of View

雨燕双飞 提交于 2020-01-04 03:50:11
问题 I need to do a simple thing. I have a large TreeView. and a menu item Next and Previous. on Next I have to select next Tree Item. Tree List Look like this -Root(set visible hide is true for root) --Parent 1 ----Child 1 ----Child 2 ----Child 3 --Parent 2 ----Child 1 ----Child 2 Now By pressing Next or previous menu item i call myTreeView.getSelectionModel().clearAndSelect(newIndex); By This I have manage to select next item and by myTreeView.getSelectionModel().scrollTo(newIndex) i have manage

Change virtual keyboard to AZERTY

时光总嘲笑我的痴心妄想 提交于 2020-01-03 19:18:48
问题 I have a javafx application that is supposed to run in fullscreen mode on a Windows tablet. My problem is, when the keyboard appears, it's in QWERTY whereas my tablet is in AZERTY. So the question is : Is there a way to use the system virtual keyboard or to switch the javafx virtual keyboard to AZERTY? 回答1: I found you question while trying to accopllish the same thing. I spent a day trying to make javafx display an AZERTY keyboard and i found a solution! Well let me be clear : javafx gave no

Change virtual keyboard to AZERTY

馋奶兔 提交于 2020-01-03 19:18:05
问题 I have a javafx application that is supposed to run in fullscreen mode on a Windows tablet. My problem is, when the keyboard appears, it's in QWERTY whereas my tablet is in AZERTY. So the question is : Is there a way to use the system virtual keyboard or to switch the javafx virtual keyboard to AZERTY? 回答1: I found you question while trying to accopllish the same thing. I spent a day trying to make javafx display an AZERTY keyboard and i found a solution! Well let me be clear : javafx gave no

JavaFX virtual keyboard overlaps nodes

流过昼夜 提交于 2020-01-03 14:15:15
问题 i have a question about using virtual keyboard on touch supported pc with Windows 8.1. I have managed to show the virtual keyboard when textfield is focused with java switch: -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx I found how to that on JavaFX Virtual Keyboard doesn't show1. But when the keyboard show's up, it overlapps nodes below the keyboard. According to what I read, http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm, it should't be

Scala name mangling of private fields and JavaFX FXML injection

☆樱花仙子☆ 提交于 2020-01-03 11:32:09
问题 The following example and explanations are quite long, so here is the gist of my question: how to deal with scalac's name-mangling of private fields when using a framework which insists on performing field injection (on fields which really should stay private)? I am writing an application in Scala, using ScalaFX/JavaFX and FXML. When you use FXML to define your views in JavaFX, objects defined in FXML (such as buttons and text fields) are injected into the controller by : adding an fx:id

Update JavaFX scene graph from a Thread

泪湿孤枕 提交于 2020-01-03 04:24:50
问题 I need to update my GUI based on client input. Calling my controller class method, from the background task works. But it can't update the GUI, because it is not the JavaFX application thread..please help. I tried many of the related Q & A, but I am still confused. Should I use Platform. runLater or Task ? Here's my class where I create an instance of controller class public class FactoryClass { public static Controller_Gui1 createGUI() { FXMLLoader fxLoader = new FXMLLoader(); fxLoader

How to rotate an object around a custom pivot in JavaFX?

自作多情 提交于 2020-01-03 03:39:05
问题 I want to rotate an object round a custom pivot, which is its point, so I have such code: private final EventHandler<MouseEvent> mouseEventHandler = new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent mouseEvent) { if (mouseEvent.getEventType() == MouseEvent.MOUSE_PRESSED) { dragStartX = mouseEvent.getSceneX(); dragStartY = mouseEvent.getSceneY(); mousePosX = mouseEvent.getSceneX(); mousePosY = mouseEvent.getSceneY(); mouseOldX = mouseEvent.getSceneX(); mouseOldY =

Create a null-safe BooleanBinding with JavaFX 8

こ雲淡風輕ζ 提交于 2020-01-03 01:17:32
问题 I need help creating a null -safe BooleanBinding . It has to be null -safe since I can not provide default values for all attributes in the model (one reason: the model contains enumerations). My first approach has been as follows: executeButtonDisabled.bind(missionProperty().isNotNull().and(missionProperty().get().statusProperty().isNotEqualTo(MissionStatus.CREATED))); final BooleanBinding isNotExecutingBinding = missionProperty().isNotNull().and(missionProperty().get().statusProperty()