|
|||||||||
| 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
org.formaria.swing.Applet
public class Applet
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 Aria 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 Applet 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) Formaria Ltd., 2008. 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 ApplicationContext |
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 | |
|---|---|
Applet()
A default constructor. |
|
Applet(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 Aria - 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 |
restoreState(XmlElement stateElement)
Restore the application state |
void |
restoreViews()
Restore the normal page views, as in the case of the docking layout where panels may be zoomed or minimized. |
void |
saveState(XmlElement stateElement)
Save the application state |
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(ApplicationContext context,
Project 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 org.formaria.aria.StartupObject |
|---|
getDocumentBase, getParameter, setSize, validate |
| Field Detail |
|---|
protected java.awt.Window appWindow
protected javax.swing.JFrame clientFrame
protected boolean bUseWindow
protected ApplicationContext applicationContext
protected java.awt.Container pageHolder
| Constructor Detail |
|---|
public Applet()
args - the application command-line argumentsframe - the parent frame
public Applet(java.lang.String[] args,
javax.swing.JFrame frame)
args - the optional command line arguments
frame - the main (application) frame| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the optional command line arguments
protected static void loadUI(java.lang.String[] args)
args - the optional command line arguments
public java.lang.Object getParentObject()
getParentObject in interface StartupObjectpublic java.lang.String getWidgetClassPackage()
getWidgetClassPackage in interface StartupObjectpublic void setupFrameset(java.util.Hashtable params)
setupFrameset in interface StartupObjectparams - the framset parameters if any
public java.lang.Object displayDecoration(PageSupport page,
java.lang.String constraint)
displayDecoration in interface StartupObjectpage - 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 StartupObjectpublic 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 StartupObjectpublic java.lang.Object getContentPaneEx()
getContentPaneEx in interface StartupObjectpublic void setAppTitle(java.lang.String title)
StartupObject
setAppTitle in interface StartupObjectpublic void setIcon(java.awt.Image icon)
setIcon in interface StartupObjectimg - the image name
public void setupWindow(ApplicationContext context,
Project currentProject,
int clientWidth,
int clientHeight)
setupWindow in interface StartupObjectcontext - 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 StartupObjectpublic void setApplicationMenuBar(java.lang.Object mb)
setApplicationMenuBar in interface StartupObjectmb - the menubarpublic void restoreState(XmlElement stateElement)
restoreState in interface PersistentStatepublic void saveState(XmlElement stateElement)
saveState in interface PersistentStatethe - elements to hold the page state
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||