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 java.lang.Object implements VerticalPixelAddressMap
Maps vertical pixel locations to layouts on the currently displayed screen.
-
-
Constructor Summary
Constructors Constructor Description VerticalPixelAddressMapImpl(java.util.List<AnchoredLayout> layouts, AddressIndexMap map)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfindLayoutAt(int y)Finds the layout containing the given point.AddressSetViewgetAddressSet()Gets the address set of this address map.intgetBeginPosition(int i)Returns the y position of the top of the i'th layout.AddressgetEndAddress()Returns the index of the last layout in this map.intgetEndPosition(int i)Returns the y position of the bottom of the i'th layout.AddressgetLayoutAddress(int i)Returns the address of the i'th layout in this map.AddressgetLayoutEndAddress(int i)Returns the address of the bottom of the i'th layout.intgetLayoutIndexSize(int i)intgetMarkPosition(int i)Returns pixel location to draw marker icon.intgetNumLayouts()Returns the number of layouts in this map.AddressgetStartAddress()Returns the Address of the first layout in this mapbooleanhasPrimaryField(int i)Determines if the given layout index contains the primary field
-
-
-
Constructor Detail
-
VerticalPixelAddressMapImpl
public VerticalPixelAddressMapImpl(java.util.List<AnchoredLayout> layouts, AddressIndexMap map)
Constructor.- Parameters:
layouts- the set of layouts that are currently visible on the screenmap- the map containing the addresses by index
-
-
Method Detail
-
getStartAddress
public Address getStartAddress()
Description copied from interface:VerticalPixelAddressMapReturns the Address of the first layout in this map- Specified by:
getStartAddressin interfaceVerticalPixelAddressMap
-
getEndAddress
public Address getEndAddress()
Description copied from interface:VerticalPixelAddressMapReturns the index of the last layout in this map.- Specified by:
getEndAddressin interfaceVerticalPixelAddressMap
-
getNumLayouts
public int getNumLayouts()
Description copied from interface:VerticalPixelAddressMapReturns the number of layouts in this map.- Specified by:
getNumLayoutsin interfaceVerticalPixelAddressMap
-
getLayoutAddress
public Address getLayoutAddress(int i)
Description copied from interface:VerticalPixelAddressMapReturns the address of the i'th layout in this map.- Specified by:
getLayoutAddressin interfaceVerticalPixelAddressMap- 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:VerticalPixelAddressMapReturns 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:
getLayoutEndAddressin interfaceVerticalPixelAddressMap- 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:VerticalPixelAddressMapReturns the y position of the top of the i'th layout.- Specified by:
getBeginPositionin interfaceVerticalPixelAddressMap- Parameters:
i- the index of the layout.
-
getEndPosition
public int getEndPosition(int i)
Description copied from interface:VerticalPixelAddressMapReturns the y position of the bottom of the i'th layout.- Specified by:
getEndPositionin interfaceVerticalPixelAddressMap- Parameters:
i- the index of the layout.
-
getMarkPosition
public int getMarkPosition(int i)
Description copied from interface:VerticalPixelAddressMapReturns pixel location to draw marker icon.- Specified by:
getMarkPositionin interfaceVerticalPixelAddressMap- 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:VerticalPixelAddressMapDetermines if the given layout index contains the primary field- Specified by:
hasPrimaryFieldin interfaceVerticalPixelAddressMap- 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:VerticalPixelAddressMapFinds the layout containing the given point.- Specified by:
findLayoutAtin interfaceVerticalPixelAddressMap- Parameters:
y- the y coordinate of layout to be found.
-
getLayoutIndexSize
public int getLayoutIndexSize(int i)
-
getAddressSet
public AddressSetView getAddressSet()
Description copied from interface:VerticalPixelAddressMapGets the address set of this address map.- Specified by:
getAddressSetin interfaceVerticalPixelAddressMap- Returns:
- the address set of this address map
-
-