2 Concept
© 2009 Thorsten Kisner
Important and basic elements are located in the Package net.sf.jwan.gui.elements
Name | Function |
---|---|
HtmlHref | Links and Navigation |
AbstractWanServletPage | A complete HTML-Page with iPhone specific header will be rendered. |
AbstractWanServletLayer | A layer will be rendered completely or during an asynchronous request. |
WanDiv | A HTML DIV-Element |
WanParagraph | The simplest element for presenting content |
The HTML-Page is created with WanPage and consists at least of a mainLayer and additional subLayers. Figures Abb. 1 show the green mainLayer and two (blue) subLayer.
Abb. 1: Using layers with jWAN
By rendering the page all layers are filled with content and submitted to the iPhone, but only the active layer is shown on the screen. By clicking on the links, the already loaded sublayers are activated on the iPhone with a sliding effect.
Abb. 2: Class hierarchy of sublayer
Each SubLayer has to implement WanSubLayer and can extend AbstractWanSublayer.
Menus are represented by the container WanMenu and the Interface WanMenuItem. A WanMenuItem can either be a normal Entity WanMenuEntry or the Button WanMenuMore which can beused to limit the number of shown elements and giving the user the opportunity to load more elements.
Currently there are two different types of menus available, which can be set by setMenuType(WanMenu.MenuType).
Abb. 4: jWAN Forms
Asynchronous requests are comparable to AJAX. The GUI can request arbitrary data from the web server, but the response does not have to be a complete HTML Page including <header/> and <body/>, instead only a part will be transmitted. This can be a complete sublayer or only one or more menu items. This results in a very quickly responding application.