gumbo.visualize.data.consistency
Class ParityManager

java.lang.Object
  |
  +--gumbo.visualize.data.consistency.IdManager
        |
        +--gumbo.visualize.data.consistency.ParityManager
All Implemented Interfaces:
PickMapper

public class ParityManager
extends IdManager

Manages the membership of graphic views in "parity groups" to achieve consistent interaction feedback across views. The members of a parity group represent different client models that should be equal in the context of interaction feedback. For example, a given line of source code in a list view and the corresponding vertices in a call graph should appear selected, together.

The members of the aspect models registered with this manager are assigned to mutually exclusive interactor groups associated with parity model client IDs. A pick mapper maps target interactors to parity groups according to the target client ID. As such, this manager should be used just after the unity manager in the picking chain.

Monitors aspect model activity (see AspectModel.getAspectModelMonitor()) to automatically update parity groups. Note that parity groups will only be created automatically for aspect models that are of type ParityModel.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
ParityManager(IdManager target)
          Creates an instance as the mapper after the target mapper in a picking chain.
 
Method Summary
 void addGraphic(GraphicView view)
           
 void addGroup(AspectModel aspect)
          Adds an aspect model to this manager as a parity group.
 InteractorField.EventIn getPickIn()
          The input pick.
 InteractorField.EventOut getPickOut()
          The output pick, which is the input pick or a managed interactor group corresponding to the input pick's client ID.
 void removeGraphic(GraphicView view)
           
 void removeGroup(AspectModel aspect)
          Removes an aspect model from this manager as a parity group.
 
Methods inherited from class gumbo.visualize.data.consistency.IdManager
findInputPick, findOutputPick, getOutputPickMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParityManager

public ParityManager(IdManager target)
Creates an instance as the mapper after the target mapper in a picking chain.

Parameters:
target - The target manager. Never null.
Method Detail

addGroup

public final void addGroup(AspectModel aspect)
Adds an aspect model to this manager as a parity group. Ignored if the aspect is already registered. Throws an exception if an aspect member is already in a diferent parity group.


removeGroup

public final void removeGroup(AspectModel aspect)
Removes an aspect model from this manager as a parity group. Ignored if the aspect is not registered.


addGraphic

public final void addGraphic(GraphicView view)

removeGraphic

public final void removeGraphic(GraphicView view)

getPickIn

public InteractorField.EventIn getPickIn()
Description copied from class: IdManager
The input pick. NO_PICK_TARGET if no target picked. Null for a null pick.

Specified by:
getPickIn in interface PickMapper
Specified by:
getPickIn in class IdManager

getPickOut

public InteractorField.EventOut getPickOut()
Description copied from class: IdManager
The output pick, which is the input pick or a managed interactor group corresponding to the input pick's client ID. NO_PICK_TARGET if no target picked. Null for a null pick.

Specified by:
getPickOut in interface PickMapper
Specified by:
getPickOut in class IdManager