com.vinay.ui.vinui.fw.core
Class Control

java.lang.Object
  extended bycom.vinay.ui.vinui.fw.core.Control
Direct Known Subclasses:
Button, HorizontalLine, HyperLink, Image, List, MultilineTextInput, Table, Text, TextInput, UIGroup

public abstract class Control
extends java.lang.Object

Represents a UI Element.

Author:
Vinay Nath

Field Summary
protected  java.util.Map bindings
           
 
Constructor Summary
Control()
           
 
Method Summary
 void addUIEventListener(UIEventListener listener)
          Adds a UIEventListener to the control
 void bindAttribute(java.lang.String attributeName, java.lang.String contextAttributeName)
          Bind a control property to a context attribute.
protected  boolean dispatchEvent(UIEvent evt)
           
 long getId()
           
protected  Page getPage()
           
protected  Context getPageContext()
          Returns the context of the page that hosts this control
protected  java.lang.String render()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindings

protected java.util.Map bindings
Constructor Detail

Control

public Control()
Method Detail

getId

public long getId()

bindAttribute

public void bindAttribute(java.lang.String attributeName,
                          java.lang.String contextAttributeName)
Bind a control property to a context attribute.

Parameters:
attributeName - the name of the control property
contextAttributeName - the name of the context attribute

render

protected java.lang.String render()
                           throws VinUIException
Throws:
VinUIException

getPageContext

protected Context getPageContext()
Returns the context of the page that hosts this control

Returns:
the Context object

addUIEventListener

public void addUIEventListener(UIEventListener listener)
Adds a UIEventListener to the control

Parameters:
listener -
Throws:
java.lang.NullPointerException - if listener is null
See Also:
UIEventListener

dispatchEvent

protected boolean dispatchEvent(UIEvent evt)

getPage

protected Page getPage()
Returns:
Returns the page.