@Override
		public void remove(int offs, int len) throws BadLocationException {
			super.remove(offs, len);
			String newText = HexOrDecimalInput.this.getText();
			if (newText.length() == 0 || newText.equals("-")) {
				currentValue = null;
			}
			else {
				currentValue = computeValueFromString(newText);
			}
		}
@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