com.anabas.sharedlet
Interface SharedletView


public interface SharedletView

A SharedletView represents a user visible perspective on the sharedlet application. A view can have one or more rendering that supports different data formats. For example, the view may support rendering to HTML (text/html) or rendering in a Java application (application/java) or maybe even rendering to an image (image/*).

Examples:

Multiplayer Soccer Game Sharedlet

In the multi-player soccer game example, the possible views could be the referee's view, the goalie's view, and the player's view. Each view renders differently and from different perspectives.

Whitboard Sharedlet

In another example, the whiteboard sharedlet can have 2 views. The control panel view (which are the controls for drawing) and the presentation view which displays the draw objects.


Method Summary
 void activate()
          The view has been activated and is visible to the user.
 void deactivate()
          The view has been deactivated and is now hidden to the user.
 SharedletViewRenderer getRenderer(java.lang.String format)
          Gets the renderer for a particular rendering format.
 

Method Detail

activate

public void activate()
The view has been activated and is visible to the user. The user may click on the view at any time. This function is invoked by the framework when activate/deactivate events occur in the user interface.

deactivate

public void deactivate()
The view has been deactivated and is now hidden to the user. The user can't not see or click on it. This function is invoked by the framework when activate/deactivate events occur in the user interface.

getRenderer

public SharedletViewRenderer getRenderer(java.lang.String format)
Gets the renderer for a particular rendering format.
Parameters:
format - The MIME type of the format to present. For example: text/html, image/gif, application/java
Returns:
The render of this view for a particular format. null if that rendering type does not exist.