javafx-8

Transparent Node Background

十年热恋 提交于 2019-12-12 11:42:58
问题 How do i programmatically make a Node 's background transparent-(see through); I am currently playing with AnchorPane as a parent Node to other ProgressIndicator and other nodes as children, and i want them to stand out ? I tried with Scene and it wasn't close to what i wanted, any workaround? lets say // suppose i have a fake layout like this AnchorPane ap = new AnchorPane(); ProgressIndicator pi = new ProgressIndicator(); ProgressIndicator pii = new ProgressIndicator(); ProgressIndicator

javafx SwingNode not working until window is resized

落爺英雄遲暮 提交于 2019-12-12 11:18:46
问题 I have been trying the SwingNode from JavaFX8 using this code. The problem is when the window appears I can not click the button, until I have resized the window. Moving it does not work. I need to either maximize it or resize it with the mouse to get the button to respond. I realize this could be a bug given that javafx8 is still in beta, but if thats not the case is there something I need to do to make this work with out resizing the window first? public class SwingNodeTest extends

Generate a tableview with a column containing a checkboxes and add listners to those checkboxes

 ̄綄美尐妖づ 提交于 2019-12-12 10:13:06
问题 How do i achieve above functionality in javafx 8? I was able to construct a table column with a CheckBoxTableCell using the cellFactory but was not able to access the checkboxes to add a listener to them. So how should i proceed? edit---- import BillControl.Controller.PopulateView; import BillControl.Controller.Validator; import BillControl.MainApp; import BillControl.model.Article; import BillControl.model.Job; import javafx.beans.property.*; import javafx.beans.value.ObservableValue; import

JavaFX popup hidden when stage is in fullscreen mode

£可爱£侵袭症+ 提交于 2019-12-12 10:03:22
问题 I am trying to popup a dialog over my fullscreen primary stage in javafx. When I create my popup, it is unexpectedly hidden behind my fullscreen primary stage until the stage is removed from fullscreen mode (via ESC ). If I make my primary stage maximized and undecorated instead of fullscreen, then my popup will appear on top of the primary stage as expected. Am I missing something about how fullscreen mode is different than maximized and undecorated mode? Am I using fullscreen mode

Allow user to copy data from TableView

流过昼夜 提交于 2019-12-12 08:49:03
问题 I have a simple JavaFX app that allows the user to query a database and see the data in a table. I'd like to allow the user to be able to click a table cell and copy text from that cell to the clipboard with the standard clipboard key stroke: ctrl-c for Win/Linux or cmd-c for Mac. FYI, the text entry controls support basic copy/paste by default. I'm using the standard javafx.scene.control.TableView class. Is there a simple way to enable cell copy? I did some searches and I see other people

How to avoid Thread.sleep() in a for loop from interrupting the UI Thread?

纵饮孤独 提交于 2019-12-12 06:59:49
问题 I have the following pseudo code to clarify my problem and a solution. My original posting and detailed results are on Stack Overflow at: Wait() & Sleep() Not Working As Thought. public class PixelArtSlideShow { // called with click of Menu item. create List<File> of each selected pixelArtFile for (File pixelArtFile : List<File>) { call displayFiles(pixelArtFile); TimeUnits.SECONDS.sleep(5); } } public static void displayFiles(File pixelArtFile) { for (loop array rows) for (loop array columns

Subclassing a JavaFX Application

你。 提交于 2019-12-12 06:09:22
问题 This question is a follow up to a question I posted asking How do you call a subclass method from a superclass in Java?. Well I got my answer but my SuperClass is a JavaFX application that extends Application and whenever I attempt to use an abstract class as my application class I get the following error: java.lang.reflect.InvocationTargetException in the constructor. Even if the application class is not abstract I get that error if I attempt to call new SubClass().create("title"); . What I

How to get length of path?

旧街凉风 提交于 2019-12-12 05:40:40
问题 I want to know the length of a Path . For example, if I have a straight line I can just compute the length with its start x , y and end x , y values. But it gets quickly very tricky if I use QuadCurves or CubicCurves . Is there any way to get the length or an approximation of the length of a Path ? For example the following path: Path path = new Path(); MoveTo moveTo = new MoveTo(start.getX(), start.getY()); double controlPointX = 50; CubicCurveTo cubicCurveTo = new CubicCurveTo(start.getX()

Efficiently updating lines/markers on top of a JavaFX chart

不想你离开。 提交于 2019-12-12 05:36:31
问题 I use a JavaFX LineChart which takes nearly a second to be rendered and I want to move a vertical marker (cursor position) over this chart which is updated very frequently. I tested the following solutions: Adding a line in a JavaFX chart How to add a value marker to JavaFX chart? However, these solutions are not made for frequent marker updates on big charts. Whenever a marker changes the whole chart is redrawn. How can I prevent Java from redrawing the whole chart when the marker gets

JavaFX - edit or parse FX-CSS file programmatically

两盒软妹~` 提交于 2019-12-12 05:25:59
问题 I am using JavaFX 8u60. I want to give my users the chance to edit a CSS file for a pane in my program, without using an external editor. For example, the user clicks on a Label, and a dialog to select the color is shown. After the user selects the color, the color is actually written in the CSS file, in the appropriate line... Are there CSS parsers for JavaFX? I can't show you any Java code because I'm not sure this can be done. .table-view .column-header .label{ -fx-font: 18 GatwickSans;