javafx-8

How to set tab name size in JavaFX

风格不统一 提交于 2019-12-06 12:33:37
I have this simple tabs example: primaryStage.setTitle("Tabs Test"); Group root = new Group(); Scene scene = new Scene(root, 600, 500, Color.WHITE); TabPane tabPane = new TabPane(); BorderPane mainPane = new BorderPane(); //Create Tabs Tab tabA = new Tab(); tabA.setText("Main Component"); tabA.setClosable(false); // da se mahne opciqta da se zatvarq tab //Add something in Tab StackPane tabA_stack = new StackPane(); tabA_stack.setAlignment(Pos.CENTER); tabA_stack.getChildren().add(accordion); // dobavq se tuka accordion tabA.setContent(tabA_stack); tabPane.getTabs().add(tabA); Tab tabB = new

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

泪湿孤枕 提交于 2019-12-06 12:04:44
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.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx

Customize ControlsFX Notifications

若如初见. 提交于 2019-12-06 11:52:25
I want to use ControlsFX Notifications class, as JavaFX seems to doesn't offer anything like it (or does it?). For me to use it I want to be able to customize the color of the notification and some other styles. Does anybody have an idea of how I can do that? Edit: Through setting Notifications.owner(...) the notification is styled the same way as my main application, but it is then shown within the main application as well and not at the bottom right corner of my screen. Notifications.create().title(...).text(..).action(...).position(Pos.BOTTOM_RIGHT).show(); Through using this line in Java

What is use of getNormals() method in TriangleMesh JavaFX

和自甴很熟 提交于 2019-12-06 10:55:09
问题 I am currently working of JavaFX 3D application and come across getNormals() method in TriangleMesh class. As in TriangleMesh class is used to create user defined Java FX 3D obejct and in that getPoints() is used to add Points getFaces() is used to add Faces getTexCoords() is used to manage Texture of 3D Object, but I am not sure what is use of getNormals() method in TriangleMesh class. In TriangleMesh class, we can set vertex format to VertexFormat.POINT_TEXCOORD and VertexFormat.POINT

Equivalent to JGraph for JavaFX8?

时光毁灭记忆、已成空白 提交于 2019-12-06 10:19:10
I want to port an old swing tool which uses an also old version of JGraph to JavaFX8. However, since JGraph is a Swing-Based library, is thought about replacing it, too. So, is there something equivalent to JGraph, but working with JavaFX8? So, is there something equivalent to JGraph, but working with JavaFX8? Following Jonathan Giles Blog , I can't remember having read anything about a JavaFX based graph library yet -> so, most likely, no But you should be able to use Swing controls in JavaFX: https://docs.oracle.com/javase/8/javafx/api/javafx/embed/swing/SwingNode.html 来源: https:/

Styling button in javaFX using CSS

蓝咒 提交于 2019-12-06 10:16:20
I have a problem with styling button in javaFX using CSS. I use Intellij Idea IDE. I have CSS.css file : #Button { -fx-padding: 8 15 15 15; -fx-background-insets: 0,0 0 5 0, 0 0 6 0, 0 0 7 0; -fx-background-radius: 8; -fx-background-color: linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12 100%), #9d4024, #d86e3a, radial-gradient(center 50% 50%, radius 100%, #d86e3a, #c54e2c); -fx-effect: dropshadow( gaussian , rgba(0,0,0,0.75) , 4,0,0,1 ); -fx-font-weight: bold; -fx-font-size: 1.1em; } #Button:hover { -fx-background-color: linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12

Eclipse/java9-jigsaw: how to access javafx packages?

对着背影说爱祢 提交于 2019-12-06 09:38:16
My context: 9-ea-113 (that is javafx now fully modularized, without jfrt.jar) eclipse-neon-M6 with the current beta support for java9 (running on java8, if that matters) win7 Something simple like import javafx.application.Application; public class FirstApplication extends Application { // } doesn't compile because the javafx.xx packages are not found. What to do? Edit the .classpath file of the project and add the entry below - seems to work. <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">

How to retrieve the final Slider value when snapToTicks==true?

做~自己de王妃 提交于 2019-12-06 09:33:00
I have the following JavaFX scene (note the setting of snapToTicks ): package com.example.javafx; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.stage.Stage; public class SliderExample extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { Slider slider = new Slider(0.25, 2.0, 1.0); slider.setShowTickLabels(true); slider.setShowTickMarks(true); slider.setMajorTickUnit(0.25); slider.setMinorTickCount(0); slider.setSnapToTicks(true); // !!!!!!!!!! Scene

javafx parameters in command prompt gives null values

会有一股神秘感。 提交于 2019-12-06 09:23:13
Goodevening everyone, This might be a silly question but I seem to struggle finding an answer to it. I've created a simple JavaFX8 program that should be able to read command line arguments. Let me illustrate: public void start(Stage stage) throws Exception { Map parameters = getParameters().getNamed(); System.out.println("parameter is " + parameters.get("myKey")); ... } When I define a parameter named myKey in NetBeans with value abc , it results in the following output when I run my application from the IDE: parameter is abc However, if I run it from the command prompt as following: java

Scrollpane line chart with fixed view y axis JavaFX

我们两清 提交于 2019-12-06 09:05:04
问题 I'm trying to make a scrollable chart where the Y-axis stays in view regardless of the cursor position in the scrollbar (by default since the Y-axis informations is at the end of the view, you would only see it after you scroll enough to see the end) Here is an example what Im trying to accomplish: Notice that even though the scrollbar position is midway-through, the Y-axis text(price) still remains in view I looked around the web and was only able to find a single example of something