Available since version 0.9.4.
Class | Extends |
---|---|
org.apache.royale.jewel.Drawer{:target=‘_blank’} | DrawerBase{:target=‘_blank’} |
Note: This component is currently only available for JavaScript.
The Drawer class is a container component used for navigation that can be opened with the menu icon, or be always visible. It use to be positioned at the left (or right) side of the application screen.
It can be used in float or fixed modes:
Drawer has other complementary components:
Component | Description |
---|---|
DrawerHeader | a container to hold drawer header content (i.e: a title or an image icon logo) |
DrawerContent | a container to hold drawer main content like navigation, icons, or text |
DrawerFooter | a BarRow{:target=‘_blank’} to use as the last content. Styling use to be similar to the FooterBar{:target=‘_blank’} |
In MXML declare a Drawer
like this:
<j:Drawer> <j:beads> <j:ResponsiveDrawer auto="true"/> </j:beads> <j:DrawerHeader> <j:ImageButton src="assets/apache-royale-jewel-logo-white.svg"/> </j:DrawerHeader> <j:DrawerContent> <j:Navigation/> <j:Divider/> <j:Navigation/> </j:DrawerContent> <j:DrawerFooter> <j:BarSection> <j:Label text="Some Footer Content"/> </j:BarSection> </j:DrawerFooter> </j:Drawer>
In ActionScript we can do the same in the following way:
var d:Drawer = new Drawer(); // create the DrawerContent var dc:DrawerContent = new DrawerContent(); // add elements to DrawerContent like Navigation, Divider... // ...and add the DrawerContent to the Drawer d.addElement(dc); // finally add the Drawer to the parent (usually a ResponsiveView) parent.addElement(d);
where parent
is the container where the control will be added. Usually parent is Jewel ResponsiveView{:target=‘_blank’}, since Drawers are used on responsive applications.
Check the Reference of org.apache.royale.jewel.Drawer{:target=‘_blank’} for a more detailed list of properties and methods.