|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.Pilot
Pilot (rendering module). An implementation of a Pilot depends only on main Storm classes and on the low-level library used. For example for an OpenGL based ASC pilot, the pilot class will depend on Storm classes and Magician library.
Pilot lifetime:
Pilot (pilot) is loaded
pilot.init(gfxToolkit);
Component c = pilot.createComponent();
if (c==null)
pilot is lightweight and can be painted anywhere
else
container.add(c);
pilot.clear();
pilot.parse();
....
pilot.dispose();
| Constructor Summary | |
Pilot()
|
|
| Method Summary | |
void |
applySnapshot(Object snap)
|
void |
beforeUnload()
|
void |
clear(String contentType)
Clear the displayed content |
Component |
createComponent()
Ask the pilot to create its GUI. |
StormPrinter |
createPrinter()
Ask the pilot to create a StormPrinter instance that can be used to print the pilot's content |
void |
dispose()
When the pilot is no longer needed, the system calls this method to allow the pilot to get rid of all resources it has been using. |
Object |
execDynamicMethodOnWindow(DynamicObject window,
String name,
Object[] args,
DynEnv env)
|
Viewport |
findOrCreateViewport(String viewportName)
Utility method which will either create a new viewport or it will return an existing viewport which has the same viewport name. |
Viewport |
findOrCreateViewport(String viewportName,
String location)
Utility method which will either create a new viewport with knowledge of the content URI or it will return an existing viewport which has the same viewport name. |
void |
firePropertyChange(String propName,
Object oldValue,
Object newValue)
Fire a property change event. |
void |
getAllPilotInstances(Vector result)
Append to result all pilots that are instances of the same type as this pilot. |
DocPane |
getDocPane()
|
DynamicObject |
getDocumentObject()
Get pilot notion of a document object for scripters |
Object |
getDynamicValueOnWindow(DynamicObject window,
String name,
DynEnv env)
|
Viewport |
getPilotViewport()
Get hold of an viewport for this pilot from Storm. |
Object |
getSnapshot()
|
StormBase |
getStorm()
Get StormBase that manages the pilot. |
UrlMaster |
getUrlMaster()
Deprecated. As of 6.1, no instance of UrlMaster is needed
for the contained utility methods. Please use
. |
Container |
getViewportContainer()
Get the nearest graphical container that this pilot viewport lives in. |
String |
getViewportId()
Get the id of the viewport in which this pilot lives |
Object |
getViewportProperty(String name)
Get a configuation property set for the viewport in which this pilot lives |
void |
gotoRef(String ref)
If the Storm is asked to go to a URL with a Ref and the pilot is already displaing the URL, this method will be called to tell the pilot to go to a Ref in the document. |
void |
init(String componentToolkitName)
Initialize a pilot. |
boolean |
isDetached()
If this method returns true, then the pilot is considered to be detached and it will not participate in normal Storm/viewport activity. |
boolean |
isStopRequested()
Check if stop loading has been requested on the pilot viewport |
void |
modifiedByScript()
Deprecated. Pilot is notified by Storm via this callback that somebody may have modified some information in the pilot. For example, a scripter may have updated the styles from another thread and pilot should make sure to validate its view. |
void |
onLoadingDone()
|
void |
onLowMemory()
Tells the pilot to free resources while still be somewhat useful |
void |
parse(ContentLoader cl)
Parse the data from the ContentLoader |
void |
parsingDone()
|
boolean |
refExists(String ref)
|
void |
refresh()
This one can be called when e.g a lightweight pilot change it size, or something else out side the pilot context that require the pilot to redraw itself. |
void |
refreshViewport()
Pilot can use this method to notify storm that something inside the pilot has been changed and its viewport should be refreshed It is the only way a lightweight pilot (LPilot) can repaint itself. |
void |
renderContent(String loc,
String contentType,
String viewportName)
Display content from a specified location in the specified viewport. |
void |
resume()
Tells the pilot to wake up from the "suspend" mode. |
int |
setDynamicValueOnWindow(DynamicObject window,
String name,
Object value,
DynEnv env)
|
protected void |
setZoom(int zoom)
Set zooming value. |
void |
stopLoading()
Tells the pilot to stop loading |
void |
suspend()
Tells the pilot to go into "suspend" mode and use as little resources as possible. |
void |
updateFrameList()
Make sure that storm has proper list of child vieports representing all frame objects that should be visible to scripts. |
void |
viewportBecameActive()
Using this method pilot can tell Storm that the pilot/viewport has become currently active |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Pilot()
| Method Detail |
public StormBase getStorm()
StormBase that manages the pilot.
public void init(String componentToolkitName)
componentToolkitName - pilot contextpublic void dispose()
protected void setZoom(int zoom)
public boolean isDetached()
public void clear(String contentType)
public void parse(ContentLoader cl)
throws IOException
IOExceptionpublic void gotoRef(String ref)
public boolean refExists(String ref)
public void stopLoading()
public void modifiedByScript()
public void suspend()
public void resume()
public void onLowMemory()
public Component createComponent()
public StormPrinter createPrinter()
public Object getDynamicValueOnWindow(DynamicObject window,
String name,
DynEnv env)
public int setDynamicValueOnWindow(DynamicObject window,
String name,
Object value,
DynEnv env)
public Object execDynamicMethodOnWindow(DynamicObject window,
String name,
Object[] args,
DynEnv env)
public DynamicObject getDocumentObject()
public void updateFrameList()
public Object getSnapshot()
public void applySnapshot(Object snap)
public void parsingDone()
public void onLoadingDone()
public void beforeUnload()
public void refresh()
public final String getViewportId()
public final Viewport getPilotViewport()
public DocPane getDocPane()
public final void getAllPilotInstances(Vector result)
public final Object getViewportProperty(String name)
name - property name
public final void firePropertyChange(String propName,
Object oldValue,
Object newValue)
propName - the property nameoldValue - the old value of the propertynewValue - the new value of the property
public final void renderContent(String loc,
String contentType,
String viewportName)
loc - location of the contentcontentType - content type of the data. If this parameter is non-null
its value overrides any contentType data received during loading.viewportName - the name of the viewport to render the content intopublic final Viewport findOrCreateViewport(String viewportName)
viewportName - the name of the viewport which is used for the creation
of a new viewport if the the viewport name can not be found in the
current list of viewports
public final Viewport findOrCreateViewport(String viewportName,
String location)
viewportName - the name of the viewport which is used for the creation
of a new viewport if the the viewport name can not be found in the
current list of viewportslocation - if a new viewport is created the locaiton URI is set
to the new viewport
public final boolean isStopRequested()
public final void refreshViewport()
public final void viewportBecameActive()
public final Container getViewportContainer()
public final UrlMaster getUrlMaster()
UrlMaster is needed
for the contained utility methods. Please use
URLResolver.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||