|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.formaria.swing.layer.LayerManager
org.formaria.swing.Page
public class Page
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 class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Nested classes/interfaces inherited from interface org.formaria.aria.PageSupport |
|---|
PageSupport.IDialog |
| Field Summary | |
|---|---|
protected WidgetAdapter |
adapter
The component adapter for the current widget set. |
protected StyleFactory |
componentFactory
Deprecated. use getComponentFactory() instead. |
protected PageHelper |
pageHelper
The helper class that implements many functions on behalf of the page, particularly the widget specific operations and those operations specified by the PageSupport interface. |
protected PageManager |
pageMgr
The page manager for the current project, the page manager controls the update and display of pages. |
protected Project |
project
The owner project. |
protected DataModel |
rootModel
The root model of the current project. |
| Fields inherited from class org.formaria.swing.layer.LayerManager |
|---|
BACKGROUND |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| 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 |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Page()
Constructs an empty page, setting up the references to projects, data models and so on plus setting up a component factory to help instantiate the page's children. |
|
| Method Summary | |
|---|---|
int |
accumulateMessages(boolean start,
int level)
Informs the handler when a page validation is starting or stopping. |
void |
addBinding(DataBinding b)
Add a binding of a component to the data model. |
void |
addHandler(java.lang.Object comp,
long eventType,
java.lang.String methodName)
Adds an event handler. |
void |
addHandler(java.lang.Object srcObj,
java.lang.String methodName,
java.lang.String adderMethod,
java.lang.String listenerInterface,
long eventMask,
java.lang.Object listener)
Adds a handler for action events |
void |
addListener(java.lang.Object comp,
java.lang.String listenerName,
java.lang.String argType,
java.lang.Object listener)
Adds a listener for an event type. |
void |
addNestedPage(PageSupport ps)
Add a nested page reference |
void |
addNotify()
Repaint the component once it has been created |
Validator |
addValidation(java.lang.Object comp,
java.lang.String validationName)
Adds a validation to this page. |
Validator |
addValidation(java.lang.Object comp,
java.lang.String validationName,
java.lang.String method)
Adds a validation to this page. |
Validator |
addValidation(java.lang.Object comp,
java.lang.String validationName,
java.lang.String method,
int mask,
XmlElement pageEle)
Adds a validation to this page. |
int |
checkValidations(java.lang.Object scope)
Check all validations for this page. |
void |
clearMouseClick()
Clear the mouse click tracking |
void |
clearValidations()
Reset/removes all validations |
void |
enterDataBindingContext(java.lang.String contextName)
Gets the named DataBindingContext object bound to this PageHelper object, creating the context if necessary. |
java.lang.Object |
evaluateAttribute(java.lang.String attribValue)
Evaluates an attribute value. |
java.lang.String |
evaluatePath(java.lang.String path)
Evaluates a path (potentially) containing a method call |
void |
exitDataBindingContext()
Exit the data binding context and return to the parent context if any |
java.lang.Object |
findComponent(java.lang.Object container,
java.lang.String name)
Find a named component in the container. |
java.lang.Object |
findComponent(java.lang.String name)
Find a named component in the container. |
java.lang.Object |
getAttribute(java.lang.String attribName)
Gets the value of an attribute of this page |
java.lang.Object |
getAttribute(java.lang.String attribName,
java.lang.String compName)
Gets the value of an attribute of the named component. |
java.lang.Object |
getAttributes()
Gets the table of attributes used by this page. |
DataBinding |
getBinding(java.lang.Object targetComp)
Find the data binding associated with a component |
DataBinding |
getBinding(java.lang.String targetPath)
Find the data binding associated with a data source path |
java.util.Vector |
getBindings()
Get the data bindings in the current data binding context. |
ComponentFactory |
getComponentFactory()
Get the component factory instance being used by this page. |
java.lang.String |
getComponentName(java.lang.Object comp)
Get a name for a component. |
java.util.EventObject |
getCurrentEvent()
Get the current event. |
DataBindingContext |
getDataBindingContext()
Get the DataBindingContext object bound to this page |
DataBindingContext |
getDataBindingContext(java.lang.String contextName)
Gets the named DataBindingContext context |
java.lang.Object |
getEventAttribute(java.lang.Object c,
java.lang.String attribName)
Gets an attribute value |
AriaEventHandler |
getEventHandler()
Get the current event handler. |
java.lang.String |
getExtension()
Get the file extension of this page. |
java.awt.Graphics |
getGraphics()
Customizes the graphics context by adding anti-aliasing rendering hints if the start-up parameter AntiAlias=true |
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 |
Project |
getProject()
Get the current project, the project that owns this page |
int |
getStatus()
Get the page status, indicating whther the page has been created, activated and so on |
ValidationHandler |
getValidationHandler()
Gets the validation handler |
boolean |
handleEventHandlerException(Project project,
java.lang.Object container,
java.lang.Throwable error)
Handle an exception during the invocation of a page's event handler. |
boolean |
handleException(java.lang.Object comp,
java.lang.Exception ex,
java.lang.Object validator)
A method called when a validation exeption has been trapped. |
boolean |
isFocusChangeSuppressed()
Check the focus change status. |
void |
layout()
Deprecated. As of JDK version 1.1, replaced by doLayout(). |
void |
pageActivated()
A method called once the page has been created and initialized but just prior to display. |
void |
pageAdded()
A method called once the page has been added to its parent container but not yet displayed |
void |
pageCreated()
A method called once the page has been created but not yet initialized. |
void |
pageDeactivated()
Called whenver the page is about to loose scope and be hidden. |
void |
paint(java.awt.Graphics g)
Paint the background of this component with the background color |
void |
paintSuper(java.lang.Object g)
Get the super class to paint the background |
void |
removeBinding(DataBinding b)
Remove a binding of a component to the data model. |
void |
restoreState(XmlElement root)
Restore the application state |
int |
saveBoundComponentValues()
Save the component values to the model |
void |
saveState(XmlElement stateElement)
Save the application state |
void |
setAttribute(java.lang.String attribName,
java.lang.String compName,
java.lang.Object attribValue)
Set a named attributes. |
void |
setClearPage(boolean value)
Modify the clearPage flag. |
void |
setComponentFactory(StyleFactory factory)
Set the component factory instance being used by this page when constructing new pages. |
void |
setEventHandler(AriaEventHandler eh)
Set the current event handler |
void |
setExceptionHandler(ExceptionHandler eh)
Set the validation exception handler called when a validation exception is trapped. |
void |
setExtension(java.lang.String ext)
Get the file extension of this page |
void |
setLayout(java.lang.Object obj)
Set the layout manager |
void |
setPageName(java.lang.String name)
Get the name of this page |
void |
setStatus(int newStatus)
Set the page status |
void |
setValidationFactory(ValidationFactory vf)
Sets the factory used to create Validator objects |
void |
showComponents(java.lang.Object container,
boolean visible,
int recursionLevel)
Show or hide the components. |
void |
showHandCursor(java.lang.Object comp)
Show the hand/pointer cursor for this component. |
void |
showMessage(java.lang.Object parent,
java.lang.String title,
java.lang.String msg)
Shows a modal message box. |
void |
showMessage(java.lang.String title,
java.lang.String msg)
Shows a modal message box. |
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. |
java.lang.String |
stripAttributeValues(java.lang.String path)
Remove the attribute paths from a path e.g. |
java.lang.String |
translate(java.lang.String key)
Translate a string by looking it up in the current resource bundle. |
void |
update(java.awt.Graphics g)
Overrides the update method so as to allow the suppression of the default clearing of the background. |
void |
updateBinding(DataBinding binding)
Update the bound model node for the binding. |
int |
updateBindings()
Iterate all of the bindings in the page to reflect the model state. |
int |
updateBoundComponentValues()
Update the UI components with values from the model |
static void |
updateChildLayouts(java.awt.Container parent)
Update any children or children of children that have a layout. |
int |
validationHandler()
Invoke the validators for the last event. |
boolean |
wasEnterPressed()
Was the last event a press of the Enter key? |
boolean |
wasMouseClicked()
A utility method used to determine if the last event corrseponds to a mouse click. |
boolean |
wasMouseDoubleClicked()
A utility method used to determine if the last event corrseponds to a mouse double click. |
boolean |
wasMouseRightClicked()
A utility method used to determine if the last event corrseponds to a mouse right click. |
| Methods inherited from class org.formaria.swing.layer.LayerManager |
|---|
add, add, add, add, add, addLayer, deleteLayer, getActiveLayer, getActiveLayerIndex, getComponent, getInputContext, getLayer, getLayer, getLayerNames, isEnabled, isFocusable, isLayerEnabled, isLayerEnabled, isLayerVisible, moveLayerDown, moveLayerUp, paintChildren, setActiveLayer, setBounds, setLayerEnabled, setLayerName, setLayerVisible, setLayout, updateLayerSizes |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction |
| Methods inherited from class java.awt.Container |
|---|
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.formaria.aria.PageSupport |
|---|
doLayout, getName, setBackground, setLocation, setName, setSize, setVisible, validate |
| Methods inherited from interface org.formaria.aria.layer.ILayerManager |
|---|
setSize |
| Field Detail |
|---|
protected Project project
protected PageManager pageMgr
protected DataModel rootModel
protected WidgetAdapter adapter
protected PageHelper pageHelper
protected StyleFactory componentFactory
| Constructor Detail |
|---|
public Page()
| Method Detail |
|---|
public java.lang.String getPageName()
public void setPageName(java.lang.String name)
name - the page namepublic Project getProject()
getProject in interface PageSupportpublic java.lang.String getExtension()
getExtension in interface PageSupportpublic void setExtension(java.lang.String ext)
setExtension in interface PageSupportext - the page file extensionpublic void update(java.awt.Graphics g)
update in class javax.swing.JComponentg - the graphics contextpublic void paintSuper(java.lang.Object g)
g - the graphics contextpublic void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentg - the graphics contextpublic void addNotify()
addNotify in class javax.swing.JComponentpublic void setLayout(java.lang.Object obj)
setLayout in interface PageSupportobj - the layout managerpublic java.lang.Object getOwner()
getOwner in interface PageSupportpublic java.awt.Dimension getPageSize()
getPageSize in interface PageSupportpublic void setClearPage(boolean value)
setClearPage in interface PageSupportvalue - true to clearpublic java.awt.Graphics getGraphics()
getGraphics in class javax.swing.JComponent
public void showComponents(java.lang.Object container,
boolean visible,
int recursionLevel)
showComponents in interface PageSupportrecursionLevel - the number of layers of recursion (occurs with nested panels)container - the container whose components are being modifiedvisible - the visibility flag, true to make the components visiblepublic java.lang.Object findComponent(java.lang.String name)
findComponent in interface PageSupportname - the name to locate
public java.lang.Object findComponent(java.lang.Object container,
java.lang.String name)
findComponent in interface PageSupportcontainer - the page or container to searchname - the name to locate
public void layout()
doLayout().
layout in class java.awt.Containerpublic static void updateChildLayouts(java.awt.Container parent)
parent - the container to be laid outpublic void setExceptionHandler(ExceptionHandler eh)
setExceptionHandler in interface PageSupporteh - the new event handler
public boolean handleException(java.lang.Object comp,
java.lang.Exception ex,
java.lang.Object validator)
handleException in interface ExceptionHandlerhandleException in interface PageSupportcomp - Component being validatedex - The exception causedvalidator - The validator being used to validate.
public boolean handleEventHandlerException(Project project,
java.lang.Object container,
java.lang.Throwable error)
handleEventHandlerException in interface ExceptionHandlerhandleEventHandlerException in interface PageSupportproject - the current projectcontainer - the pageerror - the exception or error that was thrown
public void clearValidations()
clearValidations in interface PageSupportpublic int checkValidations(java.lang.Object scope)
checkValidations in interface PageSupportscope - the container whose children or check, or null for all children
public int accumulateMessages(boolean start,
int level)
accumulateMessages in interface ExceptionHandleraccumulateMessages in interface PageSupportstart - boolean to indicate whether the accumulation is started or stopped.level - int which indicates the most serious level of error encountered
public Validator addValidation(java.lang.Object comp,
java.lang.String validationName,
java.lang.String method,
int mask,
XmlElement pageEle)
addValidation in interface PageSupportcomp - the component being validatedvalidationName - the name of the validation in the validation filemethod - the method used to get the component's value if anymask - the event mask used to filter the events that trigger the validationpageEle - the XML element which is declared in the page
public Validator addValidation(java.lang.Object comp,
java.lang.String validationName,
java.lang.String method)
addValidation in interface PageSupportcomp - the component being validatedvalidationName - the name of the validation in the validation filemethod - the method used to get the component's value if any
public Validator addValidation(java.lang.Object comp,
java.lang.String validationName)
addValidation in interface PageSupportcomp - the component being validatedvalidationName - the name of the validation in the validation file
public void setValidationFactory(ValidationFactory vf)
setValidationFactory in interface PageSupportvf - The validation factorypublic ValidationHandler getValidationHandler()
getValidationHandler in interface PageSupportpublic int validationHandler()
validationHandler in interface PageSupportpublic AriaEventHandler getEventHandler()
getEventHandler in interface PageSupportpublic void setEventHandler(AriaEventHandler eh)
setEventHandler in interface PageSupporteh - The event handlerpublic java.util.EventObject getCurrentEvent()
getCurrentEvent in interface PageSupport
public void addListener(java.lang.Object comp,
java.lang.String listenerName,
java.lang.String argType,
java.lang.Object listener)
addListener in interface PageSupportcomp - the component that fires eventslistenerName - the name of the listener interfaceargType - the listener argumentslistener - the listener implementation
public void addHandler(java.lang.Object comp,
long eventType,
java.lang.String methodName)
throws java.lang.Exception
addHandler in interface PageSupportcomp - the component that fires the eventeventType - the event ID/maskmethodName - the method to be invoked in response to the object
java.lang.Exception - The handler could not be found or addedpublic boolean isFocusChangeSuppressed()
isFocusChangeSuppressed in interface PageSupport
public void addHandler(java.lang.Object srcObj,
java.lang.String methodName,
java.lang.String adderMethod,
java.lang.String listenerInterface,
long eventMask,
java.lang.Object listener)
addHandler in interface PageSupportsrcObj - the menu item that fires the eventsmethodName - the method to be invoked in response to the action eventadderMethod - the adder method name e.g. addActionListenerlistenerInterface - the listener interface e.g. java.awt.event.ActionListenereventMask - the event mask e.g. AWTEvent.ACTION_EVENT_MASKlistener - the listener implementation, usually the page's this pointerActionListener,
ActionEventpublic boolean wasMouseClicked()
wasMouseClicked in interface PageSupportpublic void clearMouseClick()
public boolean wasMouseDoubleClicked()
wasMouseDoubleClicked in interface PageSupportpublic boolean wasMouseRightClicked()
wasMouseRightClicked in interface PageSupportpublic boolean wasEnterPressed()
public void showHandCursor(java.lang.Object comp)
showHandCursor in interface PageSupportcomp - the componentpublic java.util.Vector getBindings()
getBindings in interface PageSupportpublic void addBinding(DataBinding b)
addBinding in interface PageSupportb - the bindingpublic void removeBinding(DataBinding b)
removeBinding in interface PageSupportb - the bindingpublic int updateBindings()
updateBindings in interface PageSupportpublic void updateBinding(DataBinding binding)
updateBinding in interface PageSupportbinding - the binding to updatepublic int updateBoundComponentValues()
updateBoundComponentValues in interface PageSupportpublic int saveBoundComponentValues()
saveBoundComponentValues in interface PageSupportpublic DataBindingContext getDataBindingContext()
getDataBindingContext in interface PageSupportpublic DataBindingContext getDataBindingContext(java.lang.String contextName)
getDataBindingContext in interface PageSupportcontextName - the name of the context
public DataBinding getBinding(java.lang.Object targetComp)
getBinding in interface PageSupporttargetComp - the component whose binding is required
public DataBinding getBinding(java.lang.String targetPath)
getBinding in interface PageSupporttargetPath - the path to the bound model
public void enterDataBindingContext(java.lang.String contextName)
enterDataBindingContext in interface PageSupportcontextName - the data binding context namepublic void exitDataBindingContext()
exitDataBindingContext in interface PageSupportcontextName - the data binding context namepublic int getStatus()
getStatus in interface PageSupportpublic void setStatus(int newStatus)
setStatus in interface PageSupportnewStatus - the new page statuspublic void pageActivated()
pageActivated in interface PageSupportpublic void pageAdded()
pageAdded in interface PageSupportpublic void pageCreated()
pageCreated in interface PageSupportpublic void pageDeactivated()
pageDeactivated in interface PageSupport
public void setAttribute(java.lang.String attribName,
java.lang.String compName,
java.lang.Object attribValue)
Set a named attributes. The attributes are stored in a hashtable owned by the page. Derived classes may access the hashtable directly but the preferred method of access is the getAttribute method. Attributes are used by the AriaBuilder class for component attributes other than those it handles directly. The attributes can be thought of as component properties or extra data and need not be used directly by the component.
Attributes are stored using a key in the form attribName_compName or just the attribName if compName is null.
setAttribute in interface PageSupportattribName - the attribute namecompName - the component name or null if it is a page attributeattribValue - the attribute valuegetAttribute(java.lang.String)public java.lang.Object getAttribute(java.lang.String attribName)
getAttribute in interface PageSupportattribName - the name of the attribute
public java.lang.Object getAttribute(java.lang.String attribName,
java.lang.String compName)
getAttribute in interface PageSupportattribName - the name of the attributecompName - the component name
public java.lang.Object getAttributes()
public java.lang.String getComponentName(java.lang.Object comp)
getComponentName in interface PageSupportcomp - the component
public java.lang.Object getEventAttribute(java.lang.Object c,
java.lang.String attribName)
getEventAttribute in interface PageSupportc - the component whose attribute is being requestedattribName - the name of the attribute
public java.lang.Object evaluateAttribute(java.lang.String attribValue)
evaluateAttribute in interface PageSupportattribValue - the raw attribute value
public java.lang.String evaluatePath(java.lang.String path)
evaluatePath in interface PageSupportpath - the raw path
public java.lang.String stripAttributeValues(java.lang.String path)
stripAttributeValues in interface PageSupportpath - the path to strip
public ComponentFactory getComponentFactory()
getComponentFactory in interface PageSupportpublic void setComponentFactory(StyleFactory factory)
setComponentFactory in interface PageSupportfactory - the component factorypublic java.lang.String translate(java.lang.String key)
translate in interface PageSupportkey - the resource bundle key
public void showMessage(java.lang.String title,
java.lang.String msg)
showMessage in interface PageSupporttitle - the message dialog titlemsg - the text of the message
public void showMessage(java.lang.Object parent,
java.lang.String title,
java.lang.String msg)
showMessage in interface PageSupportparent - the message dialog parenttitle - the message dialog titlemsg - the text of the messagepublic PageSupport showPage(java.lang.String className)
className - The name, without package info, of the page to be displayed
public PageSupport showPage(java.lang.String className,
java.lang.String target)
className - The name, without package info, of the page to be displayedtarget - the area to update
public PageSupport showPrevious()
public void addNestedPage(PageSupport ps)
addNestedPage in interface PageSupportps - the nested pagepublic void saveState(XmlElement stateElement)
saveState in interface PersistentStatepublic void restoreState(XmlElement root)
restoreState in interface PersistentState
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||