diff --git a/simpleexample2/fxui/src/main/java/simpleex/ui/MetaDataEditorController.java b/simpleexample2/fxui/src/main/java/simpleex/ui/MetaDataEditorController.java new file mode 100644 index 0000000000000000000000000000000000000000..67f7f6e2a3ce0b1f19f5a26081aa2a2ccbcef3cd --- /dev/null +++ b/simpleexample2/fxui/src/main/java/simpleex/ui/MetaDataEditorController.java @@ -0,0 +1,70 @@ +package simpleex.ui; + +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.TextArea; +import javafx.scene.control.TextField; +import javafx.scene.layout.VBox; +import simpleex.core.LatLong; +import simpleex.ui.tags.TagsBar; + +public class MetaDataEditorController { + + private LatLong latlong; + + @FXML + private Button saveButton; + + @FXML + private Button cancelButton; + + @FXML + private VBox centerVBox; + + @FXML + private TextField nameInput; + + @FXML + private TextArea descriptionInput; + + @FXML + private TableView<?> propertiesTableView; + + @FXML + private TableColumn<?, ?> propertyNamesColumn; + + @FXML + private TableColumn<?, ?> propertyValuesColumn; + + @FXML + private TagsBar tagsBar; + + @FXML + void onCancel(ActionEvent event) { + + } + + @FXML + void onLocationName(ActionEvent event) { + + } + + @FXML + void onSave(ActionEvent event) { + + } + + void setLatLong(LatLong latLong) { + this.latlong = latLong; + updateUi(); + } + + private void updateUi() { + // TODO Auto-generated method stub + + } + +} diff --git a/simpleexample2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml b/simpleexample2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml new file mode 100644 index 0000000000000000000000000000000000000000..88be1e25d9997ce11bbcf26ecbada665a03f9bf0 --- /dev/null +++ b/simpleexample2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.TableColumn?> +<?import javafx.scene.control.TableView?> +<?import javafx.scene.control.TextArea?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.BorderPane?> +<?import javafx.scene.layout.HBox?> +<?import javafx.scene.layout.VBox?> +<?import simpleex.ui.tags.TagsBar?> + +<fx:root prefHeight="500.0" prefWidth="600.0" type="BorderPane" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="simpleex.ui.MetaDataEditorController"> + <bottom> + <HBox alignment="CENTER_RIGHT" prefHeight="40.0" prefWidth="600.0" spacing="10.0" BorderPane.alignment="CENTER_RIGHT"> + <children> + <Button id="saveButton" fx:id="saveButton" mnemonicParsing="false" onAction="#onSave" prefWidth="150.0" style="-fx-background-color: darkgreen; -fx-text-fill: white; -fx-font-weight: bold; -fx-border-color: green; -fx-background-radius: 10; -fx-border-radius: 10;" text="Save" /> + <Button fx:id="cancelButton" mnemonicParsing="false" onAction="#onCancel" prefWidth="150.0" style="-fx-background-color: lightgray; -fx-background-radius: 10; -fx-border-color: gray; -fx-border-radius: 10;" text="Cancel" /> + </children> + <padding> + <Insets left="20.0" right="20.0" /> + </padding> + </HBox> + </bottom> + <center> + <VBox fx:id="centerVBox" prefHeight="200.0" prefWidth="100.0" spacing="5.0" BorderPane.alignment="CENTER"> + <children> + <Label text="Name:" /> + <TextField fx:id="nameInput" onAction="#onLocationName" promptText="enter a name for this location" /> + <HBox prefHeight="23.0" prefWidth="580.0" spacing="10.0"> + <children> + <Label text="Coordinates:" /> + <Label layoutX="10.0" layoutY="10.0" text="Label" /> + </children> + </HBox> + <Label text="Description:" /> + <TextArea fx:id="descriptionInput" prefHeight="68.0" prefWidth="580.0" promptText="enter a description for this location" /> + <Label text="Custom properties:" /> + <TableView fx:id="propertiesTableView" prefHeight="120.0" prefWidth="580.0"> + <columns> + <TableColumn fx:id="propertyNamesColumn" prefWidth="150.0" text="Name" /> + <TableColumn fx:id="propertyValuesColumn" prefWidth="400.0" text="Value" /> + </columns> + </TableView> + <Label text="Tags:" /> + <TagsBar fx:id="tagsBar" /> + </children> + <BorderPane.margin> + <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> + </BorderPane.margin> + </VBox> + </center> +</fx:root>