Commit 3bb33aa5 authored by Riegel's avatar Riegel
Browse files

Feat: Add zipButton to GUI

parent 04e0792e
...@@ -85,6 +85,12 @@ public class MainToolBar { ...@@ -85,6 +85,12 @@ public class MainToolBar {
@FXML @FXML
private ImageView lod4View; private ImageView lod4View;
@FXML
private Button zipBtn;
@FXML
private ImageView zipView;
@FXML @FXML
private Button aboutBtn; private Button aboutBtn;
...@@ -147,6 +153,7 @@ public class MainToolBar { ...@@ -147,6 +153,7 @@ public class MainToolBar {
setupReportButton(); setupReportButton();
setupResetCameraButton(); setupResetCameraButton();
setupHideRoofButton(); setupHideRoofButton();
setupZipButton();
loadImages(); loadImages();
gridButton.setOnAction(ae -> renderer.showWireFrame(gridButton.isSelected())); gridButton.setOnAction(ae -> renderer.showWireFrame(gridButton.isSelected()));
...@@ -225,6 +232,10 @@ public class MainToolBar { ...@@ -225,6 +232,10 @@ public class MainToolBar {
Image img = new Image(inStream); Image img = new Image(inStream);
hideRoofView.setImage(img); hideRoofView.setImage(img);
} }
try (InputStream inStream = MainWindow.class.getResourceAsStream("icons/zip.png")) {
Image img = new Image(inStream);
zipView.setImage(img);
}
} catch (IOException e) { } catch (IOException e) {
// ignore close exception // ignore close exception
} }
...@@ -336,6 +347,14 @@ public class MainToolBar { ...@@ -336,6 +347,14 @@ public class MainToolBar {
} }
private void setupZipButton() {
zipBtn.setDisable(true);
zipBtn.setTooltip(new Tooltip(Localization.getText("MainToolBar.zip")));
zipBtn.setOnAction(ae -> {
//TODO: Implement Zipfile viewer
});
}
public Button getCheckButton() { public Button getCheckButton() {
return checkBtn; return checkBtn;
} }
......
...@@ -121,6 +121,7 @@ public class OpenFileDialog { ...@@ -121,6 +121,7 @@ public class OpenFileDialog {
fc = new FileChooser(); fc = new FileChooser();
fc.setTitle(Localization.getText("OpenFileDialog.select")); fc.setTitle(Localization.getText("OpenFileDialog.select"));
fc.getExtensionFilters().add(new ExtensionFilter("GML/XML", "*.gml", "*.xml")); fc.getExtensionFilters().add(new ExtensionFilter("GML/XML", "*.gml", "*.xml"));
fc.getExtensionFilters().add(new ExtensionFilter("ZIP", "*.zip"));
fc.getExtensionFilters().add(new ExtensionFilter(Localization.getText("MainWindow.all"), "*.*")); fc.getExtensionFilters().add(new ExtensionFilter(Localization.getText("MainWindow.all"), "*.*"));
} }
File dir = new File(Settings.get(Settings.LAST_OPEN_FOLDER, "")); File dir = new File(Settings.get(Settings.LAST_OPEN_FOLDER, ""));
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Button?>
<?import javafx.scene.image.*?> <?import javafx.scene.control.Separator?>
<?import javafx.scene.layout.*?> <?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"> <HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<HBox spacing="5.0" HBox.hgrow="NEVER"> <HBox spacing="5.0" HBox.hgrow="NEVER">
...@@ -75,6 +78,12 @@ ...@@ -75,6 +78,12 @@
</HBox> </HBox>
<HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS"> <HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS">
<children> <children>
<Button id="loadBtn" fx:id="zipBtn" disable="true" mnemonicParsing="false">
<graphic>
<ImageView fx:id="zipView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Separator orientation="VERTICAL"/>
<Button id="loadBtn" fx:id="saveBtn" disable="true" mnemonicParsing="false"> <Button id="loadBtn" fx:id="saveBtn" disable="true" mnemonicParsing="false">
<graphic> <graphic>
<ImageView fx:id="saveView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="saveView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
......
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