com.borland.primetime.viewer
Class NodeViewMap

java.lang.Object
  |
  +--com.borland.primetime.viewer.NodeViewMap

public class NodeViewMap
extends java.lang.Object

This is a utility class that knows how to find different objects that may be associated with a particular editor. The logic for doing this is isolated in this class instead of sprinkled throughout the editor subsystem, since the core editor classes shouldn't really be tied too heavily to the rest of the PrimeTime source code. Instead of requiring each editor instance to remember what objects it might be linked to, or having the editor classes know how to look them up, this class is used to look them up.

This class can find all of the TextViews, Browsers, and FileNodes that are currently tied to editors, and it enables users to find the appropriate view or node to operate on, given only the editor.


Constructor Summary
NodeViewMap()
           
 
Method Summary
static Browser getBrowser(EditorPane editor)
          Get the Browser associated with a particular editor.
static FileNode getNode(EditorPane editor)
          Get the FileNode associated with a particular editor.
static AbstractTextNodeViewer getNodeViewer(EditorPane editor)
          Get the AbstractTextNodeViewer associated with a particular editor.
static TextView getView(EditorPane editor)
          Get the TextView associated with a particular editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeViewMap

public NodeViewMap()
Method Detail

getNodeViewer

public static AbstractTextNodeViewer getNodeViewer(EditorPane editor)
Get the AbstractTextNodeViewer associated with a particular editor.

getView

public static TextView getView(EditorPane editor)
Get the TextView associated with a particular editor.

getBrowser

public static Browser getBrowser(EditorPane editor)
Get the Browser associated with a particular editor.

getNode

public static FileNode getNode(EditorPane editor)
Get the FileNode associated with a particular editor.