Determing JavaFX Chart Size using FXML

Hello Guys,
I'm working on a value marker for a line chart in JavaFX 2.2. I therefore used the answer on an existing question on stackoverflow and the example by Sergey Grinev is working fine. However, if I want to use FXML to add a chart instead of adding it hardcoded I have problems determing the size of the chart's background.
I moved the initialization of the chart and the valueMarker to the initialize() method which the FXMLLoader automatically calls after the root element has been processed (see the note in the JavaFX Documentation). But if I now use the following code to determine the size of the chart's background it returns just 0.0 for every bound value:
Node chartArea = chart.lookup(".chart-plot-background");
Bounds chartAreaBounds = chartArea.localToScene(chartArea.getBoundsInLocal());
The exact same code in the updateMarker() method returns the determined size of the chart's background on the second call. On the first call the bounds are set, but minX isn't correct. Here is my code:
public class LineChartValueMarker extends Application {
   @FXML
   private LineChart<Number, Number> chart;
   @FXML
   private Line valueMarker;
   @FXML
   private NumberAxis yAxis;
   private XYChart.Series<Number, Number> series = new XYChart.Series<>();
   private void updateMarker() {
   Node chartArea = chart.lookup(".chart-plot-background");
   Bounds chartAreaBounds = chartArea.localToScene(chartArea
   .getBoundsInLocal());
   // SIZE OF THE CHART IS DETERMINED
   System.out.println(chartAreaBounds);
  valueMarker.setStartX(chartAreaBounds.getMinX());
  valueMarker.setEndX(chartAreaBounds.getMaxX());
   public void initialize() {
  series.getData().add(new XYChart.Data(0, 0));
  series.getData().add(new XYChart.Data(10, 20));
  chart.getData().addAll(series);
   // add new value on mouseclick for testing
  chart.setOnMouseClicked(new EventHandler<MouseEvent>() {
   @Override
   public void handle(MouseEvent t) {
  series.getData().add(
   new XYChart.Data(series.getData().size() * 10,
   30 + 50 * new Random().nextDouble()));
  updateMarker();
   // find chart area Node
   Node chartArea = chart.lookup(".chart-plot-background");
   Bounds chartAreaBounds = chartArea.localToScene(chartArea
   .getBoundsInLocal());
   // SIZE AND POSITION OF THE CHART IS 0.0
   System.out.println(chartAreaBounds);
   @Override
   public void start(Stage stage) throws IOException {
   FXMLLoader loader = new FXMLLoader();
   InputStream in = this.getClass().getResourceAsStream(
   "LineChartValueMarker.fxml");
  loader.setBuilderFactory(new JavaFXBuilderFactory());
  loader.setLocation(this.getClass().getResource(
   "LineChartValueMarker.fxml"));
   Pane pane = (Pane) loader.load(in);
   Scene scene = new Scene(pane);
  stage.setScene(scene);
  stage.show();
   public static void main(String[] args) {
  launch();
I added upper case comments on the position in the code where I print the bounds (and I removed the update of the Y coordinate of the valueMarker). Here is the output:
BoundingBox [minX:0.0, minY:0.0, minZ:0.0, width:0.0, height:0.0, depth:0.0, maxX:0.0, maxY:0.0, maxZ:0.0]
BoundingBox [minX:45.0, minY:15.0, minZ:0.0, width:441.0, height:318.0, depth:0.0, maxX:486.0, maxY:333.0, maxZ:0.0]
BoundingBox [minX:37.0, minY:15.0, minZ:0.0, width:449.0, height:318.0, depth:0.0, maxX:486.0, maxY:333.0, maxZ:0.0]
The first output line comes from the initialize() method, the second line from the first call of updateMarker() (first mouseclick on the graph) and the third line from the second call of updateMarker() (second mouseclick on the graph) which finally returns the correct bound values of the chart's background.
Now my question: How or when can I determine the correct size of the chart's background (best in the initialize() method)? I hope there's someone who can help, because I have no explanation for this behavior. Thank you!

Thanks! Yes, indeed, that would work in that scenario. Although, I see now that I have to add more complexity in that I want to display multiple logical series. In other words, using the above as one logical series.  So, what I did was this:
<...more code above here...>
chart.setData(chartDataList);
List<String> chartSeriesList = new ArrayList<String>();
for (int i = 0; i < chartDataList.size(); i++) {
    Series<Number, Number> s = chartDataList.get(i);
    String seriesName = s.getName();
    if (!chartSeriesList.contains(seriesName)) {
        chartSeriesList.add(seriesName);
    s.getNode().getStyleClass()
        .removeAll("default-color0", "default-color1",
                    "default-color2", "default-color3",
                    "default-color4", "default-color5",
                    "default-color6", "default-color7");
for (int i = 0; i < chartSeriesList.size(); i++) {
    String name = chartSeriesList.get(i);
    for (int j = 0; j < chartDataList.size(); j++) {
    Series<Number, Number> s = chartDataList.get(j);
        if (s.getName().equals(name)) {
            s.getNode().getStyleClass().add("default-color" + (i % 8));
            logger.debug("j="+j+", i="+i+", name="+s.getName() + ", default-color"+(i % 8));
This works well to set all of the chart lines to the same color for a set of data series with the same name. However, now the dilemma is that the color of the chart line symbols don't match the lines.
How can I coordinate the color of the symbols in the same manner?
Message was edited by: 9686a1cf-675c-473c-8e15-7b5b929ef004

Similar Messages

  • JavaFX Visual GUI Builder - not using FXML - only based on pure Java

    The decision to provide a pure Java based JavaFX API activates the pure Java people who where FXML resistent in the past.
    JavaFX is the future ... the last few month when I check the new possibilities I came slowly but surely to this opinion...
    The Scene Build is still based on FXML. So ... for the pure Java developer there is no advantage to use it ... only to see what components are available in the JavaFX standard I see no advantage for me to use it. I won't create JavaFX clients based on FXML.
    What's the future plan...is there a Project in the World who want to provide a Visual GUI Builder who produce pure Java based JavaFX Code like Eclipse Window Builder do it for Swing or SWT or JBuilder for Swing many years ago.
    That's the main reason that JavaFX get successful in the future. A software architect who has to decide using JavaFX as the new Company Standard...will never do it without stomachache.
    Do I miss some news?
    Is there are NetBeans Version who can do it or a plugin I don't now?
    Edited by: 984992 on 30.01.2013 14:24
    Edited by: 984992 on 30.01.2013 14:30

    I don't think you are getting it, or just making a big deal about it.
    Currently SceneBuilder is connected to Netbeans using the FXML. It's not hard at all, nor is there a big issue. In the next few years Scenebuilder will be in Netbeans integrated, so it will be just like the swing gui builder. FX is still new, from a scripting lang, to a super powerful lang. FXML uses so little code.... Also you can do things either with, or without FXML, FXML IS NOT NEEDED IN FX AT ALL, only limited on Scene Builder.
    This is the FXML I am using for a dice game I am creating. Not much at all.
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.collections.*?>
    <?import javafx.scene.chart.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.image.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <BorderPane fx:id="border" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="785.0" prefWidth="1518.0" xmlns:fx="http://javafx.com/fxml" fx:controller="ZonkController">
    <left>
    <AnchorPane minHeight="86.0" minWidth="62.0" prefHeight="390.0" prefWidth="768.0">
    <children>
    <Button fx:id="button" layoutX="126.0" layoutY="90.0" onAction="#handleButtonAction" text="Click Me!" />
    <Pane fx:id="pane" layoutX="737.0" prefHeight="390.0" prefWidth="211.0" />
    </children>
    </AnchorPane>
    </left>
    <right>
    <AnchorPane prefHeight="386.0" prefWidth="460.0">
    <children>
    <BarChart fx:id="barChart" layoutX="7.0" layoutY="-10.0" prefWidth="460.0">
    <xAxis>
    <CategoryAxis fx:id="names" side="BOTTOM" />
    </xAxis>
    <yAxis>
    <NumberAxis fx:id="scores" side="LEFT" />
    </yAxis>
    </BarChart>
    </children>
    </AnchorPane>
    </right>
    <top>
    <ImageView fx:id="iv" fitHeight="394.24998969072755" fitWidth="525.6666641235352" pickOnBounds="true" preserveRatio="true" BorderPane.alignment="TOP_CENTER" />
    </top>
    </BorderPane>
    It is all codecompleted like a class normally would, so there is nothing to worry about :)
    .CSS isn't hard either.

  • Not able to access javaFx charts from a remote system after using ext. jars

    We are facing following issue. Any recommendations to resolve these issues are highly appreciated.
    1. Not able to access javaFx charts from a remote system (More details at the end of mail).This is high priority requirement as we have a web based reporting application and users access it over our static IP address.
    We are using Java Fx charts in our web application where we built jnlp and jar files in a separate fx project and kept jar and jnlp’s inside our web project.
    It is working fine when we did not used any external jar files and remotely it is accessible. But when we used external jars our project is running on local
    system but remotely it is not working due to some path settings. We modified jnlp files where entry of jar files exists and modified the jar path as per our
    project. But still it did not work.
    Before using external jars inside our java fx project my jnlp looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8083/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/F%3A/New+FX+Projects+08-12-
    2009/JavaFXApplication3/dist/" href="JavaFXApplication3.jnlp">
    <information>
    <title>JavaFXApplication3</title>
    <vendor>Saurabh</vendor>
    <homepage href="http://localhost:8083/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/F%3A/New+FX+Projects+08-12-
    2009/JavaFXApplication3/dist/"/>
    <description>JavaFXApplication3</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="JavaFXApplication3.jar" main="true"/>
    </resources>
    <application-desc main-class="com.sun.javafx.runtime.main.Main">
    <argument>MainJavaFXScript=misc.Test</argument>
    </application-desc>
    <update check="background">
    </jnlp>
    After modifying my jnlp as per my project as
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="/PiFx/FxFiles/" href="JavaFXApplication3_browser.jnlp">
    <information>
    <title>JavaFXApplication3</title>
    <vendor>Saurabh</vendor>
    <homepage href="/PiFx/FxFiles/"/>
    <description>JavaFXApplication3</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="/PiFx/FxFiles/javafx-rt.jnlp"/>
    <jar href="/PiFx/FxFiles/JavaFXApplication3.jar" main="true"/>
    </resources>
    <applet-desc name="JavaFXApplication3" main-class="com.sun.javafx.runtime.adapter.Applet" width="500" height="500">
    <param name="MainJavaFXScript" value="misc.MyChart">
    </applet-desc>
    <update check="background">
    </jnlp>
    After adding external jars my jnlp looks like this :
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8083/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/F%3A/New+FX+Projects+08-12-
    2009/JavaFXApplication3/dist/" href="JavaFXApplication3.jnlp">
    <information>
    <title>JavaFXApplication3</title>
    <vendor>Saurabh</vendor>
    <homepage href="http://localhost:8083/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/F%3A/New+FX+Projects+08-12-
    2009/JavaFXApplication3/dist/"/>
    <description>JavaFXApplication3</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="JavaFXApplication3.jar" main="true"/>
    <jar href="lib/jdom.jar"/>
    </resources>
    <application-desc main-class="com.sun.javafx.runtime.main.Main">
    <argument>MainJavaFXScript=misc.Test</argument>
    </application-desc>
    <update check="background">
    </jnlp>
    I have modified the jnlp as per my project :
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="/PiFx/FxFiles/" href="JavaFXApplication3_browser.jnlp">
    <information>
    <title>JavaFXApplication3</title>
    <vendor>Saurabh</vendor>
    <homepage href="/PiFx/FxFiles/"/>
    <description>JavaFXApplication3</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="/PiFx/FxFiles/javafx-rt.jnlp"/>
    <jar href="/PiFx/FxFiles/JavaFXApplication3.jar" main="true"/>
    <jar href="/PiFx/FxFiles/lib/jdom.jar"/>
    </resources>
    <applet-desc name="JavaFXApplication3" main-class="com.sun.javafx.runtime.adapter.Applet" width="500" height="500">
    <param name="MainJavaFXScript" value="misc.MyChart">
    </applet-desc>
    <update check="background">
    </jnlp>
    where PiFx is our project Name

    We have tried few things given in thread : http://forums.sun.com/thread.jspa?threadID=5401999
    Now it is not able to get the external jar file only
    exception: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar.
    java.io.IOException: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar
         at com.sun.deploy.net.DownloadEngine.getCachedResourceFilePath(Unknown Source)
         at com.sun.javaws.LaunchDownload.getSignedJNLPFile(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDescHelper(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDesc(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.io.IOException: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar
    exception: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar.
    java.io.IOException: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar
         at com.sun.deploy.net.DownloadEngine.getCachedResourceFilePath(Unknown Source)
         at com.sun.javaws.LaunchDownload.getSignedJNLPFile(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDescHelper(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDesc(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.io.IOException: Cannot find cached resource for URL: http://192.168.0.111:8086/PiFx/FxFiles/lib/jdom.jar
    JavaFXApplication3.jnlp
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="/PiFx/FxFiles/" href="JavaFXApplication3.jnlp">
        <information>
            <title>JavaFXApplication3</title>
            <vendor>Saurabh</vendor>
            <homepage href="/PiFx/FxFiles/"/>
            <description>JavaFXApplication3</description>
            <offline-allowed/>
            <shortcut>
                <desktop/>
            </shortcut>
        </information>
        <resources>
            <j2se version="1.5+"/>
            <extension name="JavaFX Runtime" href="/PiFx/FxFiles/javafx-rt.jnlp"/>
            <jar href="/PiFx/FxFiles/JavaFXApplication3.jar" main="true"/>
            <jar href="/PiFx/FxFiles/lib/jdom.jar" main="true" />
        </resources>
        <application-desc main-class="com.sun.javafx.runtime.main.Main">
            <argument>MainJavaFXScript=misc.MyChart</argument>
        </application-desc>
        <update check="background">
    </jnlp>JavaFXApplication3_browser.jnlp
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="/PiFx/FxFiles/" href="JavaFXApplication3_browser.jnlp">
        <information>
            <title>JavaFXApplication3</title>
            <vendor>Saurabh</vendor>
            <homepage href="/PiFx/FxFiles/"/>
            <description>JavaFXApplication3</description>
            <offline-allowed/>
            <shortcut>
                <desktop/>
            </shortcut>
        </information>
        <resources>
            <j2se version="1.5+"/>
            <extension name="JavaFX Runtime" href="/PiFx/FxFiles/javafx-rt.jnlp"/>
           <jar href="/PiFx/FxFiles/JavaFXApplication3.jar"  main="true"/>
            <jar href="/PiFx/FxFiles/lib/jdom.jar" main="true"/>
        </resources>
        <applet-desc name="JavaFXApplication3" main-class="com.sun.javafx.runtime.adapter.Applet" width="500" height="500">
            <param name="MainJavaFXScript" value="misc.MyChart">
        </applet-desc>
        <update check="background">
    </jnlp>Applet Code
    javafx({
    archive: "../FxFiles/JavaFXApplication3.jar",
    draggable: true,
    height:hgt,
    width:wdt,
    code: "misc.MyChart",
    name: appletName,
    id: appletName
    });

  • Builiding animations using FXML or the Scene Builder in javaFX

    please i wanna know if its possible building user interfaces with dynamic nodes or animations using FXML or the Scenebuilder in JavaFX
    Elikem.

    HI,
    Currently SceneBuilder is still a baby v.1.x You can only create nodes and make some graphical , layout, stylesheets changes on them. The animation can't be done from the FXML so Scenebuilders dont have these concepts. You will need to have hard code for this. But I still think SceneBuilder is far more Flexible,fast and easy to build javafx application.
    Thanks
    Narayan

  • Modularizing large FX gui apps, esp. using fxml developed by Scene Builder

    StarterApp - One large java source file.
    Trying Out the JavaFX UI Controls (Using the JavaFX UI Controls)
    StageCoach is a simpler app, but with fxml, controller, and main code in separate files.
    Allows manipulation using Scene Builder.
    https://code.google.com/p/jfxtras/source/browse/ProJavaFX/Chapter03/StageCoach?repo=samples&r=322042d9ac293fcd9dd8f63e1664df45a0c4746f
    I was lead to these by the book, Pro JavaFX 8:
    http://www.apress.com/9781430265740
    Rich as it is, the StartApp is one big piece of code, with no modules such as an fxml file.
    By spreading out the code for StarterApp and StageCoach and studying it carefully
    I should be able to build a system as large as StarterApp, but as a three-file combo.
    StarterApp has nothing that deals with concurrency or persistence - those will be my jobs.
    I'm doing this because I'm building a large NLP app.
    It needs a GUI for future users.
    - Bob F

    Take a look at some app examples from the open-jfx repository
      https://wiki.openjdk.java.net/display/OpenJFX/Quick+Start
    For a smallish app, see the ConferenceScheduleApp:
       openjfx/8u-dev/rt: 3d138300d935 /apps/experiments/ConferenceScheduleApp/
    For a (much) larger app, see SceneBuilder:
       http://hg.openjdk.java.net/openjfx/8u-dev/rt/file/3d138300d935/apps/scenebuilder
       Ladstatt: Home made JavaFX SceneBuilder
    For a minimal framework which features FXML and dependency injection, see afterburner.fx:
       http://afterburner.adam-bien.com
    You can skip all of the stuff below if you don't like reading and just want to go code...
    In general for app code, use aggregation over inheritance in most places, though inheritance is useful sometimes.  Don't try to create your own controls by extending the Control class unless you are writing control libraries - that is complex and not well documented as well as largely unnecessary for app code.  Similarly PopupWindow isn't all that great or at least I have never found a need for it in app code - a basic Stage works fine for pretty much every case except perhaps very specialized things like context menus.  Java 8 has built-in dialogs and alerts in 8u40, so for standard dialogs or some reasonably customized dialogs, using those is better than creating your own.  If the standard controls aren't enough, try ControlsFX, it is (mainly) great and high quality.
    Let resizable layout managers do the layout work for you and use constraints in the layout managers and nodes rather than mucking around with fixed sized layouts or layout through binding.
    Don't try to implement a spreadsheet in a JavaFX TableView - just use the built-in controls for what they are good at and either develop a new control for specific functionality not provided by the built-in controls or just skip that feature if it would be too expensive to build it from scratch yourself (and it probably will be expensive - you just have to justify that against your project budget whether that is money or your own time).
    Make use of WebView to bring in web components (e.g. Google Docs or Google Maps).  Don't try and pass a lot of data back and forth between a WebView and your app.
    Don't do any style in code nor in FXML, put it all in a CSS style sheet.
    For medium sized apps - use FXML to design and mark-up your GUI, and use SceneBuilder to create and edit the FXML, don't hand code basic form style UIs - in the long run the FXML based app will be easier to maintain.
    For really small apps and learning tasks, write everything in code against the API so you understand that - use no FXML at all.
    With JavaFX you are writing user interfaces, follow basic user interface design heuristics for which there are some principles to keep in mind.
    Once you have a few FXML pages, passing parameters or sharing data between them is a question that most people run into as well as how to deal with navigation.  That navigation framework I linked is super basic and just meant for pretty simple applications.  A nicer framework which worked in general like a Browser navigation model would be useful - but I haven't seen a generic implementation of such a thing yet - I guess you could create one, but I definitely wouldn't start out trying to do that - instead focus on the basics of your application and get that implemented first.  If you end up needing a reasonably sophisticated navigation framework, eventually you will know it and can evaluate what to do then.
    You can do an awful lot with CSS and styling the built-in controls.  It really is very flexible.  Learn CSS and the JavaFX variant by reading general CSS tutorials (then forget everything HTML specific) and study in depth the JavaFX CSS reference guide and understand its extensions like looked up colors and derivation functions.  When you want to know how some inbuilt thing is styled, go to the modena.css source (which can be hideously obtuse and complicated).  Use ScenicView and SceneBuilder CSS analyzer to understand how CSS is applied to elements.  Don't style borders with boxes - use layered backgrounds, that is how every control modena.css works and how your app should also work.
    Deployment is a difficult topic - so sad and depressing.  For development, just build and run in your IDE.  For production, package the app as a self-contained application. Maybe one day there will be a better deployment model for JavaFX - but that is the best you can get for now.  Completely ignore webstart and web deployment models - any time spent investigating such technologies is completely wasted.
    Do not try to integrate JavaFX and Swing or SWT.  Just write pure JavaFX apps.
    For larger apps you intend to deploy to production, use Maven or Gradle as your build system (you can google the JavaFX plugins for each).  Do not spend any time with the stand-alone JavaFX packager or the JavaFX ant tasks and do not rely on your IDE to do your production builds.
    Get help to targeted questions on StackOverflow.
    Only code to Java 8+ and make use of functional programming techniques.
    Don't write multi-threaded apps unless you know what you are doing.  When you do write multi-threaded apps, use the JavaFX concurrency utilities.  Never modify the active scene graph from another thread, nor touch a property which might trigger an event which might modify the scene graph.  Do use the concurrency utilities if you have network I/O otherwise you will freeze your app while the network I/O occurs and that is a "bad thing".
    The Oracle JavaFX 8 documentation is good - read it and run a lot of the examples (except the ant based deployment ones and the Swing/SWT integration ones).
    Ensemble is great, play with it and study the code to see for the samples (which you can view within Ensemble).
    Binding is programming by side-effect, so be aware that when you change a property, it may trigger some potentially unrelated action through bindings or attached listeners.
    Programming JavaFX in any language other than Java is an experimental thing, so only do that if you like experimenting and are prepared to do so without a lot of support.
    Targeting embedded devices, iOS or Android for a JavaFX app is an experimental thing, so only do that if, yada, yada, yada.
    JavaFX is a mid-level UI system, not a full application stack - it abstracts away the basics like rendering, controls and animation but does not provide comprehensive OS hooks, navigation frameworks, model/view/presenter frameworks, full dependency injection, client/server messaging, data <-> controls serialization and deserialization, etc.  FXML is just a markup system with a binding capability to Java code.  JavaFX and FXML do not constitute a full application framework.  There is no widely-used full application framework for JavaFX.  Sure some people have tried to create one, but none of those solutions have achieved critical mass of usage and features - plus a one-size fits all application framework will never exist anyway - client applications (e.g. a game versus a line-of-business app) differ greatly and deserve completely different architectures.
    There are many things in the Java EE world which can be used in JavaFX (e.g., its dependency injection, its web socket or rest APIs and implementations, its server based systems to allow your app to access cloud based logic and storage, etc) - so feel free to use the bits you need, usually it's as simple as adding additional library dependencies to your maven or gradle project.  A typical medium sized JavaFX application will include multiple third party libraries (mostly non-UI libraries) to get its job done as this will be more convenient than coding everything against the JRE API - though there is an awful lot of out the box functionality you get from the JRE.
    JavaFX is more complicated to use than Delphi and in some respects doesn't supply as much functionality in terms of built-in stuff like data base backed tables (though it supplies a ton more functionality in style).  It is not easier to create a complete business app using JavaFX than it would be to create a similar thing in Microsoft Access in the 90's.  Such is progress.
    JavaFX is portable across desktop environments (OS X, Windows, Mac).  JavaFX apps have their own look and feel which is not like the native OS, but that is probably fine for a lot of apps.  AquaFX does an amazing job of making a JavaFX app looks like OS X apps (kudos to the creators of both AquaFX and the JavaFX built-in styling capabilities).
    Unlike some other portable frameworks like QT, you don't have to write C code, you can write Java code (which to me at least is a win).  Similarly unlike HTML/CSS/JavaScript you don't have to write untyped JavaScript or make use of some obscure code snippet you pulled off the web for your button control.  You don't have to use the web framework of the day which withered yesterday.  Instead you have the (benefit?) of hardly any framework at all for JavaFX.  You don't have to have your app live within a browser sandbox that another developer once described as the ghetto of application sandboxes.
    So, as compared to HTML - I think JavaFX is kinder to the developer, though end users don't really seem to care that much and are fairly accepting of HTML applications even when their functionality is often inferior to many more traditional GUI apps.  HTML is standardized, its full of standards, even the non-standard parts.  Everybody used to implement all the standards differently or make their own standards, however now the standards are so painstakingly, nitpickingly prescriptive that everybody implements pretty much the same thing - except when they don't.  JavaFX has no standard but its public API docs, it has just one implementation.  If you code against the API, your app is probably going to work forever - at least if you bundle the runtime with your app, cause if you don't you might end up like the poor guy in the previous question who can't figure out how to update his app specific CSS rules to get his app to look the same with a newer Java version.  JavaFX is a relatively niche technology and you don't have the legion of developers, tinkerers, industry investments and people just plain getting stuff done in any which way that you have with the whole HTML juggernaut.  The major thing that HTML provides that JavaFX does not is: Sharable, browsable deep links to stuff with search indexed content.  With HTML, Google will index it and you can link to and refer to other docs and other docs can link to yours.  It is the HT in HTML which makes the web so amazing and the F in FXML doesn't match it.  What is the F anyway?
    That's a huge wall'o'text.  Just some random thoughts and opinions.  All opinions are my own.  Your opinions may vary.  That's OK.  I don't think a discussion is needed.  If you would like any clarification or further advice you can ask in new questions.

  • Hide Excel Chart Legend Using LabVIEW Report Generation Toolkit or Active

    Hello Eveyone:
    I work on the report generation toolkit in labview and creat the report in excle. I create the chart into report but I can't hide the chart legend or change the font size using report generation toolkit.
    I appriciate you guys time.
    Thanks
    Solved!
    Go to Solution.

    Howdy!
    What is the version of LabVIEW and Report Generation Toolkit you are using? Have you taken a look at the LabVIEW Example Column Graph (Excel).vi
    and looked at the help for Excel Insert Graph VI and Excel Set Graph Font?
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Report Size to fit Chart Size

    Using the dynamic width and dynamic height properties of a chart I will change the size of the chart dynamically.
    However, when exporting the chart to an image I want it to export at the chart size and not be restricted to the static size of the page.
    Any way to do this ?

    Hi St33ln,
    If I understand correctly, you want to make the size of report to fit the size of chart, so the chart can be fully displayed after export the report to an image. Based on my research, I find that PageSize property is a static value. The page size does not
    grow or shrink to accommodate the contents of the report body. If you want the report to appear on a single page, all the content within the report body must fit on the physical page.
    So in your scenario, I couldn’t find an appropriate method to make the report size automatically change to fit the chart size. This is by design. As a workaround, I suggest that you can change the size of report to an appropriate value based on the chart
    size you may select.
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Chart size does not extend with the data

    Hi,
    One of my reports has a horizontal bar and the chart size does not grow with the data. The chart displays fine if I have minimal amount of data. If the data grows, the display is bizarre, it's just messed up. Is there an option I need to set? Please provide your inputs.
    Thanks
    Arch

    Hi,
    I tried with all these options, but no success. I remember I used to get full visible charts initially. Not sure what has happened charts are getting chopped off by at least 50px right and bottom. Interestingly When I export the chart to Excel it looks perfect.
    Any suggestion. Has anyone faced this issues. I am using 11.1.1.5 version.

  • How to save JavaFX chart s as images

    how to save javafx charts as images. please help me in this.
    thanks in advance

    Here is my pie2D chart. how to svae it as image file
    Stage {
    title: "Pie Chart"
    scene: Scene {
    content: [
    PieChart {
    title: "What Is Your Favorite Pie?"
    titleFont: Font { size: 24 }
    data: [
    PieChart.Data {
    value: 21
    label: "Pumpkin"
    PieChart.Data {
    value: 33
    label: "Apple"
    PieChart.Data {
    value: 17
    label: "Cherry"
    PieChart.Data {
    value: 29
    label: "3.14159"
    }

  • How do I find, at-a-glance, the sample size used in several music files?

    How do I find, at-a-glance, the sample size used in several music files?
    Of all the fields available in a FInder Search, "Sample Size" is not available. Finder does offer a "Bits per Sample" field, but it only recognized graphic files and not music files.
    Running 10.8.5 on an iMac i5.
    I did search through a couple of communities but came up empty.
    Thank you,
    Craig

    C-squared,
    There is no View Option to allow display of a column of sample size. 
    For WAV or Apple Lossless files, it is available on the Summary tab (one song at a time, as you know).  For MP3 and AAC it is not available at all.
    You can roughly infer it from the files that are larger than expected for their time.
    99% of the music we use is at the CD standard of 16-bit, so I can guess that displaying it has never been a priority.  However, if you want to make a suggestion to Apple, use this link:
    http://www.apple.com/feedback/itunesapp.html

  • Amount of temporary tablespace size used for index rebuild

    Hi All,
    I want to know approximate amount of temporary tablespace size used for index rebuild. I need this information to avoid the insufficient temporary tablespace error during the huge index rebuild.
    Is there a query or procedure to find it out.
    Thank you.

    Hi,
    While creating the index, the temporary segment is created in the permanent tablespace. So permanent tablespace must have sufficient space.
    http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
    http://aprakash.wordpress.com/2010/01/05/numeric-segment-name/
    Anand

  • How to read text and it's font details (Family and size) using Acrobat plugin?

    Hello,
           I have query about reading PDF, I wanted to extract text and it's font details (Family and size) using Acrobat plugin. How can I achieve that?
    Any suggestions are welcome.
    Thanks
    Rohit Shinde

    Look at the samples in the SDK around PDFEdit and the PDEdit APIs.

  • Is there any way to generate Gantt chart by using oracle 9iDS?

    Is there any way to generate Gantt chart by using oracle 9i reports builder
    Can you please send me the link or more information on oracle 9iDS.
    Thanks

    Hi,
    Oracle9iDS itself doesn't support creating Gantt charts. The option oyu have is to use Oracle Graphics 6i, because there is no Graphics in 9i, and configure it to run with Oracle9i Forms. There exist a whitepaper at otn.oracle.com/products/forms that explains how to make Graphics 6i work with Forms 9i.
    Frank

  • Fetching file size using CAML query in Javascript client object model

    Hi,
    I am using the Javascript client object model to retrieve contents of a document library.
    I have a document library, which contains a folder "Folder1" . "Folder1" has a zip file. I would like to get the file size of the zip file.
    I have tried the below code, but not sure, how to fetch the file size.
    function FetchImage() {
    var clientcontext = new SP.ClientContext.get_current();
    var oweb = clientcontext.get_web();
    var olibrary = oweb.get_lists().getByTitle(DocLibrary);
    var query = new SP.CamlQuery();
    query.set_folderServerRelativeUrl("Lists/DocLibrary/folder1/");
    folder = olibrary.getItems(query);
    clientcontext.load(folder, 'Include(Title,ContentType, FileLeafRef,FileDirRef,File)');
    clientcontext.executeQueryAsync(Function.createDelegate(this, this.RenderDataOnSuccess), Function.createDelegate(this, this.RenderDataOnFailure));
    function RenderDataOnSuccess() {
    var ListEnumerator = this.folder.getEnumerator();
    while (ListEnumerator.moveNext()) {
    var currentItem = ListEnumerator.get_current();
    if (_contentType.get_name() != "Folder") {
    var File = currentItem.get_file();
    if (File != null) {
    // Fetch file size
    How to fetch the file size?
    Thanks

    <script>
    function getSize()
            var myFSO = new ActiveXObject("Scripting.FileSystemObject");
            var filepath = document.upload.file.value;
            var thefile = myFSO.getFile(filepath);
            var size = thefile.size;
            alert(size + " bytes");
    </script>
    http://social.msdn.microsoft.com/Forums/en-US/e5d2ff3d-01c7-4cc0-a081-29a4dfbb0fad/getting-the-sharepoint-list-attachment-size-using-javascript?forum=sharepointcustomizationlegacy

  • Using a javascript to change the font size used by the measurement tool

    A couple years ago I saw a javascript written that would allow me to chang the font size used by the measurement tool in Acrobat 9.  When the IT department deliverd my new laptop with Acrobat X Pro, they had wiped out the script and I am not expert enough to recreate it from scratch.  Any suggestions?  I believe it was in an older post by Dave Merchant, but I truly can't find the post or a way to recreate the script.  Thanks for any help.

    Executing this code from the JS console will change the font size of all the Measurement annotations to 20. You can change the value in the first line to use a different font size:
    var newTextSize = 20;
    this.syncAnnotScan();
    var annots = this.getAnnots();
    for (var i in annots) {
        var annot = annots[i];
        if (annots[i].type=="Line") {
            var richText = annot.richContents;
            for (var i in richText) {
                richText[i].textSize = newTextSize;
            annot.richContents = richText;

Maybe you are looking for

  • Only opens in black and white...color is gone.

    When I place a photo file into my new blank file in photoshop elements 5.0 (I know it's old) it will convert my picture to black and white. How do I get my photoshop to go back to opening my files as they are, in color??? PLEASE HELP!!!???

  • Oracle Developer 6.0

    I have installed the Oracle Developer 6.0 and Oracle8 packages on my 95 Windows computer. The Oracle listener will not execute properly. I configured the tnsnames.ora file like the book says too, but when I try to execute in from the run prompt on th

  • Logic dosen't work

    Hi, I have a problem to change a user's password. Here is the condition. In my db it has a table called userpassword. userpassword(empno,username,password,level) At first time who wants to access this system must logs on to the system via submitting

  • I can't get my ipod to work at all

    I bought my husband a nano yesterday and when we try to plug it into the computer all it does is say do not disconnect and the ipod does not show up on itunes and if we just unplug it goes straight into factory settings We already have a ipod 60g so

  • Login in to OBIEE with Oracle Apps Credentials

    How can i connect to OBIEE repository and presentation services using Oracle Apps (ebusiness suite) user name and password the same way it can be done in discoverer. if anyone can point me to a link or give me his own opinion on how to do that please