|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
net.xoetrope.swt.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
| Field Summary | |
|---|---|
protected XApplicationContext |
applicationContext
|
protected org.eclipse.swt.widgets.Shell |
clientShell
|
protected org.eclipse.swt.widgets.Display |
display
|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
XApplet()
A default constructor. |
|
XApplet(java.lang.String[] args,
org.eclipse.swt.widgets.Shell f,
org.eclipse.swt.widgets.Display d)
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 panel which has the content |
java.net.URL |
getDocumentBase()
Gets of the document |
java.lang.Object |
getFrame()
Gets the Frame containing the applet. |
java.lang.String |
getParameter(java.lang.String param)
Get a startup parameter |
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()
Refresh the parent shell |
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 title to the parent shell |
void |
setIcon(java.awt.Image icon)
Set the icon to the parent shell |
void |
setSize(java.awt.Dimension size)
Sets the size to the shell |
void |
setupFrameset(java.util.Hashtable params)
Setup frameset. |
void |
setupWindow(XApplicationContext context,
XProject currentProject,
int clientWidth,
int clientHeight)
Setup the windowing. |
void |
validate()
Validates the Applet |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.eclipse.swt.widgets.Shell clientShell
protected org.eclipse.swt.widgets.Display display
protected XApplicationContext applicationContext
| Constructor Detail |
|---|
public XApplet()
public XApplet(java.lang.String[] args,
org.eclipse.swt.widgets.Shell f,
org.eclipse.swt.widgets.Display d)
args - the application command-line argumentsf - the parent shelld - the parent display| 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()
getContentPaneEx in interface XStartupObjectpublic void setAppTitle(java.lang.String title)
setAppTitle in interface XStartupObjectpublic void setIcon(java.awt.Image icon)
setIcon in interface XStartupObjecticon - 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()
public java.lang.Object getFrame()
public void validate()
validate in interface XStartupObjectpublic void setSize(java.awt.Dimension size)
setSize in interface XStartupObjectsize - size of the shellpublic java.net.URL getDocumentBase()
getDocumentBase in interface XStartupObjectURL of the document that contains this
applet.Applet.getCodeBase()public java.lang.String getParameter(java.lang.String param)
getParameter in interface XStartupObjectparam - the name of the parameterpublic 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 | |||||||||