org.formaria.aria
Interface Page

All Superinterfaces:
ExceptionHandler, PageSupport, PersistentState

public interface Page
extends ExceptionHandler, PageSupport, PersistentState

A basic unit for building applications. Page integrates with page and event management facilities provided by Aria. The page also provides a number of methods to help control the page lifecycle and many methods to manage the state of the user interface. Most application functionality within an application will be implemented in derivates of the page class, however this is not strictly necessary and the page can act as little more than a container for the user interface components.

Pages can be displayed using the PageDisplay interface implemented by Applet and invoked by the Page manager. Pages can be constructed directly or via the AriaBuilder. The page lifecycle also interaccts with the data bindings, triggering data updates and saving.

The page implements the PageSupport interface which abstracts many of the methods used by the Aria framework to interact with its notion of a page. Through the PageSupport interface the framework can interact with pages that are implement with Widget sets such as Swing and SWT which have different hierarchies and diffent means of instantiation.

The Page class is little more than a shell and many of its methods are implemented by the PageHelper class, the page delegates to an instance of the page helper. The page also defines a set of constants for common components, but the page and moreover the framework is not limited to just these components.

Copyright (c) Formaria Ltd., 2008

License: see license.txt

$Revision: 2.33 $


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.formaria.aria.PageSupport
PageSupport.IDialog
 
Field Summary
 
Fields inherited from interface org.formaria.aria.PageSupport
ACTIVATED, ANNOTATEDIMAGE, ARIA_AWT_PACKAGE, ARIA_HTML_PACKAGE, ARIA_SWING_PACKAGE, ARIA_SWT_PACKAGE, BORDER_LAYOUT, BOX_LAYOUT, BUTTON, CARD_LAYOUT, CHECK, COLUMN_LAYOUT, COMBO, CREATED, DEACTIVATED, DISCARDED, DISPLAYED, EDIT, FLOW_LAYOUT, GRID_LAYOUT, GRIDBAG_LAYOUT, GROUP, GUIDE_LAYOUT, HOTSPOTIMAGE, IMAGE, IMAGEMAP, LABEL, LAYER_LAYOUT, LIST, LOADED, MENU, MENUBAR, MENUITEM, METACONTENT, NULL_LAYOUT, PANEL, PASSWORD, RADIO, SCALE_LAYOUT, SCROLLABLEMETACONTENT, SCROLLPANE, SPLITPANE, SPRING_LAYOUT, TABLE, TABPANEL, TEXTAREA, UNKNOWN, UNKNOWN_PAGE_STATE, WMF
 
Method Summary
 void addNestedPage(PageSupport ps)
          Add a nested page reference
 java.lang.Object getOwner()
          Get the parent
 java.lang.String getPageName()
          Get the name of this page.
 java.awt.Dimension getPageSize()
          Get the size of the page
 void paintSuper(java.lang.Object g)
          Get the super class to paint the background
 void setPageName(java.lang.String name)
          Get the name of this page
 PageSupport showPage(java.lang.String className)
          Load and show a page.
 PageSupport showPage(java.lang.String className, java.lang.String target)
          Load and show a page and show it in a named target area.
 PageSupport showPrevious()
          Show the previously displayed page.
 void update(java.awt.Graphics g)
          Overrides the update method so as to allow the suppression of the default clearing of the background.
 
Methods inherited from interface org.formaria.aria.PageSupport
accumulateMessages, addBinding, addHandler, addHandler, addListener, addValidation, addValidation, addValidation, checkValidations, clearValidations, doLayout, enterDataBindingContext, evaluateAttribute, evaluatePath, exitDataBindingContext, findComponent, findComponent, getAttribute, getAttribute, getBinding, getBinding, getBindings, getComponentFactory, getComponentName, getCurrentEvent, getDataBindingContext, getDataBindingContext, getEventAttribute, getEventHandler, getExtension, getName, getProject, getStatus, getValidationHandler, handleEventHandlerException, handleException, isFocusChangeSuppressed, pageActivated, pageAdded, pageCreated, pageDeactivated, removeBinding, saveBoundComponentValues, setAttribute, setBackground, setClearPage, setComponentFactory, setEventHandler, setExceptionHandler, setExtension, setLayout, setLocation, setName, setSize, setStatus, setValidationFactory, setVisible, showComponents, showHandCursor, showMessage, showMessage, stripAttributeValues, translate, updateBinding, updateBindings, updateBoundComponentValues, validate, validationHandler, wasMouseClicked, wasMouseDoubleClicked, wasMouseRightClicked
 
Methods inherited from interface org.formaria.aria.PersistentState
restoreState, saveState
 

Method Detail

getPageName

java.lang.String getPageName()
Get the name of this page. The page name is used internally by the page manager to reference the page.

Returns:
the page name

setPageName

void setPageName(java.lang.String name)
Get the name of this page

Parameters:
name - the page name

update

void update(java.awt.Graphics g)
Overrides the update method so as to allow the suppression of the default clearing of the background. If the background is not to be cleared then the clearPage flag can be set to false using the setClearPage method.

Parameters:
g - the graphics context

paintSuper

void paintSuper(java.lang.Object g)
Get the super class to paint the background

Parameters:
g - the graphics context

getOwner

java.lang.Object getOwner()
Get the parent

Specified by:
getOwner in interface PageSupport
Returns:
the owner/parent of the page

getPageSize

java.awt.Dimension getPageSize()
Get the size of the page

Specified by:
getPageSize in interface PageSupport
Returns:
the page dimensions

showPage

PageSupport showPage(java.lang.String className)
Load and show a page.

Parameters:
className - The name, without package info, of the page to be displayed
Returns:
the page being displayed

showPage

PageSupport showPage(java.lang.String className,
                     java.lang.String target)
Load and show a page and show it in a named target area. The target areas are the named 'frames' of the frames file. The default 'content' area is used by default if the named area cannot be found.

Parameters:
className - The name, without package info, of the page to be displayed
target - the area to update
Returns:
the page being displayed

showPrevious

PageSupport showPrevious()
Show the previously displayed page. Although the method works with framesets the page history applies only to the main content area.

Returns:
The previous Page

addNestedPage

void addNestedPage(PageSupport ps)
Add a nested page reference

Specified by:
addNestedPage in interface PageSupport
Parameters:
ps - the nested page