net.sf.webmancer.widget
Class AbstractWidget

java.lang.Object
  extended by net.sf.webmancer.widget.AbstractWidget
All Implemented Interfaces:
IModelable, IWidget, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
AbstractContainer, AbstractDataView

public abstract class AbstractWidget
extends java.lang.Object
implements IWidget

Author:
Michal Burda

Constructor Summary
AbstractWidget()
           
 
Method Summary
abstract  void build(IModelBuilder builder)
           
 java.lang.String getBeanName()
          Return the widget's name.
 IWidget getParent()
          Get parent widget.
 void handleEvent(Event event)
          Handle the given event.
 void putEvent(Event event)
          Add the given event to the queue of events to be handled.
 void setBeanName(java.lang.String name)
           
 void setParent(IWidget parent)
          Set the parent of this widget.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractWidget

public AbstractWidget()
Parameters:
name -
Method Detail

getBeanName

public java.lang.String getBeanName()
Description copied from interface: IWidget
Return the widget's name.

Specified by:
getBeanName in interface IWidget
Returns:
the widget's name.
See Also:
IWidget.getBeanName()

setBeanName

public void setBeanName(java.lang.String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware
See Also:
BeanNameAware.setBeanName(java.lang.String)

handleEvent

public void handleEvent(Event event)
Description copied from interface: IWidget
Handle the given event.

Specified by:
handleEvent in interface IWidget
Parameters:
event - an event to be handled.
See Also:
IWidget.handleEvent(net.sf.webmancer.base.Event)

getParent

public IWidget getParent()
Description copied from interface: IWidget
Get parent widget.

Specified by:
getParent in interface IWidget
Returns:
the parent widget or null if the actual widget is a root.
See Also:
IWidget.getParent()

setParent

public void setParent(IWidget parent)
Description copied from interface: IWidget
Set the parent of this widget.

Specified by:
setParent in interface IWidget
Parameters:
parent - the parent widget
See Also:
IWidget.setParent(net.sf.webmancer.widget.IWidget)

putEvent

public void putEvent(Event event)
Description copied from interface: IWidget
Add the given event to the queue of events to be handled. Implementations often simply call the putEvent() of the parent widget. Usually, only root widgets hold the event queue and control the event handling mechanism.

Specified by:
putEvent in interface IWidget
Parameters:
event - an event to be added to the queue of events.
See Also:
IWidget.putEvent(net.sf.webmancer.base.Event)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

build

public abstract void build(IModelBuilder builder)
                    throws ModelingException
Specified by:
build in interface IModelable
Throws:
ModelingException
See Also:
IModelable.build(net.sf.webmancer.model.IModelBuilder)


Copyright © 2006-2007. All Rights Reserved.