INavigationPoint Interface

com.bea.ide.core.navigation
INavigationPoint Interface

public interface INavigationPoint

    extends Serializable

This interface represents an abstract navigation point. An IDocumentView must be prepared to hand out navigation points on calls to IDocumentView.getNavigationPoint() which perform actions that return the user to the current location in the document. A default implementation is provided. See @see com.bea.ide.document.IDocumentView


All Known Implementing Classes
DefaultDocumentViewNavigationPoint
All Superinterfaces
Serializable

Method Summary

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.
public boolean
navigate()
This is the action performed when the navigation point is navigated to.

Method Detail

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.

Parameters

other
The navigation point that this is being compared to.

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.

Returns

This returns true on a successful navigation, false if the navigation failed.