Package ghidra.app.util.viewer.listingpanel

# Class PropertyBasedBackgroundColorModel

java.lang.Object
ghidra.app.util.viewer.listingpanel.PropertyBasedBackgroundColorModel

All Implemented Interfaces:
  `BackgroundColorModel`, `ListingBackgroundColorModel`, `DomainObjectListener`, `EventListener`

public class PropertyBasedBackgroundColorModel extends Object implements ListingBackgroundColorModel, DomainObjectListener
Default `BackgroundColorModel` 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 final String`
  `COLOR_PROPERTY_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PropertyBasedBackgroundColorModel()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `domainObjectChanged(DomainObjectChangedEvent ev)`
  Method called when a change is made to the domain object.
  `Color`
  `getBackgroundColor(BigInteger index)`
  `Color`
  `getDefaultBackgroundColor()`
  `void`
  `modelDataChanged(ListingPanel listingPanel)`
  Called when the `AddressIndexMap` or the `Program` changes.
  `void`
  `setDefaultBackgroundColor(Color c)`
  `void`
  `setEnabled(boolean b)`

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

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

- ## Field Details

  - ### COLOR_PROPERTY_NAME

    public static final String COLOR_PROPERTY_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PropertyBasedBackgroundColorModel

    public PropertyBasedBackgroundColorModel()

- ## Method Details

  - ### modelDataChanged

    public void modelDataChanged(ListingPanel listingPanel)
    Description copied from interface: `ListingBackgroundColorModel`
    Called when the `AddressIndexMap` or the `Program` changes.
    Specified by:
      `modelDataChanged` in interface `ListingBackgroundColorModel`
    Parameters:
      `listingPanel` - the `ListingPanel` that changed and where the new `AddressIndexMap` and `Program` can be retrieved.

  - ### getBackgroundColor

    public Color getBackgroundColor(BigInteger index)
    Specified by:
      `getBackgroundColor` in interface `BackgroundColorModel`

  - ### getDefaultBackgroundColor

    public Color getDefaultBackgroundColor()
    Specified by:
      `getDefaultBackgroundColor` in interface `BackgroundColorModel`

  - ### setDefaultBackgroundColor

    public void setDefaultBackgroundColor(Color c)
    Specified by:
      `setDefaultBackgroundColor` in interface `BackgroundColorModel`

  - ### 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 interface `DomainObjectListener`
    Parameters:
      `ev` - event containing the change record and type of change that was made

  - ### setEnabled

    public void setEnabled(boolean b)