@@ -60,7 +60,7 @@ public class OptionalFilesSelectionPane extends BorderPane {
6060 private final JFXListView <ModpackFile > list = new JFXListView <>();
6161
6262 public OptionalFilesSelectionPane () {
63- retryOptionalFiles . setOnMouseClicked ( e -> {
63+ FXUtils . onClicked ( retryOptionalFiles , () -> {
6464 title .getChildren ().remove (retryOptionalFiles );
6565 retry .run ();
6666 });
@@ -100,13 +100,13 @@ public Set<ModpackFile> getSelected() {
100100 }
101101
102102 private class OptionalFileEntry extends MDListCell <ModpackFile > {
103- private JFXCheckBox checkBox = new JFXCheckBox ();
104- private TwoLineListItem content = new TwoLineListItem ();
105- private JFXButton infoButton = new JFXButton ();
106- private HBox container = new HBox (8 );
107- private Label text1 = new Label ();
103+ private final JFXCheckBox checkBox = new JFXCheckBox ();
104+ private final TwoLineListItem content = new TwoLineListItem ();
105+ private final JFXButton infoButton = new JFXButton ();
106+ private final HBox container = new HBox (8 );
107+ private final Label text1 = new Label ();
108108 private ModpackFile currentFile = null ;
109- private ChangeListener <Boolean > selectedListener = (observable , oldValue , newValue ) -> {
109+ private final ChangeListener <Boolean > selectedListener = (observable , oldValue , newValue ) -> {
110110 if (currentFile != null ) {
111111 if (newValue ) {
112112 selected .add (currentFile );
@@ -147,12 +147,12 @@ protected void updateControl(ModpackFile item, boolean empty) {
147147 RemoteMod mod1 = mod == null ? null : mod .orElse (null );
148148 if (mod1 != null ) {
149149 content .setSubtitle (mod1 .getTitle ());
150- infoButton .setOnMouseClicked (e -> Controllers .dialog (new ModInfo (mod1 )));
150+ infoButton .setOnAction (e -> Controllers .dialog (new ModInfo (mod1 )));
151151 infoButton .setManaged (true );
152152 infoButton .setVisible (true );
153153 } else {
154154 content .setSubtitle ("" );
155- infoButton .setOnMouseClicked (null );
155+ infoButton .setOnAction (null );
156156 infoButton .setManaged (false );
157157 infoButton .setVisible (false );
158158 }
0 commit comments