Package ghidra.app.util.viewer.field
Class ListingFieldHighlightFactoryAdapter
java.lang.Object
ghidra.app.util.viewer.field.ListingFieldHighlightFactoryAdapter
- All Implemented Interfaces:
FieldHighlightFactory
Wrapper class to translate calls to
FieldHighlightFactory
into a call needed by the
ListingHighlightProvider
. This class holds field factory information in the text
field to be provided to the highlightProvider to get highlights just before the field is painted.
This class is needed to allow the basic Field
API to be used with more richness at the
ListingPanel
level.
-
Field Summary
Fields inherited from interface docking.widgets.fieldpanel.support.FieldHighlightFactory
NO_HIGHLIGHTS
-
Constructor Summary
ConstructorDescriptionConstructor -
Method Summary
Modifier and TypeMethodDescriptioncreateHighlights
(Field field, String text, int cursorTextOffset) Returns the highlights for the given text
-
Constructor Details
-
ListingFieldHighlightFactoryAdapter
Constructor- Parameters:
provider
- the HighlightProvider that will actually compute the highlights.
-
-
Method Details
-
createHighlights
Description copied from interface:FieldHighlightFactory
Returns the highlights for the given text- Specified by:
createHighlights
in interfaceFieldHighlightFactory
- Parameters:
field
- the field that is requesting the highlighttext
- the text to be considered for highlightingcursorTextOffset
- the position in the given text of the cursor. A -1 indicates the cursor is not in this field.- Returns:
- an array of highlights to be rendered
-