Commit c24b7869 authored by Luna Riegel's avatar Luna Riegel
Browse files

Docs: Add Localization

parent 696f259f
......@@ -210,3 +210,4 @@ WriteReportDialog.selectXmlFile=Select
WriteReportDialog.writeBtn=Save
WriteReportDialog.xAxisLabel=Error
WriteReportDialog.yAxisLabel=Count
CheckDialog.topologyChecksLabel= Topology Checks
\ No newline at end of file
......@@ -210,3 +210,4 @@ WriteReportDialog.selectXmlFile=Ausw\u00e4hlen
WriteReportDialog.writeBtn=Speichern
WriteReportDialog.xAxisLabel=Fehler
WriteReportDialog.yAxisLabel=Anzahl
CheckDialog.topologyChecksLabel=Topologische Pr\u00fcfungen
\ No newline at end of file
......@@ -85,6 +85,10 @@ public class CheckDialog {
@FXML
private TreeTableView<TreeRequirement> semanticTable;
@FXML
private TreeTableView<TreeRequirement> topologyTable;
@FXML
private TableView<GlobalParameter> globalParametersTable;
......@@ -133,12 +137,27 @@ public class CheckDialog {
@FXML
private Button selectNoneSCBtn;
@FXML
private Button selectAllTCBtn;
@FXML
private Button selectNoneTCBtn;
@FXML
private TextField schematronField;
@FXML
private Tab checksTab;
@FXML
private TabPane modeTabPane;
@FXML
private Tab cdTab;
@FXML
private Tab udtTab;
@FXML
private Label globalParametersLabel;
......@@ -151,6 +170,9 @@ public class CheckDialog {
@FXML
private Label semanticChecksLabel;
@FXML
private Label topologyChecksLabel;
@FXML
private Label schematronFileLabel;
......@@ -201,61 +223,18 @@ public class CheckDialog {
public void initialize() {
createEnableColumn(geometricTable);
createNameColumn(geometricTable);
createValueColumn(geometricTable);
createUnitColumn(geometricTable);
createEnableColumn(semanticTable);
createNameColumn(semanticTable);
createValueColumn(semanticTable);
createUnitColumn(semanticTable);
setupCheckTables();
checksTab.setText(Localization.getText("CheckDialog.checksTab"));
filterTab.setText(Localization.getText("CheckDialog.filterTab"));
globalParametersLabel.setText(Localization.getText("CheckDialog.globalParametersLabel"));
availableChecksLabel.setText(Localization.getText("CheckDialog.availableChecksLabel"));
geometricChecksLabel.setText(Localization.getText("CheckDialog.geometricChecksLabel"));
semanticChecksLabel.setText(Localization.getText("CheckDialog.semanticChecksLabel"));
schematronFileLabel.setText(Localization.getText("CheckDialog.schematronFileLabel"));
checkDescriptionsLabel.setText(Localization.getText("CheckDialog.checkDescriptionsLabel"));
homepageHyperlink.setText(Localization.getText("CheckDialog.clickHereToOpen"));
selectBtn.setText(Localization.getText("CheckDialog.selectBtn"));
checkBtn.setText(Localization.getText("CheckDialog.checkBtn"));
cancelBtn.setText(Localization.getText("CheckDialog.cancelBtn"));
selectAllGCBtn.setText(Localization.getText("CheckDialog.selectAllChecksBtn"));
selectNoneGCBtn.setText(Localization.getText("CheckDialog.unselectAllChecksBtn"));
selectAllSCBtn.setText(Localization.getText("CheckDialog.selectAllChecksBtn"));
selectNoneSCBtn.setText(Localization.getText("CheckDialog.unselectAllChecksBtn"));
List<TableColumn<GlobalParameter, ?>> columns = globalParametersTable.getColumns();
TableColumn<GlobalParameter, String> nameCol = new TableColumn<>(NAME);
columns.add(nameCol);
nameCol.setMinWidth(200);
nameCol.setPrefWidth(325);
nameCol.setCellValueFactory(new PropertyValueFactory<>("name"));
setupValueColumns(columns);
TableColumn<GlobalParameter, Unit> unitCol = new TableColumn<>(UNIT);
columns.add(unitCol);
unitCol.setMinWidth(50);
unitCol.setPrefWidth(75);
unitCol.setMaxWidth(100);
unitCol.setEditable(false);
unitCol.setCellValueFactory(new PropertyValueFactory<>("unit"));
unitCol.setCellFactory(TextFieldTableCell.forTableColumn(new StringConverter<Unit>() {
@Override
public String toString(Unit object) {
return object.getRepresentation();
}
@Override
public Unit fromString(String string) {
return Unit.valueOf(string);
}
}));
loadImages();
......@@ -263,11 +242,7 @@ public class CheckDialog {
setupSaveButton();
setupLoadButton();
populateTreeWithChecks(geometricTable, RequirementType.GEOMETRY, true);
populateTreeWithChecks(semanticTable, RequirementType.SEMANTIC, false);
globalParametersTable.getItems().add(new GlobalParameter(NUMBER_OF_ROUNDING_PLACES, "8", Unit.NONE));
globalParametersTable.getItems().add(new GlobalParameter("minVertexDistance", "0.0001", Unit.METER));
cancelBtn.setOnAction(ea -> stage.close());
setupCheckButton();
......@@ -293,17 +268,7 @@ public class CheckDialog {
}
}
selectAllGCBtn.setOnAction(ae ->
geometricTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(true)));
selectNoneGCBtn.setOnAction(ae ->
geometricTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(false)));
selectAllSCBtn.setOnAction(ae ->
semanticTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(true)));
selectNoneSCBtn.setOnAction(ae ->
semanticTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(false)));
try {
homepageHyperlink.setTooltip(new Tooltip(Localization.getText("CheckDialog.homepageHyperlink")));
......@@ -335,6 +300,91 @@ public class CheckDialog {
}
}
private void setupCheckTables(){
createEnableColumn(geometricTable);
createNameColumn(geometricTable);
createValueColumn(geometricTable);
createUnitColumn(geometricTable);
createEnableColumn(semanticTable);
createNameColumn(semanticTable);
createValueColumn(semanticTable);
createUnitColumn(semanticTable);
createEnableColumn(topologyTable);
createNameColumn(topologyTable);
createValueColumn(topologyTable);
createUnitColumn(topologyTable);
List<TableColumn<GlobalParameter, ?>> columns = globalParametersTable.getColumns();
TableColumn<GlobalParameter, String> nameCol = new TableColumn<>(NAME);
columns.add(nameCol);
nameCol.setMinWidth(200);
nameCol.setPrefWidth(325);
nameCol.setCellValueFactory(new PropertyValueFactory<>("name"));
setupValueColumns(columns);
TableColumn<GlobalParameter, Unit> unitCol = new TableColumn<>(UNIT);
columns.add(unitCol);
unitCol.setMinWidth(50);
unitCol.setPrefWidth(75);
unitCol.setMaxWidth(100);
unitCol.setEditable(false);
unitCol.setCellValueFactory(new PropertyValueFactory<>("unit"));
unitCol.setCellFactory(TextFieldTableCell.forTableColumn(new StringConverter<Unit>() {
@Override
public String toString(Unit object) {
return object.getRepresentation();
}
@Override
public Unit fromString(String string) {
return Unit.valueOf(string);
}
}));
geometricChecksLabel.setText(Localization.getText("CheckDialog.geometricChecksLabel"));
semanticChecksLabel.setText(Localization.getText("CheckDialog.semanticChecksLabel"));
topologyChecksLabel.setText(Localization.getText("CheckDialog.topologyChecksLabel"));
globalParametersLabel.setText(Localization.getText("CheckDialog.globalParametersLabel"));
populateTreeWithChecks(geometricTable, RequirementType.GEOMETRY, true);
populateTreeWithChecks(semanticTable, RequirementType.SEMANTIC, false);
populateTreeWithChecks(topologyTable, RequirementType.TOPOLOGY, false);
globalParametersTable.getItems().add(new GlobalParameter(NUMBER_OF_ROUNDING_PLACES, "8", Unit.NONE));
globalParametersTable.getItems().add(new GlobalParameter("minVertexDistance", "0.0001", Unit.METER));
selectAllGCBtn.setOnAction(ae ->
geometricTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(true)));
selectAllSCBtn.setOnAction(ae ->
semanticTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(true)));
selectAllTCBtn.setOnAction(ae ->
topologyTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(true)));
selectNoneGCBtn.setOnAction(ae ->
geometricTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(false)));
selectNoneSCBtn.setOnAction(ae ->
semanticTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(false)));
selectNoneTCBtn.setOnAction(ae ->
topologyTable.getRoot().getChildren().forEach(item -> item.getValue().setEnabled(false)));
String selectAllText =Localization.getText("CheckDialog.selectAllChecksBtn");
String selectNoneText =Localization.getText("CheckDialog.unselectAllChecksBtn");
selectAllGCBtn.setText(selectAllText);
selectAllSCBtn.setText(selectAllText);
selectAllTCBtn.setText(selectAllText);
selectNoneSCBtn.setText(selectNoneText);
selectNoneGCBtn.setText(selectNoneText);
selectNoneTCBtn.setText(selectNoneText);
}
......@@ -433,6 +483,7 @@ public class CheckDialog {
});
}
private void applyConfig(ValidationConfiguration config) throws IOException {
FilterConfiguration filter = config.getFilter();
if (filter != null) {
......
......@@ -72,7 +72,7 @@
<Hyperlink fx:id="homepageHyperlink" alignment="CENTER" text="Hyperlink" />
</children>
</HBox>
<TabPane VBox.vgrow="ALWAYS">
<TabPane fx:id="modeTab" VBox.vgrow="ALWAYS">
<tabs>
<Tab text="CityDoctor">
<content>
......@@ -130,7 +130,7 @@
<children>
<VBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308">
<children>
<Label fx:id="geometricChecksLabel1" text="Topology Checks:">
<Label fx:id="topologyChecksLabel" text="Topology Checks:">
<font>
<Font size="16.0" />
</font>
......
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