Commit fad3c6f2 authored by Riegel's avatar Riegel
Browse files

Style: Rename ids of zipBtn and -View

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 19 additions and 11 deletions
+19 -11
...@@ -30,6 +30,7 @@ import org.xml.sax.SAXParseException; ...@@ -30,6 +30,7 @@ import org.xml.sax.SAXParseException;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function; import java.util.function.Function;
...@@ -46,7 +47,7 @@ public class CityDoctorController { ...@@ -46,7 +47,7 @@ public class CityDoctorController {
private ParserConfiguration currentConfig; private ParserConfiguration currentConfig;
private String sourceFile; private String sourceFile;
private CityGmlZipArchive zipArchive; private CityGmlZipArchive zipArchive;
private ZipEntryPicker currentZipEntryPicker;
private Checker currentChecker; private Checker currentChecker;
private HighlightController highlightController; private HighlightController highlightController;
...@@ -136,6 +137,7 @@ public class CityDoctorController { ...@@ -136,6 +137,7 @@ public class CityDoctorController {
mainWindow.getSaveBtn().setDisable(false); mainWindow.getSaveBtn().setDisable(false);
mainWindow.getResetCameraBtn().setDisable(false); mainWindow.getResetCameraBtn().setDisable(false);
mainWindow.getHideRoofBtn().setDisable(false); mainWindow.getHideRoofBtn().setDisable(false);
mainWindow.getZipManagerBtn().setDisable(true);
mainWindow.getNorthArrow().setVisible(true); mainWindow.getNorthArrow().setVisible(true);
mainWindow.alignNorthArrow(); mainWindow.alignNorthArrow();
setupFeatureTabs(); setupFeatureTabs();
...@@ -154,8 +156,8 @@ public class CityDoctorController { ...@@ -154,8 +156,8 @@ public class CityDoctorController {
Platform.runLater(() -> { Platform.runLater(() -> {
try { try {
ZipEntryPicker picker = new ZipEntryPicker(mainWindow.getMainStage(), this); currentZipEntryPicker = new ZipEntryPicker(mainWindow.getMainStage(), this);
picker.show(); currentZipEntryPicker.show();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -202,6 +204,7 @@ public class CityDoctorController { ...@@ -202,6 +204,7 @@ public class CityDoctorController {
mainWindow.getSaveBtn().setDisable(false); mainWindow.getSaveBtn().setDisable(false);
mainWindow.getResetCameraBtn().setDisable(false); mainWindow.getResetCameraBtn().setDisable(false);
mainWindow.getHideRoofBtn().setDisable(false); mainWindow.getHideRoofBtn().setDisable(false);
mainWindow.getZipManagerBtn().setDisable(false);
mainWindow.getNorthArrow().setVisible(true); mainWindow.getNorthArrow().setVisible(true);
mainWindow.alignNorthArrow(); mainWindow.alignNorthArrow();
setupFeatureTabs(); setupFeatureTabs();
...@@ -213,6 +216,10 @@ public class CityDoctorController { ...@@ -213,6 +216,10 @@ public class CityDoctorController {
} }
public void showZipManager() {
Platform.runLater(() -> currentZipEntryPicker.show());
}
private void setupFeatureTabs() { private void setupFeatureTabs() {
mainWindow.setDisableOfFeatureTab(FeatureType.BUILDING, model.getBuildings().isEmpty()); mainWindow.setDisableOfFeatureTab(FeatureType.BUILDING, model.getBuildings().isEmpty());
mainWindow.setDisableOfFeatureTab(FeatureType.VEGETATION, model.getVegetation().isEmpty()); mainWindow.setDisableOfFeatureTab(FeatureType.VEGETATION, model.getVegetation().isEmpty());
......
...@@ -86,10 +86,10 @@ public class MainToolBar { ...@@ -86,10 +86,10 @@ public class MainToolBar {
private ImageView lod4View; private ImageView lod4View;
@FXML @FXML
private Button zipBtn; private Button zipManagerBtn;
@FXML @FXML
private ImageView zipView; private ImageView zipManagerView;
@FXML @FXML
private Button aboutBtn; private Button aboutBtn;
...@@ -234,7 +234,7 @@ public class MainToolBar { ...@@ -234,7 +234,7 @@ public class MainToolBar {
} }
try (InputStream inStream = MainWindow.class.getResourceAsStream("icons/zip.png")) { try (InputStream inStream = MainWindow.class.getResourceAsStream("icons/zip.png")) {
Image img = new Image(inStream); Image img = new Image(inStream);
zipView.setImage(img); zipManagerView.setImage(img);
} }
} catch (IOException e) { } catch (IOException e) {
// ignore close exception // ignore close exception
...@@ -348,9 +348,9 @@ public class MainToolBar { ...@@ -348,9 +348,9 @@ public class MainToolBar {
} }
private void setupZipButton() { private void setupZipButton() {
zipBtn.setDisable(true); zipManagerBtn.setDisable(true);
zipBtn.setTooltip(new Tooltip(Localization.getText("MainToolBar.zip"))); zipManagerBtn.setTooltip(new Tooltip(Localization.getText("MainToolBar.zip")));
zipBtn.setOnAction(ae -> { zipManagerBtn.setOnAction(ae -> {
//TODO: Implement Zipfile viewer //TODO: Implement Zipfile viewer
}); });
} }
......
...@@ -78,9 +78,10 @@ ...@@ -78,9 +78,10 @@
</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"> <Button id="loadBtn" fx:id="zipManagerBtn" disable="true" mnemonicParsing="false">
<graphic> <graphic>
<ImageView fx:id="zipView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true"/> <ImageView fx:id="zipManagerView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic> </graphic>
</Button> </Button>
<Separator orientation="VERTICAL"/> <Separator orientation="VERTICAL"/>
......
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