Servis-Rhino 4211B Guia do Utilizador Página 266

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 265
"javafxpackager" to package that code into a JAR file. This JAR has other artifacts injected
into it also. We place this JAR and any other dependent JARs in its own folder. For example, a
folder called "JARS".
Finally, we run one more step which again uses the "javafxpackager" tool to create an
installer. This installer can then be distributed and run by application users which will install the
application ready for execution.
Here are some example scripts.
javafxpackager -createjar -appclass com.kolban.odmci.SendEvent -srcdir
"C:\Projects\ODMCI\Widgets\WorklightWorkspace\EventSend\bin" -outfile JARS/SendEventApp.jar
-classpath ODMCIUtils.jar
javafxpackager -deploy -outfile SendEvent -width 800 -height 600 -name AppName -appclass
com.kolban.odmci.SendEvent -v -srcdir JARS -outdir Installers -native msi -title "SendEvent"
-description "ODM CI Event Sender" -vendor "Kolban@IBM" -name "SendEvent"
See also:
Deploying JavaFX Applications - 10-2013
JavaFX Data and Observables
JavaFX provides a number of specialized data types and handlers that make working with JavaFX
much easier. Part of the concept here is that a UI visualization is a visualization of data. Within a
Java environment, data is built from primitive Java data types and Java objects. Within application
logic, the values of these variables can be changed. Now consider a text field that is showing some
data. We can manually enter data into the text field or we can set new data into that text field from
code. However, we now have two disparate concepts. We have a potential String variable that we
may want to "hold" the value that is shown in the text field and we have the text field itself.
Changes to one or the other do not reflect changes in the other. The two are out of synch.
See also:
Tutorial - Using JavaFX Properties and Binding – 06-2013
Tutorial – Using JavaFX Collections – 04-2013
Tutorial – Java Collections
JavaFX Collections
JavaFX ObservableList
This is an interface and not a class so we can't instantiate instances of this directly. What it
provides is a list into which items can be added, removed and iterated over. However where it
differs from an ordinary list is that it can have listeners added to it which will let us know when the
list changes. Since this class also implements java.util.List, the methods on that interface may also
be used.
The FXCollections object provides static constructors for most JavaFX data types including
observable list.
When changes are made to an ObservableList, we can add a listener to be informed of those
changes. The interface to the listener is ListChangeListener. When the list is changed, the
listener is invoked with a ListChangeListener.Change object that describes what has
changed.
Page 266
Vista de página 265
1 2 ... 261 262 263 264 265 266 267 268 269 270 271 ... 297 298

Comentários a estes Manuais

Sem comentários