public void insertString(int offset, String string,
			AttributeSet attributeSet) throws BadLocationException {
		if (string == null || string.isEmpty())
			return;

		for (int i = 0; i < string.length(); i++) {
			if (acceptedChars.indexOf(String.valueOf(string.charAt(i))) == -1)
				return;
		}

		if (negativeAccepted && string.indexOf("-") != -1) {
			if (string.indexOf("-") != 0 || offset != 0) {
				return;
			}
		}

		super.insertString(offset, string, attributeSet);
	}