@Override
	public void domainObjectChanged(DomainObjectChangedEvent ev) {
		for (int i = 0; i < ev.numRecords(); i++) {
			DomainObjectChangeRecord doRecord = ev.getChangeRecord(i);
			EventType eventType = doRecord.getEventType();

			if (eventType == ProgramEvent.FUNCTION_ADDED) {
				ProgramChangeRecord record = (ProgramChangeRecord) doRecord;
				Function function = (Function) record.getObject();
				AddressSetView addresses = function.getBody();
				overviewComponent.refresh(addresses.getMinAddress(), addresses.getMaxAddress());
			}

			else if (eventType == ProgramEvent.FUNCTION_REMOVED) {
				AddressSetView addresses = (AddressSetView) doRecord.getOldValue();
				overviewComponent.refresh(addresses.getMinAddress(), addresses.getMaxAddress());
			}

			else if (doRecord instanceof ProgramChangeRecord) {
				ProgramChangeRecord record = (ProgramChangeRecord) doRecord;
				overviewComponent.refresh(record.getStart(), record.getEnd());
			}
		}

	}
Sets the color to be associated with a given {@link AddressType}

@param type the AddressType for which to assign the color.
@param newColor the new color for the given {@link AddressType}
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/overview/addresstype/AddressTypeOverviewColorService.java