Java Reference
In-Depth Information
Ta b l e 9 . 2
JavaFX Applet Launch Properties ( Continued )
Property
Meaning
Type
vspace
Space above and below the applet.
Number
hspace
Space left and right of the applet.
Number
version
Specifies the JavaFX version to use.
String
jnlp_href
The file containing information that the plug-in should use to launch
the applet using Java Web Start.
String
Indicates whether the applet is allowed to be dragged out of the HTML
page to the desktop (true or false).
Boolean
draggable
Developer Tip: There is a special launch property, display_html , used for debug-
ging your settings. When this is set to true, instead of launching the applet, the gen-
erated HTML code is displayed in the browser. This is useful to determine exactly
what is being sent to the browser and to figure out if any settings are wrong.
Listing 9.4 shows an example that adds an applet parameter, isApplet , that will
be used by the NasaImageBrowser application to determine whether it has been
launched as an applet or as a standalone application. We will see how this is used
later in this chapter when we discuss dragging the applet off the browser to the
desktop. There is also a launch property to indicate the applet is draggable .
Listing 9.4
Draggable Applet
<script src="http://dl.javafx.com/dtfx.js"></script>
<script>
javafx(
{
archive: "NasaImageBrowser.jar",
width: 500,
height: 500,
code: "nasaimagebrowser.Main",
name: "NasaImageBrowser",
draggable: true
},
{
isApplet: true
}
);
</script>
 
Search WWH ::




Custom Search