Skip to content

Commit

Permalink
Merge pull request #95 from sialcasa/#92_formatter
Browse files Browse the repository at this point in the history
#92 formatter
  • Loading branch information
manuel-mauky committed Jul 24, 2014
2 parents 0be4380 + 9288821 commit da7bb91
Show file tree
Hide file tree
Showing 122 changed files with 4,472 additions and 3,824 deletions.
72 changes: 36 additions & 36 deletions examples/mvvmfx-cdi-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<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">
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>
<artifactId>mvvmfx-cdi-example</artifactId>

<name>mvvmFX CDI Example</name>

<description>
This example shows the usage of the mvvmFX framework with CDI Dependency Injection.
This example shows the usage of the mvvmFX framework with CDI Dependency Injection.
</description>
<parent>

<parent>
<groupId>de.saxsys</groupId>
<artifactId>mvvmFX-examples</artifactId>
<artifactId>mvvmFX-examples</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>

Expand All @@ -23,48 +23,48 @@


<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.6</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.6</version>
</dependency>

<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmFX</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmFX-cdi</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
<version>2.1.0.Final</version>
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmfx-complex</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmFX-cdi</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
<version>2.1.0.Final</version>
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmfx-complex</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
package de.saxsys.jfx;

import de.saxsys.jfx.exampleapplication.view.maincontainer.MainContainerView;
import de.saxsys.jfx.exampleapplication.viewmodel.maincontainer.MainContainerViewModel;
import de.saxsys.jfx.mvvm.cdi.MvvmfxCdiApplication;
import de.saxsys.jfx.mvvm.viewloader.ViewLoader;
import de.saxsys.jfx.mvvm.viewloader.ViewTuple;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import javax.inject.Inject;

import de.saxsys.jfx.exampleapplication.view.maincontainer.MainContainerView;
import de.saxsys.jfx.exampleapplication.viewmodel.maincontainer.MainContainerViewModel;
import de.saxsys.jfx.mvvm.cdi.MvvmfxCdiApplication;
import de.saxsys.jfx.mvvm.viewloader.ViewLoader;
import de.saxsys.jfx.mvvm.viewloader.ViewTuple;

/**
* The application entry point.
*
* @author manuel.mauky
*/
public class Starter extends MvvmfxCdiApplication {

public static void main(String... args) {
launch(args);
}

@Inject
private ViewLoader viewLoader;

@Override
public void start(Stage stage) {
ViewTuple<MainContainerView, MainContainerViewModel> tuple =
viewLoader
.loadViewTuple(MainContainerView.class);

Parent view = tuple.getView();

final Scene scene = new Scene(view);
stage.setScene(scene);
stage.show();
}
public static void main(String... args) {
launch(args);
}
@Inject
private ViewLoader viewLoader;
@Override
public void start(Stage stage) {
ViewTuple<MainContainerView, MainContainerViewModel> tuple =
viewLoader
.loadViewTuple(MainContainerView.class);
Parent view = tuple.getView();
final Scene scene = new Scene(view);
stage.setScene(scene);
stage.show();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee">



</beans>
22 changes: 11 additions & 11 deletions examples/mvvmfx-complex-example/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<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">
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>
<artifactId>mvvmfx-complex</artifactId>
<name>Complex Example</name>
<parent>

<parent>
<groupId>de.saxsys</groupId>
<artifactId>mvvmFX-examples</artifactId>
<artifactId>mvvmFX-examples</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>
<properties>
Expand All @@ -27,11 +27,11 @@
</repositories>

<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -72,8 +72,8 @@
</descriptorRefs>
</configuration>
</plugin>
</plugins>

</plugins>

</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
package de.saxsys.jfx.exampleapplication.model;

import java.util.Random;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
* The class represents a Person with a firstname and a lastname. It provides
* access with JavaFX Properties.
* The class represents a Person with a firstname and a lastname. It provides access with JavaFX Properties.
*
* @author alexander.casall
*
*/
public class Person {

private int technicalID;
private final StringProperty firstName = new SimpleStringProperty();
private final StringProperty lastName = new SimpleStringProperty();
private final BooleanProperty male = new SimpleBooleanProperty();

/**
* Creates a person with given name.
*
Expand All @@ -34,21 +32,21 @@ public Person(final String firstName, final String lastName, final boolean isMal
this.lastName.set(lastName);
this.male.set(isMale);
}

/**
* @return firstname as {@link StringProperty}
*/
public StringProperty firstNameProperty() {
return firstName;
}

/**
* @return lastname as {@link StringProperty}
*/
public StringProperty lastNameProperty() {
return lastName;
}

/**
* @return male as {@link BooleanProperty}
*/
Expand All @@ -62,29 +60,29 @@ public BooleanProperty maleProperty() {
public String getFirstName() {
return firstNameProperty().get();
}

/**
* @see #getFirstName()
* @param firstName
*/
public void setFirstName(final String firstName) {
firstNameProperty().set(firstName);
}

/**
* @return lastname as {@link String}
*/
public String getLastName() {
return lastNameProperty().get();
}

/**
* @see #getLastName()
*/
public void setLastName(final String lastName) {
lastNameProperty().set(lastName);
}

/**
* @return male as boolean
*/
Expand All @@ -94,7 +92,8 @@ public boolean isMale() {

/**
* @see #isMale()
* @param male whether the person is male
* @param male
* whether the person is male
*/
public void setMale(boolean male) {
this.male.set(male);
Expand All @@ -111,5 +110,5 @@ public int getId() {
}
return technicalID;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
@Singleton
public class Repository {

List<Person> persons = new ArrayList<Person>();

/**
* Creates the Repo.
*/
Expand All @@ -23,14 +23,14 @@ public Repository() {
persons.add(new Person("Bernd", "Grams", true));
persons.add(new Person("Anna", "Schulze", false));
}

/**
* @return available {@link Person}s
*/
public List<Person> getPersons() {
return persons;
}

/**
* Gets a Person.s
*
Expand All @@ -44,5 +44,5 @@ public Person getPersonById(final int id) {
return person;
return null;
}

}
Loading

0 comments on commit da7bb91

Please sign in to comment.