|
||||||||||
| 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
javax.swing.JApplet
net.xoetrope.swing.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-2006. See license.txt for more details
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JApplet |
|---|
javax.swing.JApplet.AccessibleJApplet |
| 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
The application window |
protected boolean |
bUseWindow
true if a popup window is in use |
protected javax.swing.JFrame |
clientFrame
The Application frame |
protected java.awt.Container |
pageHolder
The panel holding the page content |
| Fields inherited from class javax.swing.JApplet |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| 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,
javax.swing.JFrame frame)
Create a new aplication. |
|
| 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. |
java.lang.Object |
getContentPaneEx()
Get the content pane used by XUI - the container in which pages are displayed |
javax.swing.JFrame |
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. |
protected static void |
loadUI(java.lang.String[] args)
Do the actual work of loading the UI |
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(javax.swing.JMenuBar mb)
Set the menubar. |
void |
setupFrameset(java.util.Hashtable params)
Setup frameset. |
void |
setupWindow(XApplicationContext context,
XProject currentProject,
int clientWidth,
int clientHeight)
Setup the main application window |
| Methods inherited from class javax.swing.JApplet |
|---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.applet.Applet |
|---|
destroy, 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, 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, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, 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, 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, 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 javax.swing.JFrame clientFrame
protected boolean bUseWindow
protected XApplicationContext applicationContext
protected java.awt.Container pageHolder
| Constructor Detail |
|---|
public XApplet()
args - the application command-line argumentsframe - the parent frame
public XApplet(java.lang.String[] args,
javax.swing.JFrame frame)
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line argumentsprotected static void loadUI(java.lang.String[] args)
args - public 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()
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 application context for the new applicationcurrentProject - the current projectclientWidth - the desired width for the new windowclientHeight - the desired height for the new windowpublic void init()
init in class java.applet.Appletpublic javax.swing.JFrame getFrame()
public void setMenuBar(javax.swing.JMenuBar 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 | |||||||||