Package ghidra.app.util.viewer.util

# Class VerticalPixelAddressMapImpl

java.lang.Object
ghidra.app.util.viewer.util.VerticalPixelAddressMapImpl

All Implemented Interfaces:
  `VerticalPixelAddressMap`

public class VerticalPixelAddressMapImpl extends Object implements VerticalPixelAddressMap
Maps vertical pixel locations to layouts on the currently displayed screen.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VerticalPixelAddressMapImpl(List<AnchoredLayout> layouts, AddressIndexMap map)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `findLayoutAt(int y)`
  Finds the layout containing the given point.
  `AddressSetView`
  `getAddressSet()`
  Gets the address set of this address map.
  `int`
  `getBeginPosition(int i)`
  Returns the y position of the top of the i'th layout.
  `Address`
  `getEndAddress()`
  Returns the index of the last layout in this map.
  `int`
  `getEndPosition(int i)`
  Returns the y position of the bottom of the i'th layout.
  `Address`
  `getLayoutAddress(int i)`
  Returns the address of the i'th layout in this map.
  `Address`
  `getLayoutEndAddress(int i)`
  Returns the address of the bottom of the i'th layout.
  `int`
  `getLayoutIndexSize(int i)`
  `int`
  `getMarkPosition(int i)`
  Returns pixel location to draw marker icon.
  `int`
  `getNumLayouts()`
  Returns the number of layouts in this map.
  `Address`
  `getStartAddress()`
  Returns the Address of the first layout in this map
  `boolean`
  `hasPrimaryField(int i)`
  Determines if the given layout index contains the primary field

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

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

- ## Constructor Details

  - ### VerticalPixelAddressMapImpl

    public VerticalPixelAddressMapImpl(List<AnchoredLayout> layouts, AddressIndexMap map)
    Constructor.
    Parameters:
      `layouts` - the set of layouts that are currently visible on the screen
      `map` - the map containing the addresses by index

- ## Method Details

  - ### getStartAddress

    public Address getStartAddress()
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the Address of the first layout in this map
    Specified by:
      `getStartAddress` in interface `VerticalPixelAddressMap`
    Returns:
      the address

  - ### getEndAddress

    public Address getEndAddress()
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the index of the last layout in this map.
    Specified by:
      `getEndAddress` in interface `VerticalPixelAddressMap`
    Returns:
      the address

  - ### getNumLayouts

    public int getNumLayouts()
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the number of layouts in this map.
    Specified by:
      `getNumLayouts` in interface `VerticalPixelAddressMap`
    Returns:
      the number of layouts

  - ### getLayoutAddress

    public Address getLayoutAddress(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the address of the i'th layout in this map.
    Specified by:
      `getLayoutAddress` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the index into the local array of layouts
    Returns:
      the address of the i'th layout in this map.

  - ### getLayoutEndAddress

    public Address getLayoutEndAddress(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the address of the bottom of the i'th layout.

    Note: this will return null if at the end of an overlay block.

    Specified by:
      `getLayoutEndAddress` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the index of the layout
    Returns:
      the address of the bottom of the i'th layout

  - ### getBeginPosition

    public int getBeginPosition(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the y position of the top of the i'th layout.
    Specified by:
      `getBeginPosition` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the index of the layout.
    Returns:
      the position

  - ### getEndPosition

    public int getEndPosition(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Returns the y position of the bottom of the i'th layout.
    Specified by:
      `getEndPosition` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the index of the layout.
    Returns:
      the position

  - ### getMarkPosition

    public int getMarkPosition(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Returns pixel location to draw marker icon.
    Specified by:
      `getMarkPosition` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the index of the layout to be marked with an icon.
    Returns:
      the vertical pixel location at which to draw the icon.

  - ### hasPrimaryField

    public boolean hasPrimaryField(int i)
    Description copied from interface: `VerticalPixelAddressMap`
    Determines if the given layout index contains the primary field
    Specified by:
      `hasPrimaryField` in interface `VerticalPixelAddressMap`
    Parameters:
      `i` - the layout index to test.
    Returns:
      true if the layout contains the primary field.

  - ### findLayoutAt

    public int findLayoutAt(int y)
    Description copied from interface: `VerticalPixelAddressMap`
    Finds the layout containing the given point.
    Specified by:
      `findLayoutAt` in interface `VerticalPixelAddressMap`
    Parameters:
      `y` - the y coordinate of layout to be found.
    Returns:
      the layout index

  - ### getLayoutIndexSize

    public int getLayoutIndexSize(int i)

  - ### getAddressSet

    public AddressSetView getAddressSet()
    Description copied from interface: `VerticalPixelAddressMap`
    Gets the address set of this address map.
    Specified by:
      `getAddressSet` in interface `VerticalPixelAddressMap`
    Returns:
      the address set of this address map