JavaFX WebView programmatically set zoom - javafx-2

Is there a way to programmatically set the zoom on a JavaFX WebView?

API is available in the upcoming JavaFX 8.
webView.setZoom(0.5);
You can download early access build of JDK 8 (which includes FX8) here: http://www.oracle.com/technetwork/java/javase/downloads/ea-jsp-142245.html

Related

Does codenameone support liferay screens?

Liferay screens is available for iOS and android allowing development of native apps using Liferay portal as backend - sort of. Is this supported in codenameone?
No.
Unlike Lifray with Codename One you only build the UI once to do that you need to use our GUI builder or API both of which would be incompatible with Lifray.

how to use onsen-ui 2.0 to use flat design on iOS and material on Android ?

Onsen-ui 2.0 provides material and flat components. If we want to follow vendor design guidelines we should use material for android and flat for ios. How should I do without using full switch android or ios on my templates ?
With Onsen 2.0, they are enabling this exact feature. Onsen 2.0 will automatically detect the platform and switch between iOS and Material for you. Check out this blog post from yesterday that explains it all in detail: https://onsen.io/blog/what-is-material-design/
This is the relevant quote though from that link:
We have also gone one step further by adding automatic styles. What
this means is that an Onsen UI app will use the Material Design
components when running on the Android platform while it automatically
switches to the flat design when running on iOS.
I will be waiting for Beta 7 , Have you decided the date of release. Switch based on platform is going to be a fantastic feature.

javafx.scene.control.Pagination not found

I'm using java 1.7_07 which include javafx 2.2.1.
When I try to import the package javafx.scene.control.Pagination Netbeans doesn't find it. The class is present in the API documentation, I can't see the reason.
Check your javafx version: How to get the version number of JavaFX?
You may use Java Platform in NetBeans settings being setup to older JavaFX and Pagination is a relatively new control.

What is equivalent API of org.jfxtras.util.BrowserUtil in javafx 2.1?

I convert code from javafx 1.3 to javafx 2.1. This API is in javafx 1.3, But i don't know equivalent API in javafx 2.1.
HostServices.showDocument() will open a url in a browser window (similar to what the jfxtras BrowserUtil did).

How to make a executable file of JavaFX 2.0 project?

I want to make a executable file of my project which I made in JavaFX 2.0. Can anyone help me with this?
The JavaFX team implemented support for this in the tools bundled with the JavaFX 2.2 SDK (included in Java7 from update 6). The JavaFX packaging toolset for packaging executables is documented in self-contained application section of the JavaFX deployment guide.
See RT-19446 "Add ability to co-bundle Java + JavaFX + App into a single native executable" for more information (anybody can sign up to view the jira).
3rd party tools such as the JavaFX maven plugin or the JavaFX gradle plugin, streamline integration of building native JavaFX executables using common build systems.
The JavaFX packaging tools can also be used to natively package any Java application, not just JavaFX applications. For example, a Swing application, as demonstrated by this shell script for packaging a Swing application using JavaFX on OS X.
If you want to do the packaging for the 2.0 or 2.1 versions of JavaFX (not JavaFX 2.2+), then you should review Packaging JavaFX Applications as Native Installers.
Javafx 2+ can now easily be packaged as a native exe (with an added payload, which the current JRE), the up to date (as in the end of 2012) article is here: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm
Out of curiosity I created an executable on Windows (copy-pasting the netbeans build code into netbeans' build.xml) from the canvas and the hello world examples: the app is around 20k, the executable/launcher is around 80k and the added runtime is 138mb.
By the way if you have an older netbeans install (installed with a pre 1.7jdk) you may have to update it or edit its netbeans.conf fixing the "netbeans_jdkhome" path, otherwise the bundled executable's packaging may fail.
There are several tools to generate a customized exe launcher for your Java application.
I have good experience with Winrun4J: http://winrun4j.sourceforge.net/
but you will always need an installed Java/JavaFX Runtime even if you have an .exe that contains all your code.

Resources