Permalink
Browse files

working version of the demo tableview

  • Loading branch information...
1 parent 3efc59f commit 5720b690fb6743adf1895f12730149cb58f2722e @Elisabeth-Engel Elisabeth-Engel committed Jan 25, 2013
Showing with 1,714 additions and 1 deletion.
  1. +17 −0 .gitignore
  2. +1 −1 README.md
  3. +4 −0 README.md~
  4. +117 −0 pom.xml
  5. +21 −0 src/main/java/com/comsysto/CustomerApp.java
  6. +11 −0 src/main/java/com/comsysto/CustomerAppConfiguration.java
  7. +14 −0 src/main/java/com/comsysto/CustomerDataScreenController.java
  8. +5 −0 src/main/java/com/comsysto/DialogController.java
  9. +38 −0 src/main/java/com/comsysto/FXMLDialog.java
  10. +38 −0 src/main/java/com/comsysto/FXMLStage.java
  11. +145 −0 src/main/java/com/comsysto/MainController.java
  12. +50 −0 src/main/java/com/comsysto/ScreensConfiguration.java
  13. +5 −0 src/main/java/com/comsysto/StageController.java
  14. +31 −0 src/main/java/com/comsysto/StandardController.java
  15. +31 −0 src/main/java/com/comsysto/config/Neo4jConfig.java
  16. +140 −0 src/main/java/com/comsysto/neo4j/domain/Neo4jCustomer.java
  17. +9 −0 src/main/java/com/comsysto/neo4j/domain/Neo4jNode.java
  18. +41 −0 src/main/java/com/comsysto/neo4j/repos/Neo4jCustomerRepository.java
  19. +96 −0 src/main/java/com/comsysto/setup/DatabaseSetup.java
  20. +116 −0 src/main/java/com/comsysto/util/FXOptionPane.java
  21. +628 −0 src/main/java/com/comsysto/util/Neo4jTableBuilder.java
  22. +23 −0 src/main/java/com/comsysto/util/Neo4jTableBuilderColumnField.java
  23. +17 −0 src/main/java/com/comsysto/util/Neo4jTableBuilderColumnSetMethod.java
  24. +40 −0 src/main/resources/com/comsysto/About.fxml
  25. +53 −0 src/main/resources/com/comsysto/Main.fxml
  26. BIN src/main/resources/com/comsysto/img/simple_header.jpg
  27. +23 −0 src/main/resources/com/comsysto/style.css
