ice.storm
Interface ViewportCallback

All Known Implementing Classes:
CallbackAdapter

public interface ViewportCallback

Application callback. An application that uses ICE Browser can provide it with the callback. This will allow the browser to ask application for resources.


Method Summary
 Container createTopLevelContainer(Viewport viewport)
          Create a new top-level browser window and return an awt container that can be used by StormBase for placing pilots.
 void disposeTopLevelContainer(Viewport viewport)
          When the StormBase wants to close the viewport, the application is notified about this so it can terminate the browser window associated with this viewport.
 void init(StormBase base)
          When the callback is given to StormBase, it initializes the callback with this call.
 void processViewportMessage(Viewport view, String messageName, Object addArg, Object value)
           
 

Method Detail

init

public void init(StormBase base)
When the callback is given to StormBase, it initializes the callback with this call.


createTopLevelContainer

public Container createTopLevelContainer(Viewport viewport)
Create a new top-level browser window and return an awt container that can be used by StormBase for placing pilots. If the application does not want a new window to be displayed, it can return null.

Parameters:
viewport - the viewport that will be associated with this awt container. The viewport object may contain some parameters describing how the new browser window should look like (for example, from window.open() in JavaScript)
Returns:
an awt container (light or heavy) that the browser can use, or null if the window should not be popped up.

disposeTopLevelContainer

public void disposeTopLevelContainer(Viewport viewport)
When the StormBase wants to close the viewport, the application is notified about this so it can terminate the browser window associated with this viewport.


processViewportMessage

public void processViewportMessage(Viewport view,
                                   String messageName,
                                   Object addArg,
                                   Object value)