com.vinay.ui.vinui.fw.core
Class Application

java.lang.Object
  extended bycom.vinay.ui.vinui.fw.core.Application

public abstract class Application
extends java.lang.Object

Represents a UI Application. An application created using the framework must have a class of this type and the class name must be returned by the getAppClass() method of AppInit. Each application has a context available to it. It can be used to share data across pages.

Author:
Vinay Nath

Constructor Summary
Application()
           
 
Method Summary
protected  void addPage(Page page)
          Add a new page to the application
protected  Context getApplicationContext()
          Returns the context of the application
protected  Page getDefaultPage()
           
protected  long getId()
           
 Page getNavigateToPage()
           
protected  Page getPage(long id)
           
abstract  void init()
          A lifecycle method that is invoked once during application startup.
protected  boolean isNavigationEnabled()
           
protected  void setDefaultPage(java.lang.String pageName)
          Sets the default page of the application.
protected  void setNavigation(java.lang.String targetPageName)
           
 void setNavigationEnabled(boolean navigationEnabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Application

public Application()
Method Detail

init

public abstract void init()
A lifecycle method that is invoked once during application startup. Pages that make the application should be added here. The default page should also be set here

See Also:
addPage(Page), setDefaultPage(String)

getApplicationContext

protected Context getApplicationContext()
Returns the context of the application

Returns:
the application context object
See Also:
Context

setDefaultPage

protected void setDefaultPage(java.lang.String pageName)
Sets the default page of the application. This is the first page that is rendered.

Parameters:
pageName - name of the page created

getDefaultPage

protected Page getDefaultPage()

getId

protected long getId()

addPage

protected void addPage(Page page)
Add a new page to the application

Parameters:
page -

getPage

protected Page getPage(long id)

setNavigation

protected void setNavigation(java.lang.String targetPageName)

getNavigateToPage

public Page getNavigateToPage()
Returns:
Returns the navigateToPage.

isNavigationEnabled

protected boolean isNavigationEnabled()
Returns:
Returns the navigationEnabled.

setNavigationEnabled

public void setNavigationEnabled(boolean navigationEnabled)
Parameters:
navigationEnabled - The navigationEnabled to set.