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;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
......@@ -46,7 +47,7 @@ public class CityDoctorController {
private ParserConfiguration currentConfig;
private String sourceFile;
private CityGmlZipArchive zipArchive;
private ZipEntryPicker currentZipEntryPicker;
private Checker currentChecker;
private HighlightController highlightController;
......@@ -136,6 +137,7 @@ public class CityDoctorController {
mainWindow.getSaveBtn().setDisable(false);
mainWindow.getResetCameraBtn().setDisable(false);
mainWindow.getHideRoofBtn().setDisable(false);
mainWindow.getZipManagerBtn().setDisable(true);
mainWindow.getNorthArrow().setVisible(true);
mainWindow.alignNorthArrow();
setupFeatureTabs();
......@@ -154,8 +156,8 @@ public class CityDoctorController {
Platform.runLater(() -> {
try {
ZipEntryPicker picker = new ZipEntryPicker(mainWindow.getMainStage(), this);
picker.show();
currentZipEntryPicker = new ZipEntryPicker(mainWindow.getMainStage(), this);
currentZipEntryPicker.show();
} catch (IOException e) {
throw new RuntimeException(e);
}
......@@ -202,6 +204,7 @@ public class CityDoctorController {
mainWindow.getSaveBtn().setDisable(false);
mainWindow.getResetCameraBtn().setDisable(false);
mainWindow.getHideRoofBtn().setDisable(false);
mainWindow.getZipManagerBtn().setDisable(false);
mainWindow.getNorthArrow().setVisible(true);
mainWindow.alignNorthArrow();
setupFeatureTabs();
......@@ -213,6 +216,10 @@ public class CityDoctorController {
}
public void showZipManager() {
Platform.runLater(() -> currentZipEntryPicker.show());
}
private void setupFeatureTabs() {
mainWindow.setDisableOfFeatureTab(FeatureType.BUILDING, model.getBuildings().isEmpty());
mainWindow.setDisableOfFeatureTab(FeatureType.VEGETATION, model.getVegetation().isEmpty());
......
......@@ -86,10 +86,10 @@ public class MainToolBar {
private ImageView lod4View;
@FXML
private Button zipBtn;
private Button zipManagerBtn;
@FXML
private ImageView zipView;
private ImageView zipManagerView;
@FXML
private Button aboutBtn;
......@@ -234,7 +234,7 @@ public class MainToolBar {
}
try (InputStream inStream = MainWindow.class.getResourceAsStream("icons/zip.png")) {
Image img = new Image(inStream);
zipView.setImage(img);
zipManagerView.setImage(img);
}
} catch (IOException e) {
// ignore close exception
......@@ -348,9 +348,9 @@ public class MainToolBar {
}
private void setupZipButton() {
zipBtn.setDisable(true);
zipBtn.setTooltip(new Tooltip(Localization.getText("MainToolBar.zip")));
zipBtn.setOnAction(ae -> {
zipManagerBtn.setDisable(true);
zipManagerBtn.setTooltip(new Tooltip(Localization.getText("MainToolBar.zip")));
zipManagerBtn.setOnAction(ae -> {
//TODO: Implement Zipfile viewer
});
}
......
......@@ -78,9 +78,10 @@
</HBox>
<HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS">
<children>
<Button id="loadBtn" fx:id="zipBtn" disable="true" mnemonicParsing="false">
<Button id="loadBtn" fx:id="zipManagerBtn" disable="true" mnemonicParsing="false">
<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>
</Button>
<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