org.jwalk
Class QuestionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jwalk.QuestionEvent
All Implemented Interfaces:
java.io.Serializable

public class QuestionEvent
extends java.util.EventObject

QuestionEvent is a kind of event that notifies about a Question. A QuestionEvent is generated every time a JWalker wishes to ask a question. This event wraps up a Question and the JWalker source which asked the question. Client programs should register an object satisfying the QuestionListener interface with JWalker's Channels API. The registered object will then accept QuestionEvents raised by the JWalker.

Version:
1.0
Author:
Anthony Simons
See Also:
Serialized Form

Field Summary
protected  Question question
          The question that is being asked in this QuestionEvent.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
QuestionEvent(JWalker source, Question question)
          Creates a QuestionEvent with a dispatching source and a question.
 
Method Summary
 Question getQuestion()
          Returns the Question being asked in this event.
 JWalker getSource()
          Returns the JWalker source which dispatched this event.
 java.lang.String toString()
          Returns a printable representation of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

question

protected Question question
The question that is being asked in this QuestionEvent.

Constructor Detail

QuestionEvent

public QuestionEvent(JWalker source,
                     Question question)
Creates a QuestionEvent with a dispatching source and a question.

Parameters:
source - the source object dispatching this QuestionEvent.
question - the Question being asked by this QuestionEvent.
Method Detail

getSource

public JWalker getSource()
Returns the JWalker source which dispatched this event.

Overrides:
getSource in class java.util.EventObject
Returns:
the JWalker which dispatched this event.

getQuestion

public Question getQuestion()
Returns the Question being asked in this event.

Returns:
the Question being asked in this event.

toString

public java.lang.String toString()
Returns a printable representation of this event. This is the same as the printable representation of the Question.

Overrides:
toString in class java.util.EventObject