Commit 3146882d authored by Riegel's avatar Riegel
Browse files

Feat: Add decompressAllBtn

Adds a button to ZipEntryPicker for decompressing all registered
ZipEntries in the archive.
2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 29 additions and 0 deletions
+29 -0
......@@ -80,6 +80,11 @@ public class ZipEntryPicker {
@FXML
private ImageView decompressImageView;
@FXML
private Button decompressAllBtn;
@FXML
private ImageView decompressAllImageView;
@FXML
private ListView<ZipEntryNode> entryList;
......@@ -128,6 +133,10 @@ public class ZipEntryPicker {
Image img = new Image(inStream);
loadImageView.setImage(img);
}
try (InputStream inStream = MainWindow.class.getResourceAsStream("icons/decompress_all_zipEntries.png")) {
Image img = new Image(inStream);
decompressAllImageView.setImage(img);
}
} catch (IOException ignored) {
//ignore exceptions
}
......@@ -144,6 +153,14 @@ public class ZipEntryPicker {
});
decompressAllBtn.setOnAction(e -> {
for (ZipEntryNode node : entryList.getItems()) {
controller.decompressZipEntry(node.getEntry());
}
populateZipEntryList(entryList.getSelectionModel().getSelectedIndex());
decompressAllBtn.setDisable(true);
});
cancelBtn.setOnAction(e -> stage.close());
}
......
......@@ -5,6 +5,7 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.image.ImageView?>
......@@ -38,6 +39,17 @@
preserveRatio="true"/>
</graphic>
</Button>
<Separator orientation="VERTICAL" prefHeight="200.0"/>
<Button fx:id="decompressAllBtn" alignment="CENTER" layoutX="70.0" layoutY="15.0"
maxWidth="1.7976931348623157E308" mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="decompressAllImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
</children>
</HBox>
<HBox fillHeight="false" prefHeight="200.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment