|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.StormBase
The Storm core class. Top-level viewport creation happens ONLY from inside the base. In that case the base uses the callback to ask the application for a new top-level container (new browser window or something).
The base stores a list of top-level viewports (ala HTML frames). Each top-level viewport has a graphical container associated with it.
StormBase also manages the list of currently running pilots and scripters.
Note on URL usage... Unfortunately we have to be quite conservative on using URLs since URL must always specify a protocol supported by Java environment. This is wrong, especially for JMF which can have an arbitrary string for a protocol
| Field Summary | |
static String |
EXPIRES_LONG
|
static String |
EXPIRES_STRING
|
static String |
VERSION
|
| Constructor Summary | |
StormBase()
|
|
StormBase(Session session)
|
|
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l,
String viewportId)
Add a listener for property change events for a specific viewport (given by viewportId). |
boolean |
canGoBack(String viewportId)
Deprecated. Use HistoryManager method instead. |
boolean |
canGoForward(String viewportId)
Deprecated. Use HistoryManager method instead. |
void |
clearContent(String contentType,
String viewportName)
Clears a viewport with specified name and sets up a Pilot for processing data of type 'contentType'. |
void |
clearVieportContent(String contentType,
Viewport viewport)
Deprecated. Use
instead. |
void |
clearViewportContent(String contentType,
Viewport viewport)
Clears a viewport with specified name and sets up a Pilot for processing data of type 'contentType'. |
void |
closeViewport(String viewportName)
Close a top-level viewport. |
boolean |
configureViewport(Viewport view)
Initialize new top-level vieport. |
boolean |
configureViewport(Viewport view,
String oldViewId)
Deprecated. Use configureViewport(Viewport) since the second
parameter is never used |
void |
dispose()
Dispose of the StormBase object, releasing all resources. |
Viewport |
findViewportByName(String viewportName)
Search thru all the viewport hierarchies to find a viewport with given name |
Viewport |
getActiveViewport()
Get currently active viewport (normally the html frame that has the focus). |
void |
getAllViewports(Vector buffer)
Get all vieports including children ones into `array' |
StormCallback |
getCallback()
Deprecated. Use getViewportCallback(...) or getScripterCallback(...) instead |
String |
getComponentToolkitName()
|
Container |
getContainer(Container c)
Get the default awt container. |
ContentLoaderFactory |
getContentLoaderFactory()
|
HistoryManager |
getHistoryManager()
Get the history manager |
PilotFactory |
getPilotFactory()
Get pilot factory |
Scripter |
getScripter(String scriptName)
A Pilot uses this method to get a pointer to a Scripter module. |
ScripterCallback |
getScripterCallback()
Get scripter callback |
ScripterFactory |
getScripterFactory()
Deprecated. |
Scripter |
getScripterForCodeLocation(String location)
See if location is a script reference like in javascript:alert("Hello!") |
Session |
getSession()
|
URLClassLoaderFactory |
getURLClassLoaderFactory()
Get ClassLoader factory |
UrlMaster |
getUrlMaster()
Deprecated. As of 6.1, no instance of UrlMaster is needed
for the contained utility methods. Please use
. |
ViewportCallback |
getViewportCallback()
Get current application callback. |
String |
getViewportState(String viewportName)
Get state of a viewport. |
void |
goBack(String viewportId)
Deprecated. Use HistoryManager method instead. |
void |
goForward(String viewportId)
Deprecated. Use HistoryManager method instead. |
boolean |
isEventThread()
|
boolean |
isMimeTypeEnabled(String mimeType)
Check whether handling of the given mimeType is enabled |
Viewport |
newTopLevelViewport(String viewportName)
Creates a new top level viewport when the location of the new content is not know. |
Viewport |
newTopLevelViewport(String viewportName,
String location)
Creates a new top level viewport which has knowledge of the content location which will be used by renderContent. |
void |
reload(String viewportId)
Deprecated. Use HistoryManager method instead. |
void |
removePropertyChangeListener(PropertyChangeListener l,
String viewportId)
Remove a propertyChangeListener. |
void |
renderContent(ContentLoader cl,
String viewportName)
Display content in a viewport. |
void |
renderContent(String loc,
String contentType,
String viewportName)
Display content in a viewport. |
void |
renderContent(String location,
String contentType,
Viewport viewport)
|
void |
renderContentFully(ContentLoader contentLoader,
String viewportName)
Display content in a viewport. |
void |
renderStringContent(String content,
String contentType,
String viewportName)
Display content in a viewport. |
void |
renderStringContent(String content,
String contentType,
Viewport viewport)
Display content in a explicit viewport object. |
void |
renderStringContentFully(String content,
String contentType,
String viewportName)
Display content in a viewport. |
void |
renderStringContentFully(String content,
String contentType,
Viewport viewport)
Display content in a explicit viewport object. |
void |
renderVieportContentFully(ContentLoader contentLoader,
Viewport viewport)
Deprecated. Use
instead. |
void |
renderViewportContent(ContentLoader cl,
Viewport view)
Display content in an explicit viewport object. |
void |
renderViewportContentFully(ContentLoader contentLoader,
Viewport viewport)
Display content in a viewport. |
void |
resume()
Resume the browser |
void |
runOnEventThreadAndWait(Runnable code,
long delay)
|
void |
runOnEventThreadLater(Runnable code,
long delay)
|
void |
setActiveViewport(Viewport view)
Set the active viewport. |
void |
setCallback(StormCallback c)
Deprecated. Use setViewportCallback(...) or setScripterCallback(...) instead |
void |
setComponentToolkitName(String name)
Set the name of the component toolkit to be used by pilots. |
void |
setContainer(Container c,
String viewportName)
Give StormBase a default awt container that will be used for rendering content. |
void |
setContentLoaderFactory(ContentLoaderFactory contentLoaderFactory)
|
void |
setHistoryManager(HistoryManager hm)
Set the history manager |
void |
setMimeTypeEnabled(String mimeType,
boolean enabled)
This method can be used to enable/disable support for displaying content of some type(s). |
void |
setPilotFactory(PilotFactory f)
Set the factory that will be responsible for loading/instantiation of pilots. |
void |
setScripterCallback(ScripterCallback c)
Set scripter subsystem callback to control scripts behavior. |
void |
setURLClassLoaderFactory(URLClassLoaderFactory f)
Set the factory that will be responsible for creating url class loaders used by Storm and pilots. |
void |
setViewportCallback(ViewportCallback c)
Set application callback. |
void |
stopLoading(String viewportName)
Tells the viewport and all its children to stop loading |
void |
stopViewportLoading(Viewport view)
|
void |
suspend()
Suspend all activities. |
static void |
unload()
Deprecated. Use dispose() to close all resources used by StormBase |
void |
unloadAllScripters()
Unload all scripters so no more script code would be executed and objects created by script code could be garbage collected. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String VERSION
public static final String EXPIRES_STRING
public static final String EXPIRES_LONG
| Constructor Detail |
public StormBase()
public StormBase(Session session)
| Method Detail |
public final Session getSession()
public final void setHistoryManager(HistoryManager hm)
hm - history managerpublic final HistoryManager getHistoryManager()
public final ScripterFactory getScripterFactory()
public final void setPilotFactory(PilotFactory f)
f - pilot factory.public final PilotFactory getPilotFactory()
public final void setURLClassLoaderFactory(URLClassLoaderFactory f)
f - the factory.public final URLClassLoaderFactory getURLClassLoaderFactory()
public final void setComponentToolkitName(String name)
name - component toolkit name: 'awt', 'swing' etc.public final String getComponentToolkitName()
public final void setContainer(Container c,
String viewportName)
c - awt container to diplay the output intoviewportName - name of the viewport that is associated with the
containerpublic final Container getContainer(Container c)
public final void setCallback(StormCallback c)
setViewportCallback(ice.storm.ViewportCallback),
setScripterCallback(ice.storm.ScripterCallback)public final StormCallback getCallback()
getViewportCallback(),
getScripterCallback()public final ViewportCallback getViewportCallback()
public final void setViewportCallback(ViewportCallback c)
c - the callback objectpublic final ScripterCallback getScripterCallback()
public final void setScripterCallback(ScripterCallback c)
c - callback objectpublic void setActiveViewport(Viewport view)
view - reference to the viewport becoming active.public Viewport getActiveViewport()
public void addPropertyChangeListener(PropertyChangeListener l,
String viewportId)
public void removePropertyChangeListener(PropertyChangeListener l,
String viewportId)
public boolean isMimeTypeEnabled(String mimeType)
public void setMimeTypeEnabled(String mimeType,
boolean enabled)
public UrlMaster getUrlMaster()
UrlMaster is needed
for the contained utility methods. Please use
URLResolver.
public void renderContent(String loc,
String contentType,
String viewportName)
loc - location (URI) to load the data fromcontentType - content type of the data. If this param is non-null its
value will override the contentType received during the loading
process (for example from a web server).viewportName - the name of the viewport to render the data into.
public void renderContent(String location,
String contentType,
Viewport viewport)
public void renderStringContent(String content,
String contentType,
String viewportName)
content - data to load.contentType - content type of the data. If this param is non-null its
value will override the contentType received during the loading
process (for example from a web server).viewportName - the name of the viewport to render the data into.
public void renderStringContentFully(String content,
String contentType,
String viewportName)
content - data to load.contentType - content type of the data. If this param is non-null its
value will override the contentType received during the loading
process (for example from a web server).viewportName - the name of the viewport to render the data into.
public void renderStringContent(String content,
String contentType,
Viewport viewport)
content - data to load.contentType - content type of the data. If this param is non-null its
value will override the contentType received during the loading
process (for example from a web server).viewport - viewport to render the data into.
public void renderStringContentFully(String content,
String contentType,
Viewport viewport)
content - data to load.contentType - content type of the data. If this param is non-null its
value will override the contentType received during the loading
process (for example from a web server).viewport - viewport to render the data into.
public void renderContent(ContentLoader cl,
String viewportName)
public void renderViewportContent(ContentLoader cl,
Viewport view)
public void renderContentFully(ContentLoader contentLoader,
String viewportName)
public void renderVieportContentFully(ContentLoader contentLoader,
Viewport viewport)
renderViewportContentFully(ContentLoader, Viewport)
instead.
public void renderViewportContentFully(ContentLoader contentLoader,
Viewport viewport)
public void clearContent(String contentType,
String viewportName)
public void clearVieportContent(String contentType,
Viewport viewport)
clearViewportContent(String, Viewport)
instead.
public void clearViewportContent(String contentType,
Viewport viewport)
public Viewport newTopLevelViewport(String viewportName)
viewportName - the name of the viewport to render the data into.
public Viewport newTopLevelViewport(String viewportName,
String location)
viewportName - the name of the viewport to render the data into.location - (URI) to load the data from
public void reload(String viewportId)
HistoryManager method instead.
public void goBack(String viewportId)
HistoryManager method instead.
public boolean canGoBack(String viewportId)
HistoryManager method instead.
public void goForward(String viewportId)
HistoryManager method instead.
public boolean canGoForward(String viewportId)
HistoryManager method instead.
public boolean configureViewport(Viewport view,
String oldViewId)
configureViewport(Viewport) since the second
parameter is never used
public boolean configureViewport(Viewport view)
view - the new top-level vieport
public Viewport findViewportByName(String viewportName)
viewportName - name of the viewport
public void getAllViewports(Vector buffer)
public void closeViewport(String viewportName)
viewportName - name or id of the top-level viewport to close.public String getViewportState(String viewportName)
public void stopLoading(String viewportName)
public void stopViewportLoading(Viewport view)
public void dispose()
public static void unload()
dispose() to close all resources used by StormBase
public void suspend()
public void resume()
public Scripter getScripterForCodeLocation(String location)
public Scripter getScripter(String scriptName)
scriptName - name of the script language
public void unloadAllScripters()
public void runOnEventThreadAndWait(Runnable code,
long delay)
public void runOnEventThreadLater(Runnable code,
long delay)
public boolean isEventThread()
public ContentLoaderFactory getContentLoaderFactory()
public void setContentLoaderFactory(ContentLoaderFactory contentLoaderFactory)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||