com.tirsen.angkor
Class ViewLink

java.lang.Object
  |
  +--com.tirsen.angkor.AbstractViewFactory
        |
        +--com.tirsen.angkor.ViewLink
All Implemented Interfaces:
java.io.Serializable, View, ViewFactory

public class ViewLink
extends AbstractViewFactory
implements View

Refactor this a little bit. Maybe we need a ViewHolder that holds a named registered component from an application. We don't need this class though, it is only used internally within an application.

Version:
$Revision: 1.4 $
Author:
Jon Tirs´n (tirsen@users.sourceforge.net)
See Also:
Serialized Form

Constructor Summary
ViewLink(ViewFactory original)
           
 
Method Summary
 View getContainer()
           
 ViewFactory getTarget()
           
 View getView()
          Two consecutive calls may or may not return the same instance.
 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 relink(ViewFactory target)
           
 void render(RenderContext context)
          Render this view on the given context if the view is visible.
 void reset()
          Resets the link to it's original binding.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewLink

public ViewLink(ViewFactory original)
Method Detail

getTarget

public ViewFactory getTarget()

relink

public void relink(ViewFactory target)

reset

public void reset()
Resets the link to it's original binding.


getView

public View getView()
Description copied from interface: ViewFactory
Two consecutive calls may or may not return the same instance.

Specified by:
getView in interface ViewFactory

getContainer

public View getContainer()
Specified by:
getContainer in interface View

setContainer

public void setContainer(View container)
Specified by:
setContainer in interface View

uniqueId

public java.lang.String uniqueId(RenderContext context)
Description copied from interface: View
The unique id is unique over an application instance. Ie. unique over user/session and application instance.

Specified by:
uniqueId in interface View

render

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

Specified by:
render in interface View
java.io.IOException
See Also:
View.setVisible(boolean), View.isVisible()

parse

public void parse(RenderContext context)
Description copied from interface: View
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.

Specified by:
parse in interface View

setVisible

public void setVisible(boolean visible)
Description copied from interface: View
Specify whether this view is visible or not.

Specified by:
setVisible in interface View

isVisible

public boolean isVisible()
Description copied from interface: View
Check whether this view is visible or not.

Specified by:
isVisible in interface View


Copyright © 2002-2002 . All Rights Reserved.