com.miginfocom.util.states
Interface StatePropagator

All Known Implementing Classes:
ActivityStatePropagator

public interface StatePropagator

Interface that determins what states can interact with each other, for what objects.


Method Summary
 boolean propagateStates(StateObservable source, int states, boolean b, StateObservable target, java.lang.Boolean multiSelectHint)
          Returns if state should be cleared or set for other.
 

Method Detail

propagateStates

boolean propagateStates(StateObservable source,
                        int states,
                        boolean b,
                        StateObservable target,
                        java.lang.Boolean multiSelectHint)
Returns if state should be cleared or set for other.

Parameters:
source - The source that just gotten, or is going to get a new state. Can be null, for instance when "nothing" is selected by pressing a point where nothing resides.
Note! The state may or may not already be set on this object, that is undefined. Get that from b.
states - The state (or states) that just got set or unset. E.g. GenericStates.SELECTED_BIT.
b - Whether state is, or was, set or unset.
target - The object to possibly change state for. Not null. Can be same as source, so that states within the same object can interact. This shouldn't be used as a veto function though, since it is not defined whether source has got its new state yet, or if it will get it after this method is called.
multiSelectHint - If != null it's a hint whether to select more (true) or deselect others. If null the implementation decides entierly.
Returns:
If some state was changed true is returned


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.