|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.applet.ApplicationContext
ApplicationContext verwaltet mehrere Appltes un hilft, Applets als Applications laufen zu
lassen. ApplicationContext übernimmt dabei die Rolle des AppletContextes bei normalen
Applet.
Mit registerApplet können Applets registriert, mit initApplet initialisiert und mit start
und stop bzw. destroy gestartet, gestoppt oder zerstört werden. Für jedes Applet kann
noch ein CloseMode festgelegt werden; damit kann ein Applet beim Schließen beispielsweise
automatische alle aktiven Applets beenden. Mit setSystemExitMode kann man festlegen, ob
die Applikation beendet werden soll, wenn alle Applets beendet wurden.
Beim Registrieren wird für das Applet ein AppletStub, in dem Fall ein ApplicationStub
erzeugt und mit dem Applet verknüpft. Der ApplicationStub übernimmt die Erstellung des
Appletfensters und steuert die Applet-Aktionen init/start/stop/destroy.
ApplicationAppplet Vereinfacht den Zugriff auf ApplicationContext etwas, es können aber
beliebige bestehende Applets gestartet werden.
ApplicationStub
,
AppletControl
,
ApplicationApplet
Field Summary | |
static byte |
ALL_DESTROYED
Konstante für setSystemExitMode: Applikation wird beendet, wenn alle Applets zerstört wurden. |
static byte |
ALL_STOPPED
Konstante für setSystemExitMode: Applikation wird beendet, wenn alle Applets gestoppt wurden. |
static byte |
DESTROY_ALL
Zerstört alle Applets, wenn dieses Applet zerstört wird. |
static byte |
NOTHING
Nichts weiter passiert, wenn das Applet gestoppt wird. |
static byte |
STOP_ALL
Alle Applets werden gestoppt, wenn dieses Applet gestoppt wird. |
Method Summary | |
void |
destroyAllApplets()
Stoppt und zerstört alle Applets |
void |
destroyApplet(java.applet.Applet applet)
Beendet das Applet applet. |
java.applet.Applet |
getApplet(java.lang.String name)
Finds and returns the applet in the document represented by this applet context with the given name. |
AppletControl |
getAppletControl(java.applet.Applet applet)
Liefert das AppletWindowControl-Objekt des Applets applet. |
java.lang.String |
getAppletName(java.applet.Applet applet)
Liefert den Namen des Applets applet. |
java.util.Enumeration |
getApplets()
Finds all the applets in the document represented by this applet context. |
java.applet.AudioClip |
getAudioClip(java.net.URL url)
Creates an audio clip. |
java.net.URL |
getCodeBase()
Liefert die Code-Base-URL für alle verknüpften Applets. |
java.lang.String |
getCodeBasePath()
Liefert den gesetzten CodeBasePath. |
java.net.URL |
getDocumentBase()
Liefert die Document-Base-URL für alle verknüpften Applets. |
java.awt.Image |
getImage(java.net.URL url)
Returns an Image object that can then be painted on
the screen. |
void |
initApplet(java.applet.Applet applet,
java.awt.Container container,
int pos)
Initialisiert das Applet applet und fügt es an den Container an Position pos an. |
void |
initApplet(java.applet.Applet applet,
java.lang.String title,
int width,
int height)
Initialisiert das Applet applet und setzt den Titel sowie die Größe des Appletfensters. |
void |
initApplet(java.applet.Applet applet,
java.lang.String name,
java.lang.String title,
int width,
int height)
Registriert und initialisiert das Applet applet und setzt den Titel des Appletfensters. |
void |
registerApplet(java.applet.Applet applet,
java.lang.String name)
Registriert das Applet applet mit dem Namen name bei diesem AppletContext. |
void |
setCodeBasePath(java.lang.String path)
Setzt den Pfad für Code-Base und Document-Base für die Simulation eines Applets. |
void |
setStopMode(java.applet.Applet applet,
byte mode)
Setzt den Stopmode des Applets applet, d.h bestimmt, was passiert, wenn applet gestoppt bzw. zerstört wird. |
void |
setSystemExitMode(byte mode)
Legt fest, wann eine Application durch SystemExit beendet werden soll. |
void |
showDocument(java.net.URL url)
Replaces the Web page currently being viewed with the given URL. |
void |
showDocument(java.net.URL url,
java.lang.String target)
Requests that the browser or applet viewer show the Web page indicated by the url argument. |
void |
showStatus(java.lang.String status)
Requests that the argument string be displayed in the "status window". |
void |
startApplet(java.applet.Applet applet)
Startet das Applet applet. |
void |
startApplet(java.lang.String name,
java.applet.Applet applet,
int width,
int height,
java.lang.String title)
Startet das Applet Applet mit dem Namen name in einem Fenster der Breite width und Höhe height mit dem Titel title. |
void |
stopAllApplets()
Stoppt alle Applets. |
void |
stopApplet(java.applet.Applet applet)
Stoppt das Applet applet. |
void |
unregisterApplet(java.applet.Applet applet)
Entfernt das Applet applet von der Liste registrierter Applets. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte NOTHING
public static final byte STOP_ALL
public static final byte DESTROY_ALL
public static final byte ALL_STOPPED
public static final byte ALL_DESTROYED
Method Detail |
public void registerApplet(java.applet.Applet applet, java.lang.String name)
applet
- zu registrierendes Appletname
- Applet-Namepublic void unregisterApplet(java.applet.Applet applet)
applet
- zu entfernendes Appletpublic void setStopMode(java.applet.Applet applet, byte mode)
applet
- Appletmode
- Stopmode (eine Konstante aus {NOTHING,CLOSE_ALL,DESTROY_ALL})public void initApplet(java.applet.Applet applet, java.lang.String title, int width, int height)
applet
- zu initialisierendes Applettitle
- Titel des Appletfensterswidth
- Breite des AppletFenstersheight
- Höhe des AppletFensterspublic void initApplet(java.applet.Applet applet, java.awt.Container container, int pos)
applet
- zu initialisierendes Appletcontainer
- Containerpos
- Position im Containerpublic void initApplet(java.applet.Applet applet, java.lang.String name, java.lang.String title, int width, int height)
applet
- zu initialisierendes Appletname
- Applet-Nametitle
- Titel des Appletfensterswidth
- Breite des AppletFenstersheight
- Höhe des AppletFensterspublic void startApplet(java.applet.Applet applet)
applet
- zu startendes Appletpublic void startApplet(java.lang.String name, java.applet.Applet applet, int width, int height, java.lang.String title)
name
- Applet-Nameapplet
- zu startendes Appletwidth
- Breite des AppletFenstersheight
- Höhe des AppletFensterstitle
- Titel des Appletfensterspublic void stopApplet(java.applet.Applet applet)
applet
- Appletpublic void stopAllApplets()
public void destroyAllApplets()
public void destroyApplet(java.applet.Applet applet)
applet
- Appletpublic java.lang.String getAppletName(java.applet.Applet applet)
applet
- Appletpublic void setSystemExitMode(byte mode)
mode
- neuer SystemExitMode:public void setCodeBasePath(java.lang.String path)
path
- neuer Pfadpublic java.lang.String getCodeBasePath()
public java.net.URL getCodeBase()
public java.net.URL getDocumentBase()
public AppletControl getAppletControl(java.applet.Applet applet)
applet
- Appletpublic java.applet.AudioClip getAudioClip(java.net.URL url)
getAudioClip
in interface java.applet.AppletContext
url
- an absolute URL giving the location of the audio clip.public java.awt.Image getImage(java.net.URL url)
Image
object that can then be painted on
the screen. The url
argument
that is
passed as an argument must specify an absolute URL.
This method always returns immediately, whether or not the image exists. When the applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.
getImage
in interface java.applet.AppletContext
url
- an absolute URL giving the location of the image.Image
public java.applet.Applet getApplet(java.lang.String name)
name
attribute.getApplet
in interface java.applet.AppletContext
name
- an applet name.null
if
not found.public java.util.Enumeration getApplets()
getApplets
in interface java.applet.AppletContext
public void showDocument(java.net.URL url)
showDocument
in interface java.applet.AppletContext
url
- an absolute URL giving the location of the document.public void showDocument(java.net.URL url, java.lang.String target)
url
argument. The
target
argument indicates where to display the frame.
The target argument is interpreted as follows:
"_self" | show in the current frame |
"_parent" | show in the parent frame |
"_top" | show in the topmost frame |
"_blank" | show in a new unnamed top-level window |
name | show in a new top-level window named name |
An applet viewer or browser is free to ignore showDocument
.
showDocument
in interface java.applet.AppletContext
url
- an absolute URL giving the location of the document.target
- a String
indicating where to display
the page.public void showStatus(java.lang.String status)
showStatus
in interface java.applet.AppletContext
status
- a string to display in the status window.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |