|
||||||||||
| 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
edu.neu.ccs.gui.DirectApplet
Class DirectApplet provides a base class
for building an applet simply. The designer must build
a derived class with one method:
public Object createGUI()
The object returned by this method should either be a
Component or be capable of being converted
to such using ComponentFactory.makeComponent.
If so, the component will be the content of this applet.
If not, an exception will be thrown and displayed in a
dialog.
The derived class may, of course, have additional helper data and/or methods.
As of 2.6.0f, DirectApplet will add itself
to the count of open frame objects maintained by the
JPTFrame class. The rationale for this
is discussed in the comments for JPTFrame.
As of 2.6.0g, setSize is called in the
built-in init method based on the size of
the component returned by createGUI.
In 2.7.0, implements JPTConstants for
convenience. This parallels DisplayPanel.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JApplet |
JApplet.AccessibleJApplet |
| Nested classes inherited from class java.applet.Applet |
Applet.AccessibleApplet |
| Nested classes inherited from class java.awt.Panel |
Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected Component |
component
The component returned by createGUI
if the initialization call was successful. |
protected boolean |
initializationSuccessful
Was the initialization by createGUI
successful? |
| Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.applet.Applet |
|
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DirectApplet()
|
|
| Method Summary | |
private void |
createAppletGUI()
The standard createAppletGUI method for DirectApplet |
abstract Object |
createGUI()
The object returned by this method should either be a Component or be capable of being converted
to such using ComponentFactory.makeComponent. |
void |
destroy()
The default destroy method decrements the count of open frames and applets maintained by JPTFrame. |
void |
init()
The standard init method for DirectApplet. |
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected boolean initializationSuccessful
createGUI
successful?
protected Component component
createGUI
if the initialization call was successful.
| Constructor Detail |
public DirectApplet()
| Method Detail |
public abstract Object createGUI()
The object returned by this method should either be a
Component or be capable of being converted
to such using ComponentFactory.makeComponent.
If so, the component will be the content of this applet.
If not, an exception will be thrown and displayed in a
dialog.
This method must be instantiated in a derived class.
public final void init()
The standard init method for DirectApplet.
Executes a job on the event-dispatching thread to create this applet's GUI.
If successful, increments the count of open frames
and applets maintained by JPTFrame.
public void destroy()
The default destroy method decrements the count of open
frames and applets maintained by JPTFrame.
If this method is overridden, the override method must make the following call at its end:
super.destroy();
private final void createAppletGUI()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||