|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
net.xoetrope.awt.XApplet
public class XApplet
This class is constructed with a window or frame and can be part of an applet or an application. The class acts as the main entry point to an XUI application and provides some of the infrastructure needed to support the application.
The applet can provide support for a frameset or a single page. Page display functions are also supported to allow the application to display more than a single page or change the page that is displayed.
By choosing either the AWT or Swing version of the XApplet you choose to have either an AWT or a Swing application/applet. In general once this choice has been made you should not mix toolkits.
Copyright (c) Xoetrope Ltd., 1998-2004
License: see license.txt
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
java.applet.Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
java.awt.Panel.AccessibleAWTPanel |
| 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 |
| Field Summary | |
|---|---|
protected XApplicationContext |
applicationContext
|
protected java.awt.Window |
appWindow
|
protected boolean |
bUseWindow
|
protected java.awt.Frame |
clientFrame
|
protected java.awt.Panel |
pageHolder
|
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
XApplet()
A default constructor. |
|
XApplet(java.lang.String[] args,
java.awt.Frame f)
Create a new application. |
|
| Method Summary | |
|---|---|
java.lang.Object |
displayDecoration(PageSupport page,
java.lang.String constraint)
Display a window decoration, for example a toolbar |
java.lang.Object |
getApplicationMenuBar()
Get the menubar, setting it up if it is not already added to the application frame |
java.lang.Object |
getContentPaneEx()
Get the content pane used by XUI - the container in which pages are displayed |
java.awt.Frame |
getFrame()
Gets the Frame containing the applet. |
java.lang.Object |
getParentObject()
Get the parent object |
java.lang.String |
getWidgetClassPackage()
Get the package name for the default widget set |
void |
init()
Invoked when used as an applet. |
static void |
main(java.lang.String[] args)
main method to be invoked as an application. |
void |
refresh()
Validate and repaint the display |
void |
restoreViews()
Restore the normal page views, as in the case of the docking layout where panels may be zoomed or minimized. |
void |
setApplicationMenuBar(java.lang.Object mb)
Set the menubar |
void |
setAppTitle(java.lang.String title)
Set the application title. |
void |
setIcon(java.awt.Image icon)
Set the application icon |
void |
setMenuBar(java.awt.MenuBar mb)
Set the menubar. |
void |
setupFrameset(java.util.Hashtable params)
Setup frameset. |
void |
setupWindow(XApplicationContext context,
XProject currentProject,
int clientWidth,
int clientHeight)
Setup the windowing. |
| Methods inherited from class java.applet.Applet |
|---|
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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 net.xoetrope.xui.XStartupObject |
|---|
getDocumentBase, getParameter, setSize, validate |
| Field Detail |
|---|
protected java.awt.Window appWindow
protected java.awt.Frame clientFrame
protected java.awt.Panel pageHolder
protected boolean bUseWindow
protected XApplicationContext applicationContext
| Constructor Detail |
|---|
public XApplet()
args - the application command-line argumentsframe - the parent frame
public XApplet(java.lang.String[] args,
java.awt.Frame f)
args - the application command-line argumentsframe - the parent frame| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line argumentspublic java.lang.Object getParentObject()
getParentObject in interface XStartupObjectpublic java.lang.String getWidgetClassPackage()
getWidgetClassPackage in interface XStartupObjectpublic void setupFrameset(java.util.Hashtable params)
setupFrameset in interface XStartupObjectparams - the framset parameters if any
public java.lang.Object displayDecoration(PageSupport page,
java.lang.String constraint)
displayDecoration in interface XStartupObjectpage - the new pageconstraint - a value controlling how and where the decoration is
displayed, this value is application type specific
public void refresh()
refresh in interface XStartupObjectpublic void restoreViews()
Restore the normal page views, as in the case of the docking layout where panels may be zoomed or minimized. The method is called prior to the display of a new page.
In this context the method has no effect.
restoreViews in interface XStartupObjectpublic java.lang.Object getContentPaneEx()
XStartupObject
getContentPaneEx in interface XStartupObjectpublic void setAppTitle(java.lang.String title)
XStartupObject
setAppTitle in interface XStartupObjectpublic void setIcon(java.awt.Image icon)
setIcon in interface XStartupObjectimg - the image name
public void setupWindow(XApplicationContext context,
XProject currentProject,
int clientWidth,
int clientHeight)
setupWindow in interface XStartupObjectcontext - the owner application contextcurrentProject - the owner projectclientWidth - the desired width of the applicationclientHeight - the desired height of the applicationpublic void init()
init in class java.applet.Appletpublic java.awt.Frame getFrame()
public void setMenuBar(java.awt.MenuBar mb)
mb - the new menu barpublic java.lang.Object getApplicationMenuBar()
getApplicationMenuBar in interface XStartupObjectpublic void setApplicationMenuBar(java.lang.Object mb)
setApplicationMenuBar in interface XStartupObjectmb - the menubar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||