Class PropertyBasedBackgroundColorModel
- java.lang.Object
-
- ghidra.app.util.viewer.listingpanel.PropertyBasedBackgroundColorModel
-
- All Implemented Interfaces:
BackgroundColorModel
,ListingBackgroundColorModel
,DomainObjectListener
,java.util.EventListener
public class PropertyBasedBackgroundColorModel extends java.lang.Object implements ListingBackgroundColorModel, DomainObjectListener
DefaultBackgroundColorModel
for the ListingPanel where the color returned for an index is based on that corresponding address having a color set in the program's database. (You can "paint" colors over address ranges).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLOR_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description PropertyBasedBackgroundColorModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
domainObjectChanged(DomainObjectChangedEvent ev)
Method called when a change is made to the domain object.java.awt.Color
getBackgroundColor(java.math.BigInteger index)
java.awt.Color
getDefaultBackgroundColor()
void
modelDataChanged(ListingPanel listingPanel)
Called when theAddressIndexMap
or theProgram
changes.void
setDefaultBackgroundColor(java.awt.Color c)
void
setEnabled(boolean b)
-
-
-
Field Detail
-
COLOR_PROPERTY_NAME
public static final java.lang.String COLOR_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
modelDataChanged
public void modelDataChanged(ListingPanel listingPanel)
Description copied from interface:ListingBackgroundColorModel
Called when theAddressIndexMap
or theProgram
changes.- Specified by:
modelDataChanged
in interfaceListingBackgroundColorModel
- Parameters:
listingPanel
- theListingPanel
that changed and where the newAddressIndexMap
andProgram
can be retrieved.
-
getBackgroundColor
public java.awt.Color getBackgroundColor(java.math.BigInteger index)
- Specified by:
getBackgroundColor
in interfaceBackgroundColorModel
-
getDefaultBackgroundColor
public java.awt.Color getDefaultBackgroundColor()
- Specified by:
getDefaultBackgroundColor
in interfaceBackgroundColorModel
-
setDefaultBackgroundColor
public void setDefaultBackgroundColor(java.awt.Color c)
- Specified by:
setDefaultBackgroundColor
in interfaceBackgroundColorModel
-
domainObjectChanged
public void domainObjectChanged(DomainObjectChangedEvent ev)
Description copied from interface:DomainObjectListener
Method called when a change is made to the domain object.- Specified by:
domainObjectChanged
in interfaceDomainObjectListener
- Parameters:
ev
- event containing the change record and type of change that was made
-
setEnabled
public void setEnabled(boolean b)
-
-