private void setName(MemoryBlock block, String name) {
		name = name.trim();
		if (!verifyRenameAllowed(block, name)) {
			return;
		}
		if (name.length() == 0) {
			Msg.showError(this, provider.getComponent(), "Enter Block Label",
				"Please enter a label name.");
			return;
		}
		if (name.equals(block.getName())) {
			return;
		}
		if (!Memory.isValidMemoryBlockName(name)) {
			Msg.showError(this, provider.getComponent(), "Invalid Name",
				"Invalid Memory Block Name: " + name);
			return;
		}

		try {
			String newName = name;
			program.withTransaction("Rename Memory Block", () -> {
				block.setName(newName);
			});
		}
		catch (LockException e) {
			this.provider.setStatusText(e.getMessage());
		}
	}
Table Model for a Table where each entry represents a MemoryBlock from a Program's Memory.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MemoryMapModel.java