com.sapportals.portal.prt.pom
Class AbstractEvent

java.lang.Object
  |
  +--com.sapportals.portal.prt.pom.AbstractEvent
All Implemented Interfaces:
IEvent, IPOMConstants

public abstract class AbstractEvent
extends java.lang.Object
implements IEvent

AbstractEvent is an abstract implementation of the IEvent interface that should be used to create self-defined events.


Fields inherited from interface com.sapportals.portal.prt.pom.IPOMConstants
ABOUT_MODE, ABOUT_REQUEST_EVENT, ACTION_EVENT, AFTER_CONTENT_EVENT, BEFORE_CONTENT_EVENT, COMPONENT_EVENT, COMPONENT_NODE, DEFAULT_MODE, EDIT_ACKNOWLEDGE_EVENT, EDIT_MODE, EDIT_REQUEST_EVENT, HELP_MODE, HELP_REQUEST_EVENT, LOGON_EVENT, LOGON_MODE, LOGOUT_EVENT, ON_NODE_READY_EVENT, ON_NODE_REMOVE_EVENT, ON_POM_READY_EVENT, PORTAL_NODE, PREVIEW_MODE, PREVIEW_REQUEST_EVENT, REFRESH_MODE, REFRESH_REQUEST_EVENT, REQUEST_EVENT, TEST_MODE
 
Constructor Summary
AbstractEvent()
           
 
Method Summary
 boolean getBubbles()
          Finds out whether this event bubbles
 boolean getCancelable()
          Finds out wether this event's bubbling can be canceled
 INode getCurrentTarget()
          Gets the current target node of this event
 INode getTarget()
          Gets the original target of the event.
 EventType getType()
          Retrieves the type of the event.
protected  void setBubbles(boolean bubbles)
          Sets wether this event is supposed to bubble
protected  void setCancelable(boolean cancelable)
          Sets wether the bubbling can be canceled
 void setCurrentTarget(INode eventTarget)
          Sets the current target of the event, i.e. the one those listener will have this event dispatched to.
 void setTarget(INode target)
          Defines the original target of the event, i.e. the target the event was originally fired on
Note: This method should not be called directly, instead the portal implementation will use it to indicate the event's target.
protected  void setType(EventType type)
          Sets the type of this event
 void stopPropagation()
          Stops the propagation (for now only bubbling) of the event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEvent

public AbstractEvent()
Method Detail

getType

public EventType getType()
Retrieves the type of the event.
Specified by:
getType in interface IEvent
Returns:
the event type

getBubbles

public boolean getBubbles()
Finds out whether this event bubbles
Specified by:
getBubbles in interface IEvent
Returns:
true if the event has bubbling behavior else false.

getCurrentTarget

public INode getCurrentTarget()
Gets the current target node of this event
Specified by:
getCurrentTarget in interface IEvent
Returns:
The target node.

getTarget

public INode getTarget()
Gets the original target of the event.
An event can be dispatched to several nodes. The current target is available via getCurrentTargetMethod.
Specified by:
getTarget in interface IEvent
Returns:
the original target node

getCancelable

public boolean getCancelable()
Finds out wether this event's bubbling can be canceled
Specified by:
getCancelable in interface IEvent

stopPropagation

public void stopPropagation()
Stops the propagation (for now only bubbling) of the event
Specified by:
stopPropagation in interface IEvent

setCurrentTarget

public void setCurrentTarget(INode eventTarget)
Sets the current target of the event, i.e. the one those listener will have this event dispatched to.
Note: This method should not be called directly, instead the portal implementation will use it to indicate the current target. The set value will not be evaluated by the portal implementation.
Specified by:
setCurrentTarget in interface IEvent
Parameters:
eventTarget -  

setTarget

public void setTarget(INode target)
Defines the original target of the event, i.e. the target the event was originally fired on
Note: This method should not be called directly, instead the portal implementation will use it to indicate the event's target. The set value will not be evaluated by the portal implementation.
Specified by:
setTarget in interface IEvent
Parameters:
target -  

setType

protected void setType(EventType type)
Sets the type of this event
Parameters:
type -  

setBubbles

protected void setBubbles(boolean bubbles)
Sets wether this event is supposed to bubble
Parameters:
bubbles -  

setCancelable

protected void setCancelable(boolean cancelable)
Sets wether the bubbling can be canceled
Parameters:
cancelable -