package net.hexid.jfx;

public class IntegerField extends javafx.scene.control.TextField {
	public IntegerField() {
		super();
	}
	public IntegerField(int num) {
		super(Integer.toString(num));
	}
	public IntegerField(String num) {
		super(num);
	}

	@Override public void replaceText(int start, int end, String text) {
		if(!text.matches("\\D")) {
			super.replaceText(start, end, text);
		}
	}

	@Override public void replaceSelection(String text) {
		if(!text.matches("\\D")) {
			super.replaceSelection(text);
		}
	}

	public int getInteger() {
		return Integer.parseInt(super.getText());
	}
	public void setInteger(int num) {
		super.setText(Integer.toString(num));
	}
}
@@ -332,37 +332,32 @@
 matches(%22%5C%5CD%22)) 
-%7B%0A%09%09%09
 super.replaceTex
@@ -373,28 +373,24 @@
 end, text);%0A
-%09%09%7D%0A
 %09%7D%0A%0A%09@Overri
@@ -467,13 +467,8 @@
 %22)) 
-%7B%0A%09%09%09
 supe
@@ -497,12 +497,8 @@
 t);%0A
-%09%09%7D%0A
 %09%7D%0A%0A

Remove unnessecary lines from IntegerField class