org.jminor.common.model
Interface StateObserver
- All Superinterfaces:
- EventObserver
- All Known Subinterfaces:
- State, State.AggregateState
public interface StateObserver
- extends EventObserver
Specifies a State observer.
isActive
boolean isActive()
- Returns:
- true if the state being observed is active, false otherwise
addListeningAction
void addListeningAction(Action action)
- Links the enabled state of the given action to the active state of the state being observed
- Parameters:
action
- an action to link
getReversedState
StateObserver getReversedState()
- Returns:
- A StateObserver object that is always the reverse of the parent state
addActivateListener
void addActivateListener(ActionListener listener)
- Parameters:
listener
- a listener notified each time this state is activated
removeActiveListener
void removeActiveListener(ActionListener listener)
- Parameters:
listener
- the listener to remove
addDeactivateListener
void addDeactivateListener(ActionListener listener)
- Parameters:
listener
- a listener notified each time this state is deactivated
removeDeactiveListener
void removeDeactiveListener(ActionListener listener)
- Parameters:
listener
- the listener to remove