The core idea of providing navigation in BRIDGE is that instead of issuing navigation control to maps directly and storing the types of maps an interface support, we have a helper class for each type of map to handle navigation and a registry class that the interface will look up to check if it can support the navigation of a specific object or not.

NavigationRegistry class
This abstract class stores types of helper classes that enable navigation features for different kinds of maps and it returns the correct helper class to the interface corresponding to a specific map. (edu.vt.cs.collab.bridge.DefaultWebViewSource is a possible model for this kind of registry class -- PLI) Class variables and methods are as follows:

Static variable:
  • A Hashtable of Helper Classes for Different Kinds of Maps
Static method:
  • NavigationControl getNavigationControl(String Classname)
    • This method handles checking if the object is navigable by looking up the hashtable using the object¡¯s class name. If the object has navigation feature that supported by the UI, a corresponding helper object will be returned, otherwise, a null will be returned.
  • boolean addNavigationControl(String classname, String helperClassname)
    • This method handles adding a new helper class's name (e.g., "GISMapHelper") to the hashtable with respect to the type of the map (given by the class name). If the addition is successful, it returns true, otherwise, it returns false (e.g., the class name is already in the hashtable)
  • boolean removeNavigationControl(String classname)
    • This method handles removing a helper class from the hashtable with respect to the type of the map (given by the class name). It returns true if successful otherwise false (e.g., the class name is not in the hashtable)
All maps' helper classes implements NavigationControl interface to add navigable features to preexist maps. The reason we want to have a navigation control interface instead of letting each map handle navigation is that we do not want user interface of the navigation such as SimpleMOO have knowledge of which map the navigation panel loads. For each UI, all they know is that they are loading a navigation control.

NavigationControl
Below are the methods of this interface
  • public NavigableLocation getCurrentLocation();
    This method returns the path to the object that we are currently navigated to
  • public void setCurrentLocation(NavigableLocation loc);
     This method sets the path to the current location
  • public Dimension getPreferredSize();
     This method returns the preferred size of the control.
  • public void addPropertyChangeListener(PropertyChangeListener l);
     This method adds a listener for property changes
  • public void removePropertyChangeListener(PropertyChangeListener l);
     This method removes a listener for property changes
  • public void init(ComponentView cv, NavigableLocation p)
     This method handles loading the map on to the navigation panel of the UI

DrawingMapHelper
This class adds navigable features to a concept map
Class variables:
  • DrawingComponentView cv : the UI of the concept map this helper class ¡°helps¡±
Class methods:
  • init(DrawingComponentView cv, NavigableLocation p)

GISMapHelper
This class adds navigable features to a GIS map
Class variables:
  • MapComponentView mp: the UI of the GIS map this helper class ¡°helps¡±
Class methods:
  • init(MapComponentView mp, NavigableLocation p)


/public/projects/bridge/design/How to Add Navigation to Preexist Maps Login | Web Editor | Full Editor
Last modified 9/11/03 1:49 PM by isenhour (history)
Site contents