DefaultDocumentViewNavigationPoint Class
com.bea.ide.document
DefaultDocumentViewNavigationPoint Class
- public class DefaultDocumentViewNavigationPoint
extends Object
implements INavigationPoint
This is a simple implementation of INavigationPoint for use with NavigationSvc. It should be
usable by any IDocumentView to set a navigation point that will load the view upon navigation.
This type of INavigationPoint will not perform any work to locate the user inside of the view,
and therefore may not be appropriate for every IDocumentView.
-
Hierarchy
-
Object
DefaultDocumentViewNavigationPoint
-
All Implemented Interfaces
-
INavigationPoint
, Serializable
public boolean |
-
isSame (Object other)
- Each navigation point should implement the isSame(INavigationPoint) method so that two
navigation points may determine if they are in fact the same.
This implementation requires that the other navigation point is of the same class, refers to the same
URI and view name.
|
public boolean |
-
navigate ()
- This is the action performed when the navigation point is navigated to.
Simple implementation that just opens the document view that this navigation point represents.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_uri
protected URI
_uri
_viewName
protected String
_viewName
DefaultDocumentViewNavigationPoint
public DefaultDocumentViewNavigationPoint(IDocumentView
view)
- Instantiate the navigation point to navigate to the given view upon request.
isSame(Object) Method
public boolean isSame(Object
other)
Each navigation point should implement the isSame(INavigationPoint) method so that two
navigation points may determine if they are in fact the same. We're not using equals()
here since equals() must be transitive, whereas this relation may not be. For example,
a navigation point X for a text document could be "the same" as another navigation point
Y if it is within 10 characters of it. A third point, Z, could be "the same" as Y, but be
too distant from X.
Additionally, isSame need not commute. I.e., x.isSame(y) may return true
and y.isSame(x)
may return false
.
This implementation requires that the other navigation point is of the same class, refers to the same
URI and view name.
Parameters
-
other
- The navigation point that this is being compared to. The navigation point to copare to this. Null is permitted but will always return false.
Returns
- This returns true if other is deemed to be the same as this INavigationPoint.
navigate() Method
public boolean navigate()
This is the action performed when the navigation point is navigated to. This should perform
actions that at very least make the IDocumentView which the user was viewing active. For some
IDocumentViews this may be sufficient. For other IDocumentViews -- a source editor, for
example -- a more complete navigation that returns the cursor to the previous location may be
desirable.
Simple implementation that just opens the document view that this navigation point represents.
Returns
- This returns true on a successful navigation, false if the navigation failed. true if the navigation succeeded, false otherwise