Package ghidra.app.util.viewer.field

# Class XRefFieldMouseHandler

java.lang.Object
ghidra.app.util.viewer.field.XRefFieldMouseHandler

All Implemented Interfaces:
  `FieldMouseHandler`, `FieldMouseHandlerExtension`, `ExtensionPoint`

Direct Known Subclasses:
  `VariableXRefFieldMouseHandler`

public class XRefFieldMouseHandler extends Object implements FieldMouseHandlerExtension
A handler to process `XRefFieldMouseHandler` clicks

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XRefFieldMouseHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `fieldElementClicked(Object clickedObject, Navigatable sourceNavigatable, ProgramLocation location, MouseEvent mouseEvent, ServiceProvider serviceProvider)`
  Called when a field `Field` has been clicked.
  `protected Address`
  `getFromReferenceAddress(ProgramLocation programLocation)`
  `Class<?>[]`
  `getSupportedProgramLocations()`
  Returns an array of types that this handler wishes to handle.
  `protected boolean`
  `isXREFHeaderLocation(ProgramLocation location)`
  `protected void`
  `showXRefDialog(Navigatable navigatable, ProgramLocation location, ServiceProvider serviceProvider)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### XRefFieldMouseHandler

    public XRefFieldMouseHandler()

- ## Method Details

  - ### fieldElementClicked

    public boolean fieldElementClicked(Object clickedObject, Navigatable sourceNavigatable, ProgramLocation location, MouseEvent mouseEvent, ServiceProvider serviceProvider)
    Description copied from interface: `FieldMouseHandler`
    Called when a field `Field` has been clicked. The object being passed in may be of any type, as returned by the clicked field. The type is guaranteed to be one of the types returned in the call to `FieldMouseHandler.getSupportedProgramLocations()`.
    Specified by:
      `fieldElementClicked` in interface `FieldMouseHandler`
    Parameters:
      `clickedObject` - The object that was clicked
      `sourceNavigatable` - The source navigatable that was clicked upon.
      `location` - The location at the time the click was made. Due to swing delay, this location may not be the same as you would get if you asked the navagatable for the current location.SC
      `mouseEvent` - The mouse event that triggered the click
      `serviceProvider` - A service provider used to access system resources.
    Returns:
      true if this handler wishes to have exclusive handling rights to processing the `clickedObject`
    See Also:
      - `ListingField.getClickedObject(ghidra.util.bean.field.FieldLocation)`

  - ### isXREFHeaderLocation

    protected boolean isXREFHeaderLocation(ProgramLocation location)

  - ### getFromReferenceAddress

    protected Address getFromReferenceAddress(ProgramLocation programLocation)

  - ### showXRefDialog

    protected void showXRefDialog(Navigatable navigatable, ProgramLocation location, ServiceProvider serviceProvider)

  - ### getSupportedProgramLocations

    public Class<?>[] getSupportedProgramLocations()
    Description copied from interface: `FieldMouseHandler`
    Returns an array of types that this handler wishes to handle.
    Specified by:
      `getSupportedProgramLocations` in interface `FieldMouseHandler`
    Returns:
      an array of types that this handler wishes to handle.