Interface Navigatable

  • All Known Implementing Classes:
    NavigatableComponentProviderAdapter

    public interface Navigatable
    Interface for ComponentProviders to implement if they support basic navigation and selection capabilities. Implementing this interface will provide the provider with navigation history and actions that require navigation or selection. (Search Text, Search Memory, Select bytes, Select instructions, etc.)
    • Method Detail

      • getInstanceID

        long getInstanceID()
      • goTo

        boolean goTo​(Program program,
                     ProgramLocation location)
        Commands this navigatable to goto (display) the given program and location
        Parameters:
        location - the location in that program to display
        Returns:
        true if the goto was successful
      • getLocation

        ProgramLocation getLocation()
        Returns the current location of this Navigatable
        Returns:
        the current location of this Navigatable
      • getProgram

        Program getProgram()
        Returns the current Program of this Navigatable
        Returns:
        the current Program of this Navigatable
      • getMemento

        LocationMemento getMemento()
        Returns the view state for this navigatable
        Returns:
        the view state for this navigatable
      • setMemento

        void setMemento​(LocationMemento memento)
        Sets the view state for this navigatable. This is used later to restore the view state.
        Parameters:
        memento - the state of this navigatable
      • getNavigatableIcon

        javax.swing.Icon getNavigatableIcon()
        Returns an icon that represents this Navigatable
        Returns:
        the icon
      • isConnected

        boolean isConnected()
        Returns true if this Navigatable is "connected". Navigatables are connected if they produce and consume location and selection events.
        Returns:
        true if this Navigatable is "connected"
      • supportsMarkers

        boolean supportsMarkers()
        Currently only the 'connected' windows support markers
        Returns:
        true if this navigatable supports markers
      • requestFocus

        void requestFocus()
        Tells this provider to request focus.
      • isVisible

        boolean isVisible()
        Returns true if this provider is visible
        Returns:
        true if visible
      • setSelection

        void setSelection​(ProgramSelection selection)
        Tells this Navigatable to set its selection to the given selection
        Parameters:
        selection - the selection to set.
      • setHighlight

        void setHighlight​(ProgramSelection highlight)
        Tells this Navigatable to set its highlight to the given highlight
        Parameters:
        highlight - the highlight to set.
      • getSelection

        ProgramSelection getSelection()
        Returns the current selection of this Navigatable
        Returns:
        the current selection of this Navigatable
      • getHighlight

        ProgramSelection getHighlight()
        Returns the current highlight of this Navigatable
        Returns:
        the current highlight of this Navigatable
      • addNavigatableListener

        void addNavigatableListener​(NavigatableRemovalListener listener)
        Adds a listener to be notified if this Navigatable is terminated
        Parameters:
        listener - the listener to be notified when this Navigatable is closed
      • removeNavigatableListener

        void removeNavigatableListener​(NavigatableRemovalListener listener)
        Removes a listener to be notified if this Navigatable is terminated.
        Parameters:
        listener - the listener that no longer should be notified when this Navigatable is closed.
      • isDisposed

        boolean isDisposed()
        Returns true if this navigatable is no longer valid, false if it is still good
        Returns:
        true if this navigatable is no longer valid, false if it is still good
      • supportsHighlight

        boolean supportsHighlight()
        Returns true if this navigatable supports highlighting
        Returns:
        true if this navigatable supports highlighting
      • setHighlightProvider

        void setHighlightProvider​(HighlightProvider highlightProvider,
                                  Program program)
        Set the highlight provider for the given program
        Parameters:
        highlightProvider - the provider
        program - the program
      • removeHighlightProvider

        void removeHighlightProvider​(HighlightProvider highlightProvider,
                                     Program program)
        Removes the given highlight provider for the given program
        Parameters:
        highlightProvider - the provider
        program - the program