Skip to content

Commit a857fe1

Browse files
committed
Initial commit
1 parent e97e348 commit a857fe1

File tree

193 files changed

+7849
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+7849
-3
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#################
2+
## Eclipse
3+
#################
4+
/bin
5+
/.metadata
6+
/target*
7+
8+
# Locally stored "Eclipse launch configurations"
9+
/*.launch

AddressApp-Part-1/.classpath

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

AddressApp-Part-1/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>AddressApp-Part-1</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
21+
<nature>org.eclipse.jdt.core.javanature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
2 KB
Binary file not shown.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.layout.*?>
6+
7+
<AnchorPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
8+
<children><SplitPane dividerPositions="0.35618729096989965" focusTraversable="true" layoutX="183.0" layoutY="76.0" prefHeight="300.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
9+
<items>
10+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
11+
<children><TableView layoutX="-12.5" layoutY="58.0" prefHeight="298.0" prefWidth="175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
12+
<columns>
13+
<TableColumn prefWidth="102.0" text="First Name" />
14+
<TableColumn prefWidth="114.0" text="Last Name" />
15+
</columns>
16+
<columnResizePolicy>
17+
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
18+
</columnResizePolicy>
19+
</TableView>
20+
</children></AnchorPane>
21+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="298.0" prefWidth="393.0">
22+
<children><Label layoutX="7.0" layoutY="6.0" text="Person Details:" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" /><GridPane layoutX="14.0" layoutY="33.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="30.0">
23+
<columnConstraints>
24+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
25+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
26+
</columnConstraints>
27+
<rowConstraints>
28+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
29+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
30+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
31+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
32+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
33+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
34+
</rowConstraints>
35+
<children><Label text="First Name" /><Label text="Label" GridPane.columnIndex="1" /><Label text="Last Name" GridPane.rowIndex="1" /><Label text="Street" GridPane.rowIndex="2" /><Label text="Postal Code" GridPane.rowIndex="4" /><Label layoutX="22.0048828125" layoutY="150.0" text="Birthday" GridPane.rowIndex="5" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="2" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="5" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" /><Label layoutX="56.5" layoutY="251.0" text="City" GridPane.rowIndex="3" />
36+
</children>
37+
</GridPane>
38+
<HBox layoutX="215.0" layoutY="259.0" spacing="5.0" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="10.0">
39+
<children><Button layoutX="112.1875" layoutY="259.0" mnemonicParsing="false" text="New..." /><Button layoutX="167.0" layoutY="259.0" mnemonicParsing="false" text="Edit..." /><Button layoutX="221.0" layoutY="259.0" mnemonicParsing="false" text="Delete" />
40+
</children>
41+
</HBox>
42+
</children></AnchorPane>
43+
</items>
44+
</SplitPane>
45+
</children></AnchorPane>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.layout.*?>
6+
7+
<BorderPane prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
8+
<top><MenuBar BorderPane.alignment="CENTER">
9+
<menus>
10+
<Menu mnemonicParsing="false" text="File">
11+
<items>
12+
<MenuItem mnemonicParsing="false" text="Close" />
13+
</items>
14+
</Menu>
15+
<Menu mnemonicParsing="false" text="Edit">
16+
<items>
17+
<MenuItem mnemonicParsing="false" text="Delete" />
18+
</items>
19+
</Menu>
20+
<Menu mnemonicParsing="false" text="Help">
21+
<items>
22+
<MenuItem mnemonicParsing="false" text="About" />
23+
</items>
24+
</Menu>
25+
</menus>
26+
</MenuBar>
27+
</top></BorderPane>

AddressApp-Part-1/build.fxbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="ASCII"?>
2+
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
3+
<deploy>
4+
<application name="AddressApp"/>
5+
<info/>
6+
</deploy>
7+
<signjar/>
8+
</anttasks:AntTask>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
package ch.makery.address;
2+
3+
import java.io.IOException;
4+
5+
import javafx.application.Application;
6+
import javafx.fxml.FXMLLoader;
7+
import javafx.scene.Scene;
8+
import javafx.scene.layout.AnchorPane;
9+
import javafx.scene.layout.BorderPane;
10+
import javafx.stage.Stage;
11+
12+
public class MainApp extends Application {
13+
14+
private Stage primaryStage;
15+
private BorderPane rootLayout;
16+
17+
@Override
18+
public void start(Stage primaryStage) {
19+
this.primaryStage = primaryStage;
20+
this.primaryStage.setTitle("AddressApp");
21+
22+
initRootLayout();
23+
24+
showPersonOverview();
25+
}
26+
27+
/**
28+
* Initializes the root layout.
29+
*/
30+
public void initRootLayout() {
31+
try {
32+
// Load root layout from fxml file.
33+
FXMLLoader loader = new FXMLLoader();
34+
loader.setLocation(MainApp.class.getResource("view/RootLayout.fxml"));
35+
rootLayout = (BorderPane) loader.load();
36+
37+
// Show the scene containing the root layout.
38+
Scene scene = new Scene(rootLayout);
39+
primaryStage.setScene(scene);
40+
primaryStage.show();
41+
} catch (IOException e) {
42+
e.printStackTrace();
43+
}
44+
}
45+
46+
/**
47+
* Shows the person overview inside the root layout.
48+
*/
49+
public void showPersonOverview() {
50+
try {
51+
// Load person overview.
52+
FXMLLoader loader = new FXMLLoader();
53+
loader.setLocation(MainApp.class.getResource("view/PersonOverview.fxml"));
54+
AnchorPane personOverview = (AnchorPane) loader.load();
55+
56+
// Set person overview into the center of root layout.
57+
rootLayout.setCenter(personOverview);
58+
} catch (IOException e) {
59+
e.printStackTrace();
60+
}
61+
}
62+
63+
/**
64+
* Returns the main stage.
65+
* @return
66+
*/
67+
public Stage getPrimaryStage() {
68+
return primaryStage;
69+
}
70+
71+
public static void main(String[] args) {
72+
launch(args);
73+
}
74+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.layout.*?>
6+
7+
<AnchorPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
8+
<children><SplitPane dividerPositions="0.35618729096989965" focusTraversable="true" layoutX="183.0" layoutY="76.0" prefHeight="300.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
9+
<items>
10+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
11+
<children><TableView layoutX="-12.5" layoutY="58.0" prefHeight="298.0" prefWidth="175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
12+
<columns>
13+
<TableColumn prefWidth="102.0" text="First Name" />
14+
<TableColumn prefWidth="114.0" text="Last Name" />
15+
</columns>
16+
<columnResizePolicy>
17+
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
18+
</columnResizePolicy>
19+
</TableView>
20+
</children></AnchorPane>
21+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="298.0" prefWidth="393.0">
22+
<children><Label layoutX="7.0" layoutY="6.0" text="Person Details:" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" /><GridPane layoutX="14.0" layoutY="33.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="30.0">
23+
<columnConstraints>
24+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
25+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
26+
</columnConstraints>
27+
<rowConstraints>
28+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
29+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
30+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
31+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
32+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
33+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
34+
</rowConstraints>
35+
<children><Label text="First Name" /><Label text="Label" GridPane.columnIndex="1" /><Label text="Last Name" GridPane.rowIndex="1" /><Label text="Street" GridPane.rowIndex="2" /><Label text="Postal Code" GridPane.rowIndex="4" /><Label layoutX="22.0048828125" layoutY="150.0" text="Birthday" GridPane.rowIndex="5" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="2" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="5" /><Label text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" /><Label layoutX="56.5" layoutY="251.0" text="City" GridPane.rowIndex="3" />
36+
</children>
37+
</GridPane>
38+
<HBox layoutX="215.0" layoutY="259.0" spacing="5.0" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="10.0">
39+
<children><Button layoutX="112.1875" layoutY="259.0" mnemonicParsing="false" text="New..." /><Button layoutX="167.0" layoutY="259.0" mnemonicParsing="false" text="Edit..." /><Button layoutX="221.0" layoutY="259.0" mnemonicParsing="false" text="Delete" />
40+
</children>
41+
</HBox>
42+
</children></AnchorPane>
43+
</items>
44+
</SplitPane>
45+
</children></AnchorPane>

0 commit comments

Comments
 (0)