fixed number input
This commit is contained in:
		@ -17,7 +17,7 @@
 | 
			
		||||
<?import javafx.scene.shape.Line?>
 | 
			
		||||
<?import javafx.scene.text.Font?>
 | 
			
		||||
 | 
			
		||||
<AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
 | 
			
		||||
<AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
 | 
			
		||||
	<children>
 | 
			
		||||
		<TabPane layoutX="4.0" layoutY="5.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
			
		||||
			<tabs>
 | 
			
		||||
@ -121,7 +121,7 @@
 | 
			
		||||
										<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" />
 | 
			
		||||
										<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" />
 | 
			
		||||
										<TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" resizable="false" sortable="false" text="Positionen" />
 | 
			
		||||
										<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="181.6666259765625" resizable="false" sortable="false" text="Nummer" />
 | 
			
		||||
										<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="165.0" resizable="false" sortable="false" text="Nummer" />
 | 
			
		||||
									</columns>
 | 
			
		||||
									<columnResizePolicy>
 | 
			
		||||
										<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
 | 
			
		||||
 | 
			
		||||
@ -917,9 +917,14 @@ public class MainWindowController
 | 
			
		||||
			public void changed(ObservableValue<? extends String> observable,
 | 
			
		||||
					String oldValue, String newValue)
 | 
			
		||||
			{
 | 
			
		||||
				if (!newValue.matches("\\d{0,7}([\\.]\\d{0,2})?")) {
 | 
			
		||||
					tftNewValue.setText(oldValue);
 | 
			
		||||
				}
 | 
			
		||||
				 
 | 
			
		||||
				 if (!newValue.matches("\\d{0,4}([\\.]\\d{0,2})?")) {
 | 
			
		||||
                tftNewValue.setText(oldValue);
 | 
			
		||||
            }
 | 
			
		||||
				
 | 
			
		||||
		
 | 
			
		||||
				
 | 
			
		||||
				
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user