private boolean checkChar(char c) {
			if (allowsNegative && c == '-') {
				return true;
			}
			if (c >= '0' && c <= '9') {
				return true;
			}
			if (isHexMode && c >= 'a' && c <= 'f') {
				return true;
			}
			if (isHexMode && c >= 'A' && c <= 'F') {
				return true;
			}
			return false;
		}
@see javax.swing.text.Document#insertString(int, java.lang.String, javax.swing.text.AttributeSet)
Ghidra/Framework/Docking/src/main/java/docking/widgets/textfield/HexOrDecimalInput.java