View
@@ -0,0 +1,17 @@
+*.class
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.bak
+
+*.iml
+*/.idea
+*/target
+
+.idea
+target
+data
+*.iml
+.DS_Store
View
@@ -1,4 +1,4 @@
spring-data-neo4j-javafx-tableview
==================================
-This is a showcase demonstrating how Spring Data Neo4j can be displayed and edited in a JavaFX TableView.
+This is a showcase demonstrating how Spring Data Neo4j nodes can be displayed and edited in a JavaFX TableView.
View
@@ -0,0 +1,4 @@
+spring-data-neo4j-javafx-tableview
+==================================
+
+This is a showcase demonstrating how Spring Data Neo4j can be displayed and edited in a JavaFX TableView.
View
117 pom.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.comsysto</groupId>
+ <artifactId>spring-data-neo4j-javafx-tableview</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <java-version>1.6</java-version>
+ <org.springframework-version>3.1.2.RELEASE</org.springframework-version>
+ <spring.data.neo4j.version>2.1.0.RC3</spring.data.neo4j.version>
+ </properties>
+ <dependencies>
+ <!-- Java FX -->
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>javafx</artifactId>
+ <version>2.2</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
+ </dependency>
+ <dependency>
+ <groupId>org.jfxtras</groupId>
+ <artifactId>jfxtras-labs</artifactId>
+ <version>2.2-r4</version>
+ </dependency>
+
+ <!-- Spring -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+
+ <!-- Neo4j -->
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-neo4j</artifactId>
+ <version>${spring.data.neo4j.version}</version>
+ </dependency>
+
+ <!-- other Spring stuff -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <!-- For testing against latest Spring snapshots -->
+ <repository>
+ <id>org.springframework.maven.snapshot</id>
+ <name>Spring Maven Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <!-- For developing against latest Spring milestones -->
+ <repository>
+ <id>org.springframework.maven.milestone</id>
+ <name>Spring Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <!-- Neo4j -->
+ <repository>
+ <id>m2.neo4j.org</id>
+ <url>http://m2.neo4j.org/content/repositories/releases</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.springframework.maven.milestone</id>
+ <name>Spring Framework Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ <fork>true</fork>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
@@ -0,0 +1,21 @@
+package com.comsysto;
+
+import javafx.application.Application;
+import javafx.stage.Stage;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+
+public class CustomerApp extends Application {
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage stage) throws Exception {
+ ApplicationContext context = new AnnotationConfigApplicationContext(CustomerAppConfiguration.class);
+ ScreensConfiguration screens = context.getBean(ScreensConfiguration.class);
+
+ screens.setPrimaryStage(stage);
+ screens.mainStage().show();
+ }
+}
@@ -0,0 +1,11 @@
+package com.comsysto;
+
+import com.comsysto.config.Neo4jConfig;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Configuration
+@Import({Neo4jConfig.class, ScreensConfiguration.class})
+public class CustomerAppConfiguration {
+
+}
@@ -0,0 +1,14 @@
+package com.comsysto;
+
+public class CustomerDataScreenController {
+
+ private ScreensConfiguration screens;
+
+ public CustomerDataScreenController() {
+ }
+
+ public CustomerDataScreenController(ScreensConfiguration screens) {
+ this.screens = screens;
+ }
+
+}
@@ -0,0 +1,5 @@
+package com.comsysto;
+
+public interface DialogController {
+ void setDialog(FXMLDialog dialog);
+}
@@ -0,0 +1,38 @@
+package com.comsysto;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Modality;
+import javafx.stage.Stage;
+import javafx.stage.StageStyle;
+import javafx.util.Callback;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class FXMLDialog extends Stage {
+ public FXMLDialog(DialogController controller, URL fxml, Stage owner) {
+ this(controller, fxml, owner, StageStyle.UTILITY);
+ }
+
+ public FXMLDialog(final DialogController controller, URL fxml, Stage owner, StageStyle style) {
+ super(style);
+ initOwner(owner);
+ initModality(Modality.WINDOW_MODAL);
+ setResizable(false);
+ FXMLLoader loader = new FXMLLoader(fxml);
+ try {
+ loader.setControllerFactory(new Callback<Class<?>, Object>() {
+ @Override
+ public Object call(Class<?> aClass) {
+ return controller;
+ }
+ });
+ controller.setDialog(this);
+ setScene(new Scene((Parent) loader.load()));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
@@ -0,0 +1,38 @@
+package com.comsysto;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Modality;
+import javafx.stage.Stage;
+import javafx.stage.StageStyle;
+import javafx.util.Callback;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class FXMLStage extends Stage {
+ public FXMLStage(StageController controller, URL fxml, Stage owner) {
+ this(controller, fxml, owner, StageStyle.DECORATED);
+ }
+
+ public FXMLStage(final StageController controller, URL fxml, Stage owner, StageStyle style) {
+ super(style);
+ initOwner(owner);
+ initModality(Modality.APPLICATION_MODAL);
+ owner.setResizable(true);
+ FXMLLoader loader = new FXMLLoader(fxml);
+ try {
+ loader.setControllerFactory(new Callback<Class<?>, Object>() {
+ @Override
+ public Object call(Class<?> aClass) {
+ return controller;
+ }
+ });
+ controller.setStage(this);
+ setScene(new Scene((Parent) loader.load()));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 5720b69

Please sign in to comment.