|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectincubator.net.xoetrope.xui.XApplicationContext
public class XApplicationContext
| Field Summary | |
|---|---|
protected boolean |
bUseWindow
true if a popup window is in use |
protected int |
clientHeight
The height of the client area |
protected int |
clientWidth
The width of the client area |
protected java.lang.Class |
defaultSourceClass
The default model data source class |
protected XDataSource |
modelDataSource
The model data source |
protected XPageManager |
pageMgr
The page manager |
protected XStartupObject |
startupObject
The Applet/Application/Startup instance |
| Constructor Summary | |
|---|---|
XApplicationContext(XStartupObject startObject,
java.lang.String[] args)
A default constructor. |
|
XApplicationContext(XStartupObject startObject,
java.lang.String defTargetClass,
java.lang.String[] args)
A default constructor. |
|
| Method Summary | |
|---|---|
protected void |
addShutdownHook()
|
XContentHolder |
addTarget(java.lang.String name,
java.lang.Object constraint,
int preferredWidth,
int preferredHeight,
java.util.Hashtable params)
Add a new frame or target area to a frameset |
java.lang.Object |
displayPage(PageSupport page)
Called when a page has been added or shown via the XPageManager. |
java.lang.Object |
displayPage(PageSupport pageObj,
java.lang.String target)
Called when a page has been added or shown via the XPageManager. |
java.lang.Object |
findTarget(java.lang.String target)
Finds the target area for a page display request, this only applies to a frameset. |
int |
getClientHeight()
Get the height of the main window. |
int |
getClientWidth()
Get the width of the main window. |
int |
getNumTargets()
Get the number of targets in the container |
protected XPageLoader |
getSecondaryClassLoader(java.lang.String packageName)
Construct a new builder and set the default package. |
java.lang.Object |
getTarget(int idx)
Get the target for a page display request. |
void |
hidePage(XPage page)
Remove the page from container. |
void |
init()
Invoked when used as an applet. |
protected void |
initialise()
Generic function which is called from the constructor if it's an application or from start if its an applet. |
protected void |
register()
Load the componentFactories by reading the factory names from the startup file. |
void |
removeAllTargets()
Remove all frames/targets from the current frameset |
protected void |
setContent()
Load the content into the model. |
void |
setDefaultDataSource(java.lang.String className)
Sets the default datasource class. |
void |
setDefaultTargetClass(java.lang.String clsName)
Set the name of the default target class |
void |
setHome()
Set the home page using the startup properties. |
protected void |
setResourceFile(java.lang.String startFile)
Setup the default resource file for the application and load some of the information in it. |
protected void |
setup(java.lang.String[] args)
Setup the applet by setting paths and then initializing the applet. |
void |
windowActivated(java.awt.event.WindowEvent e)
Template method, unused at present |
void |
windowClosed(java.awt.event.WindowEvent e)
Template method, unused at present |
void |
windowClosing(java.awt.event.WindowEvent e)
Exit the application |
void |
windowDeactivated(java.awt.event.WindowEvent e)
Template method, unused at present |
void |
windowDeiconified(java.awt.event.WindowEvent e)
Template method, unused at present |
void |
windowIconified(java.awt.event.WindowEvent e)
Template method, unused at present |
void |
windowOpened(java.awt.event.WindowEvent e)
Template method, unused at present |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XPageManager pageMgr
protected boolean bUseWindow
protected XDataSource modelDataSource
protected java.lang.Class defaultSourceClass
protected XStartupObject startupObject
protected int clientWidth
protected int clientHeight
| Constructor Detail |
|---|
public XApplicationContext(XStartupObject startObject,
java.lang.String[] args)
public XApplicationContext(XStartupObject startObject,
java.lang.String defTargetClass,
java.lang.String[] args)
| Method Detail |
|---|
protected void setup(java.lang.String[] args)
args - the command line argumentsprotected XPageLoader getSecondaryClassLoader(java.lang.String packageName)
Construct a new builder and set the default package. XUI sometimes uses additional class loaders to find the resources needed in a project. By default XUI uses the XuiBuilder class loader to convert XML files to Java classes.
A custom class loader can be referenced in the startup properties file using the 'BuilderClass' property. Once this property has been determined this method will instantiate an instance of that class if necessary.
packageName - the name of the default widget package e.g. net.xoetrope.awt,
this is normally defined as a result of choosing the appropriate version of
the XApplet class
public void setDefaultDataSource(java.lang.String className)
className - the name of the datasource class
e.g. net.xoetrope.data.XDataSource.class, this class reads data from an XML fileprotected void setResourceFile(java.lang.String startFile)
startFile - The name of the file to be loaded, by default startup.propertiespublic void init()
protected void initialise()
Generic function which is called from the constructor if it's an application or from start if its an applet.
The initialization process proceeds in the following order
protected void addShutdownHook()
protected void register()
protected void setContent()
public void setHome()
public java.lang.Object displayPage(PageSupport page)
displayPage in interface XPageDisplaypage - The XPage which has been loaded.
public java.lang.Object displayPage(PageSupport pageObj,
java.lang.String target)
Called when a page has been added or shown via the XPageManager. The page manager then requests that the applet/application then displays the page in the appropriate location.
The sequence with which the page transition occurs is as follows:
displayPage in interface XPageDisplaypageObj - the page to displaytarget - the area to update
public void hidePage(XPage page)
page - the page to hidepublic java.lang.Object findTarget(java.lang.String target)
findTarget in interface XPageDisplaytarget - the target area name
public java.lang.Object getTarget(int idx)
getTarget in interface XPageDisplayidx - the target area
public int getNumTargets()
getNumTargets in interface XPageDisplay
public XContentHolder addTarget(java.lang.String name,
java.lang.Object constraint,
int preferredWidth,
int preferredHeight,
java.util.Hashtable params)
addTarget in interface XPageDisplayname - the frame nameconstraint - the BorderlayoutConstraintpreferredWidth - the preferred widthpreferredHeight - the preferred heightparams - extra parameters for the target
public void removeAllTargets()
removeAllTargets in interface XPageDisplaypublic void setDefaultTargetClass(java.lang.String clsName)
clsName - the class namepublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenere - the window eventpublic int getClientWidth()
public int getClientHeight()
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenere - the window eventpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenere - the window eventpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenere - the window eventpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenere - the window eventpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenere - the window eventpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenere - the window event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||