You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void start(Stage primaryStage) {
StackPane root = new StackPane();
ListSpinner<Integer> spinner = new ListSpinner<>(new ListSpinnerIntegerList(0, 59)).withEditable(true).withStringConverter(StringConverterFactory.forInteger());
ListSpinnerIntegerList list = new ListSpinnerIntegerList(0, 59);
System.out.println(list.indexOf(59));
System.out.println(list.indexOf(60));
System.out.println(list.indexOf(61));
System.out.println(list.size());
root.getChildren().add(spinner);
primaryStage.setScene(new Scene(root, 300, 250));
primaryStage.show();
}
Outputs:
59
60
-1
60
And if you introduce 60 in the ListSpinner textfield it throws:
java.lang.IllegalArgumentException: Index out of bounds: 60, valid values are 0-59
(any other invalid value just puts last value back, as expected)
I'm using jfxtras-controls-8.0.r3.jar downloaded directly from the Maven repo.
The text was updated successfully, but these errors were encountered:
|public void start(Stage primaryStage) {
StackPane root = new StackPane();
ListSpinner spinner = new ListSpinner<>(new ListSpinnerIntegerList(0, 59)).withEditable(true).withStringConverter(StringConverterFactory.forInteger());
ListSpinnerIntegerList list = new ListSpinnerIntegerList(0, 59);
System.out.println(list.indexOf(59));
System.out.println(list.indexOf(60));
System.out.println(list.indexOf(61));
System.out.println(list.size());
root.getChildren().add(spinner);
primaryStage.setScene(new Scene(root, 300, 250));
primaryStage.show();
}
|
Outputs:
59
60
-1
60
And if you introduce 60 in the ListSpinner textfield it throws:
java.lang.IllegalArgumentException: Index out of bounds: 60, valid values are 0-59
(any other invalid value just puts last value back, as expected)
I'm using jfxtras-controls-8.0.r3.jar downloaded directly from the Maven repo.
—
Reply to this email directly or view it on GitHub #17.
faerindel
changed the title
ListSpinnerIntegerList.indefOf( size ) doesn't return -1
ListSpinnerIntegerList.indexOf( size ) doesn't return -1
Dec 23, 2014
Is that intended?
Because this:
Outputs:
59
60
-1
60
And if you introduce 60 in the ListSpinner textfield it throws:
java.lang.IllegalArgumentException: Index out of bounds: 60, valid values are 0-59
(any other invalid value just puts last value back, as expected)
I'm using jfxtras-controls-8.0.r3.jar downloaded directly from the Maven repo.
The text was updated successfully, but these errors were encountered: