-
Bug
-
Resolution: Fixed
-
P4
-
8
-
Windows 7 64bit
Java 8.0 b129
Run program below... most keys generate KeyTyped events, including backspace, but not Delete.
package listviewkeytyped;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class ListViewKeyTyped extends Application {
private EventHandler<? super KeyEvent> logEvent = new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent t) {
System.out.println("ListView got: "+t);
}
};
@Override
public void start(Stage primaryStage) {
ListView<String> listView = new ListView();
listView.getItems().addAll("one", "two","three","four","five","six");
listView.setOnKeyTyped(logEvent);
StackPane root = new StackPane();
root.getChildren().add(listView);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Focus List - press DELETE");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
package listviewkeytyped;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class ListViewKeyTyped extends Application {
private EventHandler<? super KeyEvent> logEvent = new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent t) {
System.out.println("ListView got: "+t);
}
};
@Override
public void start(Stage primaryStage) {
ListView<String> listView = new ListView();
listView.getItems().addAll("one", "two","three","four","five","six");
listView.setOnKeyTyped(logEvent);
StackPane root = new StackPane();
root.getChildren().add(listView);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Focus List - press DELETE");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}