net.dpml.state
Class StateEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.dpml.state.StateEvent
All Implemented Interfaces:
Serializable

public class StateEvent
extends EventObject

Event triggered as a result of a state change.

Version:
2.1.1
Author:
Digital Product Management Library
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
StateEvent(Object source, State from, State to)
          Construct a new StateEvent.
 
Method Summary
 State getFromState()
          Return the state that existed prior to the transition.
 State getToState()
          Return the state that was established by a transition.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateEvent

public StateEvent(Object source,
                  State from,
                  State to)
Construct a new StateEvent.

Parameters:
source - the source compoent model
from - the originating state
to - the new current state
Method Detail

getFromState

public State getFromState()
Return the state that existed prior to the transition.

Returns:
the original state

getToState

public State getToState()
Return the state that was established by a transition.

Returns:
the new current state