Available since version 0.9.4.
Class | Extends | Implements |
---|---|---|
org.apache.royale.jewel.Application{:target=‘_blank’} | ApplicationBase{:target=‘_blank’} | IStrand{:target=‘_blank’}, IParent{:target=‘_blank’}, IEventDispatcher{:target=‘_blank’}, IInitialViewApplication{:target=‘_blank’}, IPopUpHost{:target=‘_blank’}, IPopUpHostParent{:target=‘_blank’}, IRenderedObject{:target=‘_blank’} |
Note: This component is currently only available for JavaScript.
The Application class is the main class and entry point for a Royale application and does not contain user interface elements. Those UI elements go in the view (Jewel ViewBase{:target=‘_blank’}). This Application class expects there to be a main model, a controller, and an initial view.
Jewel Application holds specific Jewel needs in a Royale Application. This class extends the standard ApplicationBase and sets up the AllCSSValuesImpl{:target=‘_blank’} implementation for convenience.
In MXML declare a Application
as the root tag of the main application file like this:
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:j="library://ns.apache.org/royale/jewel"> <j:valuesImpl> <js:SimpleCSSValuesImpl /> </j:valuesImpl> <j:initialView> <!-- add a View or ResponsiveView --> <j:View width="100%" height="100%"/> </j:initialView> </j:Application>
If the filename is App.mxml
, building the application will generate the following code in the index.html
file:
<script type="text/javascript"> new App().start(); </script>
launching the html file in a browser will execute the Jewel Royale Application.
Check the Reference of org.apache.royale.jewel.Application{:target=‘_blank’} for a more detailed list of properties and methods.