com.binaryfantasy.murq.event
Class ContentEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.binaryfantasy.murq.event.ContentEvent
All Implemented Interfaces:
com.binaryfantasy.bfx.events.IDispatchableEvent<IContentListener>, Serializable

public class ContentEvent
extends EventObject
implements com.binaryfantasy.bfx.events.IDispatchableEvent<IContentListener>

An event indicating that a unit of content has been altered in some way.

Author:
Bill Weiss
See Also:
Serialized Form

Nested Class Summary
static class ContentEvent.Type
          Indicates the type of change that has been performed on a unit of content.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContentEvent(ContentEvent.Type type, SourceKey key, IContent content)
          Constructs a new event.
 
Method Summary
 void dispatch(IContentListener listener)
           
 IContent getContent()
          Returns the affected content, or null if the content itself was not available.
 SourceKey getSourceKey()
          Returns the SourceKey of the affected content.
 ContentEvent.Type getType()
          Returns the type of event.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentEvent

public ContentEvent(ContentEvent.Type type,
                    SourceKey key,
                    IContent content)
Constructs a new event.

Parameters:
type - the type of event that has happened.
key - the key associated with the affected content.
content - the affected content, or null if not available.
Method Detail

getType

public ContentEvent.Type getType()
Returns the type of event.

Returns:
the type of event.

getSourceKey

public SourceKey getSourceKey()
Returns the SourceKey of the affected content.

Returns:
the SourceKey of the affected content.

getContent

public IContent getContent()
Returns the affected content, or null if the content itself was not available.

Returns:
the affected content, or null if the content itself was not available.

dispatch

public void dispatch(IContentListener listener)
Specified by:
dispatch in interface com.binaryfantasy.bfx.events.IDispatchableEvent<IContentListener>

toString

public String toString()
Overrides:
toString in class EventObject


Copyright (c) 2000-2006, BinaryFantasy.com