Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
course-material
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IT1901
course-material
Commits
7aa2893c
Commit
7aa2893c
authored
Oct 14, 2019
by
George Adrian Stoica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the first draft for the metadata editor UI
parent
ec458224
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
0 deletions
+125
-0
simpleexample2/fxui/src/main/java/simpleex/ui/MetaDataEditorController.java
...i/src/main/java/simpleex/ui/MetaDataEditorController.java
+70
-0
simpleexample2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml
...2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml
+55
-0
No files found.
simpleexample2/fxui/src/main/java/simpleex/ui/MetaDataEditorController.java
0 → 100644
View file @
7aa2893c
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
}
}
simpleexample2/fxui/src/main/resources/simpleex/ui/MetaDataEditor.fxml
0 → 100644
View file @
7aa2893c
<?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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment