com.tirsen.angkor
Interface View

All Known Subinterfaces:
Window
All Known Implementing Classes:
Component, EmptyView, ViewLink

public interface View

This is the interface the engine has to the widgets.

The responsibilities a view has is:

  • to render itself based on data from a Model and other attributes.
  • parse the request.
  • update the Model according to the parsed request.
  • post events to Controllers according to the parsed request.

    When we implement pluggable look-and-feel the rendering can be overrided by a look-and-feel. In that case the view needs to document how it parses a request well. This implies that the look-and-feel has a white-box view of the view.

    Version:
    $Revision: 1.4 $
    $Id: View.java,v 1.4 2002/10/09 21:37:37 tirsen Exp $
    Author:
    $Author: tirsen $

    Method Summary
     View getContainer()
               
     boolean isVisible()
              Check whether this view is visible or not.
     void parse(RenderContext context)
              When a view has registered during rendering for parsing in the RenderContext the context will call this method on the next request.
     void render(RenderContext context)
              Render this view on the given context if the view is visible.
     void setContainer(View container)
               
     void setVisible(boolean visible)
              Specify whether this view is visible or not.
     java.lang.String uniqueId(RenderContext context)
              The unique id is unique over an application instance.
     

    Method Detail

    getContainer

    public View getContainer()

    setContainer

    public void setContainer(View container)

    uniqueId

    public java.lang.String uniqueId(RenderContext context)
    The unique id is unique over an application instance. Ie. unique over user/session and application instance.


    render

    public void render(RenderContext context)
                throws java.io.IOException
    Render this view on the given context if the view is visible. Performed during render-phase.

    java.io.IOException
    See Also:
    setVisible(boolean), isVisible()

    parse

    public void parse(RenderContext context)
    When a view has registered during rendering for parsing in the RenderContext the context will call this method on the next request. The view is responsible for parsing the request based on it's unique id and update models and sending events based on the request. In most cases the EventQueue should be used to send the events. This ensures that the models are all correctly updated before the events are actually processed. This is important since controllers (whom processes the events) must rely on this to process events correctly.


    setVisible

    public void setVisible(boolean visible)
    Specify whether this view is visible or not.


    isVisible

    public boolean isVisible()
    Check whether this view is visible or not.



    Copyright © 2002-2002 . All Rights Reserved.