committed by
GitHub
parent
c75bcd97b2
commit
ffbbde9d8f
@@ -25,6 +25,8 @@ import javafx.geometry.Pos;
|
|||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.ListCell;
|
import javafx.scene.control.ListCell;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
|
import javafx.scene.input.KeyCode;
|
||||||
|
import javafx.scene.input.KeyEvent;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
@@ -65,6 +67,7 @@ public abstract class ToolbarListPageSkin<E, P extends ListPageBase<E>> extends
|
|||||||
this.listView.setCellFactory(listView -> createListCell((JFXListView<E>) listView));
|
this.listView.setCellFactory(listView -> createListCell((JFXListView<E>) listView));
|
||||||
ComponentList.setVgrow(listView, Priority.ALWAYS);
|
ComponentList.setVgrow(listView, Priority.ALWAYS);
|
||||||
Bindings.bindContent(this.listView.getItems(), skinnable.itemsProperty());
|
Bindings.bindContent(this.listView.getItems(), skinnable.itemsProperty());
|
||||||
|
FXUtils.ignoreEvent(listView, KeyEvent.KEY_PRESSED, e -> e.getCode() == KeyCode.ESCAPE);
|
||||||
root.getContent().add(listView);
|
root.getContent().add(listView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import javafx.scene.control.Skin;
|
|||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
|
import javafx.scene.input.KeyCode;
|
||||||
|
import javafx.scene.input.KeyEvent;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
@@ -140,6 +142,8 @@ public final class ResourcepackListPage extends ListPageBase<ResourcepackListPag
|
|||||||
root.getStyleClass().add("no-padding");
|
root.getStyleClass().add("no-padding");
|
||||||
listView = new JFXListView<>();
|
listView = new JFXListView<>();
|
||||||
|
|
||||||
|
FXUtils.ignoreEvent(listView, KeyEvent.KEY_PRESSED, e -> e.getCode() == KeyCode.ESCAPE);
|
||||||
|
|
||||||
HBox toolbar = new HBox();
|
HBox toolbar = new HBox();
|
||||||
toolbar.setAlignment(Pos.CENTER_LEFT);
|
toolbar.setAlignment(Pos.CENTER_LEFT);
|
||||||
toolbar.setPickOnBounds(false);
|
toolbar.setPickOnBounds(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user