jWAN
titel
Get jWAN at SourceForge.net. Fast, secure and Free Open Source software downloads
Startseite

2  Concept

2

Concept

2.1

Elements

Important and basic elements are located in the Package net.sf.jwan.gui.elements

NameFunction
HtmlHrefLinks and Navigation
AbstractWanServletPageA complete HTML-Page with iPhone specific header will be rendered.
AbstractWanServletLayerA layer will be rendered completely or during an asynchronous request.
WanDivA HTML DIV-Element
WanParagraphThe simplest element for presenting content

2.1.1

HtmlHref

2.2

Layer

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

2.2.1

Sublayer

Each SubLayer has to implement WanSubLayer and can extend AbstractWanSublayer.

2.2.2

Anychronous Sublayer

2.3

Menus

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.  3: Simple and Image WanMenuType

2.4

Forms

Abb.  4: jWAN Forms

2.5

Asynchrous Requests

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.