private void checkForTouchyText(int x) {

		if (touchesText(x)) {
			// don't let this label block the text
			transparency = PARTIALLY_HIDDEN;
			return;
		}

		// not touching...
		if (transparency == PARTIALLY_HIDDEN) {
			// restore
			transparency = FULLY_OPAQUE;
		}
	}
A label that displays an icon that, when clicked, will clear the contents of the 
associated filter.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filter/ClearFilterLabel.java