javafx-8

FXML Custom Chart

只愿长相守 提交于 2019-12-13 02:56:10
问题 I've been using custom fitting chart from Ensemble Test, which works great. Problem is I cannot use it in FXML. Someone else seemed to do that successfully. Error: Instances of curvefittedareachartappfxml.CurvedFittedAreaChart cannot be created by FXML Loader. FXMLDocument.fxml <?import javafx.scene.chart.*?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <?import curvefittedareachartappfxml

Effect chaining - CSS Equivalent for effect.setInput in javafx

我的梦境 提交于 2019-12-13 02:33:23
问题 I need to apply multiple effects ( mainly innershadow and dropshadow ) through CSS. But I'm not able to chain these effects. Is there CSS equivalent for setInput() of javafx.scene.effect.Effect? So far I found only this link. It indicates something about fixes but no details about how to use chaining. EDIT : Further explanation if question is not clear: to apply effect through css, -fx-effect is used. I need to apply multiple effects to same node. How to "chain" these effects in CSS? This can

JavaFx: check if the mouse is on node's children

房东的猫 提交于 2019-12-13 02:24:11
问题 I would like to know if there is a way to determine if the mouse collides with a node's children, in less words, In the example below, If I click on the Group the output is: "Group!" If I click on the image the output is: "Group! Image!" Is there a way to put code in the "group.setOnMousePressed" in order to check if the mouse in on the image and in that case don't do anything and just execute what is in the "group.setOnMousePressed", in order to have this output clicking on image: "Image!"

JavaFX FlowPane Autosize

守給你的承諾、 提交于 2019-12-13 02:20:08
问题 The problem I'm having is that the FlowPane is leaving a lot of excess space, it could possibly be the Popup, although I think the popup size is the content size. For the sake of debugging I've wrapped the text in a BorderPane to show the bounds of the text. The component I'm focusing on is the error popup. CSS .warning-popup { -fx-padding: 10px; -fx-hgap: 10px; -fx-vgap: 10px; -fx-background-color: #704745; -fx-border-color: #C8C8C8; -fx-background-radius: 2px; -fx-border-radius: 2px; }

Switch between tabs in tabpane

扶醉桌前 提交于 2019-12-13 02:19:56
问题 Is it possible to switch between tabs in tab pane with delay in JavaFX? For example I want to when I change selection tab to tab2 I see a transition on the tab that is selected and then tab2 will be shown . 回答1: I think you can use the existing TabPane , but you'll need to manage the tab content yourself; just switch the tab content for the selected tab with a change listener. import java.util.HashMap; import java.util.Map; import javafx.animation.ScaleTransition; import javafx.animation

JDK 8 update 66 fatal error for JavaFx application on Windows 10

懵懂的女人 提交于 2019-12-13 02:17:27
问题 I'm making a JavaFx app. Today I integrated a login panel and a registration panel to it. After integrating those, I started getting a fatal error whenever I ran the app which didn't happen earlier. The log of the error is as follows: A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x000007feec5d5c01, pid=5552, tid=4252 JRE version: Java(TM) SE Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17) Java VM: Java HotSpot(TM) 64

JavaFX LineChart as a cell in TreeTableView

天大地大妈咪最大 提交于 2019-12-13 01:53:42
问题 First, I'm familiar with Java and Swing but am new to FX, and working in FX8. I'm trying to put a JavaFX LineChart as a cell in a TreeTableView. I've gathered that I need to use setCellFactory on the column that will show the graph, and I'm defining a custom version of TreeTableCell as follows public class SparklineCell<T> extends TreeTableCell<T,Series> { private LineChart getEmptyLineChart() { final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); final

Why I can't build jar in Maven

大兔子大兔子 提交于 2019-12-12 21:04:16
问题 Already I checked all the advice about similar problems. Nothing works. Maybe someone has an idea of what the problem is? Below pom file and console with an error. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pezal2</groupId> <artifactId>pezal2</artifactId> <version>0.0.1-SNAPSHOT</version>

How to prevent TreeItem selection?

人走茶凉 提交于 2019-12-12 20:59:37
问题 I'm working with a TreeTableView ( JavaFX 8 ). There are some tree nodes, which have to be disabled for selection. I had tried the selection event, but it doesn't work. Please find the below code for more information. treeTableView.getSelectionModel().selectedItemProperty().addListener( (observable, oldValue, newValue) -> { // utility node if(newValue.getValue() instanceof UtilityRoot ) { return; } } ); How can I prevent some TreeItems from any mouse and keyboard selection? 回答1: What you try

Javafx: ListView disable a specified element of the list

浪子不回头ぞ 提交于 2019-12-12 20:38:31
问题 I have a ListView<String> and I want to disable one specified element of the list, to become unselectable for the user. Is there a way to disable just one specified element for selection? 回答1: Thanks to @user1803551 and @James_D i could solve the problem, here is the sollution: listView.setCellFactory(new Callback<ListView<String>, ListCell<String>>() { @Override public ListCell<String> call(ListView<String> param) { return new ListCell<String>() { @Override protected void updateItem(String