javafx-8

Showing texts over the face of a Box based on the visible area on zooming in/out

偶尔善良 提交于 2019-12-06 08:55:45
问题 I have a sample 3D application (built by taking reference from the Javafx sample 3DViewer) which has a table created by laying out Boxes and Panes: The table is centered wrt (0,0,0) coordinates and camera is at -z position initially. It has the zoom-in/out based on the camera z position from the object. On zooming in/out the object's boundsInParent increases/decreases i.e. area of the face increases/decreases. So the idea is to put more text when we have more area (always confining within the

Charts: How to correlate colors between charts?

断了今生、忘了曾经 提交于 2019-12-06 08:29:50
问题 Below is an example that has two charts visualizing the same set of data while the data are the same, their sequence differs (in rw code that would happen dynamically) Goal: show the same data with the same colors in both charts By default, colors are applied by sequence of addition of the data. Can't find any api to change those colors - most probably I'm missing something obvious, what is it? import java.util.List; import java.util.function.Supplier; import java.util.stream.Collector;

javafx-TableView as combobox popup (Tried and able to achieve partially. need help further)

你。 提交于 2019-12-06 08:15:47
What i need: Need an editable combobox which filters the data on the popup upon typing and first matching item should be highlighted and should set as the text in the combo upon pressing enter. The popup should be a tableview with 2 or 3 columns. (screen shot attached.)(in the image it is a textfield but i prefer combo so that if the user is not sure about the values, he can click the combo button and see the entire list and select one.) I will be binding some data as a source to the tableview which should act as the popup for the combobox. I know i should go for a custom control but dont know

JavaFX popup hidden when stage is in fullscreen mode

隐身守侯 提交于 2019-12-06 07:55:53
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 improperly? I am using java version 1.8.0_20 on CentOS 6.5 with Gnome. Here is my SSCCE: import javafx

TreeItem selection width in a TreeView

你说的曾经没有我的故事 提交于 2019-12-06 07:42:19
问题 I'm using JavaFX 8 and I'm currently doing some GUI developments. I have a little problem with my TreeView and I need your help. Do you know if it is possible, in a TreeView, to select just the label and not the whole width of the TreeCell ? I mean (Netbeans example) : Instead of : Thank you in advance. 回答1: Please try adding a Label inside TreeCell. for example: private static class YourItemCell extends TreeCell<YourItem> { Label label; public YourItemCell() { label = new Label(); }

Create a framework type column header for select all in JavaFX 8

社会主义新天地 提交于 2019-12-06 07:33:17
问题 I am looking to create a custom TableColumn which is a CheckBox control which represents if the row is selected or not. We don't want to use the standard SHIFT or CONTROL + CLICK to handle this as users tend to click inadvertantly and lose their selection. What I would like to do is the following: In this case the column should not be part of the underlying data model, and simply represent what is selected or not. It shouldn't be dependent on the data model in any way. If the user selects the

Java FX 8 - Tableview Display Objects Within Objects

好久不见. 提交于 2019-12-06 07:32:52
问题 I'm trying to load a Tableview component from a list of Objects, in my case client objects. A client object contains an Address Object and Vice Versa. The Client and Address object are defined as follows; public class Client{ private String firstName; private String lastName; private String emailAddress; private String phoneNumber; private Address clientsAddress; public Client(){ //blah blah } //getters ... //setters ... } public class Address{ //address lines + county private String a1;

JavaFX : Consuming REST service and displaying the data in front-end

一曲冷凌霜 提交于 2019-12-06 07:09:31
问题 I am working on a JavaFX(On JDK8 with SceneBuilder) project which should connect with a Spring-MVC based server and I would like to access some Objects from the server and display it. I have already programmed the Spring server to give back the desired object upon request, but my unfamiliarity in UI programming and JavaFX is making it a bit difficult. In the FXML file, I already have added a grid-pane and I would like to display the objects there. I would appreciate any help from you guys to

TableView, setting editable cells

梦想与她 提交于 2019-12-06 06:31:46
问题 I try to make Table cells editable. I managed to do this with two Collumns that have String values in it, but I cant make this with columns that represent Integer values. Places with X is where compiler get the error: The method setCellFactory(Callback<TableColumn<DataModel,Integer>,TableCell<DataModel,Integer>>) in the type TableColumn<DataModel,Integer> is not applicable for the arguments (Callback<TableColumn<DataModel,String>,TableCell<DataModel,String>>) and places with XX is where

How to show Image as tooltip in JavaFX?

↘锁芯ラ 提交于 2019-12-06 06:27:58
I would like to show an image as a tooltip. It works OK but at some random points it shows fluctuation. I want to show it normally without getting fluctuate. I show a new scene (in which i added my image-view with image) on mouse enter event and close it on mouse leave event event // MOUSE ENTER PHOTO CORRECTIO @FXML private void mouseEnterPhotoCorrection(MouseEvent event) { if (f_ShowToolTip) { Stage stg = funShowImageTooltip(); double x, y; x = event.getScreenX(); y = event.getScreenY(); stg.setX(x); stg.setY(y); stg.show(); f_ShowToolTip = false; } } // MOUSE LEAVE PHOTO CORRECTIO @FXML