Permalink
Browse files

Changed the project structure once again to make it more Maven-like.

  • Loading branch information...
1 parent 4dda2c8 commit 682a67e1c2c1b0303e1ee6c39ae4726fb2fa0fc9 @stevenschwenke committed Mar 29, 2013
Showing with 103 additions and 121 deletions.
  1. +2 −12 .classpath
  2. +10 −2 pom.xml
  3. +2 −2 src/main/java/application/Start.java
  4. +4 −4 src/main/java/business/UserInterface.java
  5. +1 −1 src/main/java/business/logicalObjects/CartesianCoordinate.java
  6. +1 −1 src/main/java/business/logicalObjects/GameState.java
  7. +3 −3 src/main/java/business/logicalObjects/GameStateManager.java
  8. +2 −3 src/main/java/business/logicalObjects/GeographicalLogicProvider.java
  9. +1 −1 src/main/java/business/logicalObjects/GroupMembership.java
  10. +4 −5 src/main/java/business/logicalObjects/Interaction.java
  11. +2 −1 src/main/java/business/logicalObjects/PolarCoordinate.java
  12. +6 −7 src/main/java/business/worldObjects/Colony.java
  13. +2 −2 src/main/java/business/worldObjects/Resource.java
  14. +3 −4 src/main/java/business/worldObjects/ResourceSpawner.java
  15. +7 −8 src/main/java/business/worldObjects/World.java
  16. +2 −3 src/main/java/business/worldObjects/WorldObject.java
  17. +13 −14 src/main/java/ui/javaFX/JavaFxApplication.java
  18. +4 −4 src/main/java/ui/javaFX/interfaceObjects/AttackEventHandler.java
  19. +4 −4 src/main/java/ui/javaFX/interfaceObjects/ColonizeEventHandler.java
  20. +4 −4 src/main/java/ui/javaFX/interfaceObjects/ColonyFXMouseOverPane.java
  21. +6 −5 src/main/java/ui/javaFX/interfaceObjects/ResourceSpawnerFXMouseOverPane.java
  22. +2 −2 src/main/java/ui/javaFX/interfaceObjects/RootInfoPane.java
  23. +5 −5 src/main/java/ui/javaFX/worldObjects/ColonyFX.java
  24. +2 −2 src/main/java/ui/javaFX/worldObjects/ResourceFX.java
  25. +4 −4 src/main/java/ui/javaFX/worldObjects/ResourceSpawnerFX.java
  26. +2 −5 src/test/java/business/logicalObjects/GeographicalLogicProviderTest.java
  27. +1 −6 src/test/java/business/logicalObjects/PolarCoordinateTest.java
  28. +4 −7 src/test/java/business/worldObjects/ColonyTest.java
View
14 .classpath
@@ -1,17 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="test">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
View
12 pom.xml
@@ -7,8 +7,16 @@
<version>0.0.1-SNAPSHOT</version>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <testSourceDirectory>src/test/java</testSourceDirectory>
+
+
+<!-- <sourceDirectory>D:\workspace_maven\MyApp\src\main\java</sourceDirectory> -->
+<!-- <scriptSourceDirectory>D:\workspace_maven\MyApp\src\main\scripts</scriptSourceDirectory> -->
+<!-- <testSourceDirectory>D:\workspace_maven\MyApp\src\test\java</testSourceDirectory> -->
+<!-- <outputDirectory>D:\workspace_maven\MyApp\target\classes</outputDirectory> -->
+<!-- <testOutputDirectory>D:\workspace_maven\MyApp\target\test-classes</testOutputDirectory> -->
+
+ <sourceDirectory>src\main\java</sourceDirectory>
+ <testSourceDirectory>src\test\java</testSourceDirectory>
<resources>
<resource>
View
4 src/main/java/application/Start.java
@@ -1,6 +1,6 @@
-package main.java.application;
+package application;
-import main.java.ui.javaFX.JavaFxApplication;
+import ui.javaFX.JavaFxApplication;
/**
* Entry point for this project. Here, the used UI framework is chosen. The
View
8 src/main/java/business/UserInterface.java
@@ -1,8 +1,8 @@
-package main.java.business;
+package business;
-import main.java.business.logicalObjects.GameState;
-import main.java.business.logicalObjects.Interaction;
-import main.java.business.worldObjects.WorldObject;
+import business.logicalObjects.GameState;
+import business.logicalObjects.Interaction;
+import business.worldObjects.WorldObject;
/**
* This interface has to be implemented by all base classes for other user
View
2 src/main/java/business/logicalObjects/CartesianCoordinate.java
@@ -1,4 +1,4 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
/**
* Represents a point in a 2-dimensional space.
View
2 src/main/java/business/logicalObjects/GameState.java
@@ -1,4 +1,4 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
/**
* States in which the game can be.
View
6 src/main/java/business/logicalObjects/GameStateManager.java
@@ -1,7 +1,7 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
-import main.java.business.worldObjects.Colony;
-import main.java.business.worldObjects.World;
+import business.worldObjects.Colony;
+import business.worldObjects.World;
/**
* Class that manages the state of the game. Currently, there are two States:
View
5 src/main/java/business/logicalObjects/GeographicalLogicProvider.java
@@ -1,9 +1,8 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
import java.util.Set;
-import main.java.business.worldObjects.Resource;
-
+import business.worldObjects.Resource;
/**
* Provides geographical logic.
View
2 src/main/java/business/logicalObjects/GroupMembership.java
@@ -1,4 +1,4 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
/**
* To assign an object in the game to a group.
View
9 src/main/java/business/logicalObjects/Interaction.java
@@ -1,9 +1,8 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
-import main.java.business.worldObjects.Colony;
-import main.java.business.worldObjects.Resource;
-import main.java.business.worldObjects.World;
-import main.java.business.worldObjects.WorldObject;
+import business.worldObjects.Colony;
+import business.worldObjects.World;
+import business.worldObjects.WorldObject;
/**
* This class holds all UI-relevant interactions between {@link WorldObject}s.
View
3 src/main/java/business/logicalObjects/PolarCoordinate.java
@@ -1,4 +1,5 @@
-package main.java.business.logicalObjects;
+package business.logicalObjects;
+
/**
* Represents a polar coordinate.
View
13 src/main/java/business/worldObjects/Colony.java
@@ -1,14 +1,13 @@
-package main.java.business.worldObjects;
+package business.worldObjects;
import java.util.Timer;
import java.util.TimerTask;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.GameStateManager;
-import main.java.business.logicalObjects.GeographicalLogicProvider;
-import main.java.business.logicalObjects.GroupMembership;
-import main.java.business.logicalObjects.Interaction;
-
+import business.logicalObjects.CartesianCoordinate;
+import business.logicalObjects.GameStateManager;
+import business.logicalObjects.GeographicalLogicProvider;
+import business.logicalObjects.GroupMembership;
+import business.logicalObjects.Interaction;
/**
* Some kind of base or settlement or colony. Don't know yet.
View
4 src/main/java/business/worldObjects/Resource.java
@@ -1,6 +1,6 @@
-package main.java.business.worldObjects;
+package business.worldObjects;
-import main.java.business.logicalObjects.CartesianCoordinate;
+import business.logicalObjects.CartesianCoordinate;
/**
* A resource.
View
7 src/main/java/business/worldObjects/ResourceSpawner.java
@@ -1,14 +1,13 @@
-package main.java.business.worldObjects;
+package business.worldObjects;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.PolarCoordinate;
-
+import business.logicalObjects.CartesianCoordinate;
+import business.logicalObjects.PolarCoordinate;
/**
* Let the user spawn {@link Resource}s manually.
View
15 src/main/java/business/worldObjects/World.java
@@ -1,15 +1,14 @@
-package main.java.business.worldObjects;
+package business.worldObjects;
import java.util.HashSet;
import java.util.Set;
-import main.java.business.UserInterface;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.GameState;
-import main.java.business.logicalObjects.GameStateManager;
-import main.java.business.logicalObjects.GroupMembership;
-import main.java.business.logicalObjects.Interaction;
-
+import business.UserInterface;
+import business.logicalObjects.CartesianCoordinate;
+import business.logicalObjects.GameState;
+import business.logicalObjects.GameStateManager;
+import business.logicalObjects.GroupMembership;
+import business.logicalObjects.Interaction;
/**
* The world in which the simulation takes place. Singelton.
View
5 src/main/java/business/worldObjects/WorldObject.java
@@ -1,9 +1,8 @@
-package main.java.business.worldObjects;
+package business.worldObjects;
import java.util.TimerTask;
-import main.java.business.logicalObjects.CartesianCoordinate;
-
+import business.logicalObjects.CartesianCoordinate;
/**
* All objects that are meant to be displayed in the user interface have to
View
27 src/main/java/ui/javaFX/JavaFxApplication.java
@@ -1,21 +1,8 @@
-package main.java.ui.javaFX;
+package ui.javaFX;
import java.util.Timer;
import java.util.TimerTask;
-import main.java.business.UserInterface;
-import main.java.business.logicalObjects.GameState;
-import main.java.business.logicalObjects.Interaction;
-import main.java.business.worldObjects.Colony;
-import main.java.business.worldObjects.Resource;
-import main.java.business.worldObjects.ResourceSpawner;
-import main.java.business.worldObjects.World;
-import main.java.business.worldObjects.WorldObject;
-import main.java.ui.javaFX.interfaceObjects.RootInfoPane;
-import main.java.ui.javaFX.worldObjects.ColonyFX;
-import main.java.ui.javaFX.worldObjects.ResourceFX;
-import main.java.ui.javaFX.worldObjects.ResourceSpawnerFX;
-
import javafx.animation.FadeTransition;
import javafx.application.Application;
import javafx.application.Platform;
@@ -33,6 +20,18 @@
import javafx.scene.shape.Line;
import javafx.stage.Stage;
import javafx.util.Duration;
+import ui.javaFX.interfaceObjects.RootInfoPane;
+import ui.javaFX.worldObjects.ColonyFX;
+import ui.javaFX.worldObjects.ResourceFX;
+import ui.javaFX.worldObjects.ResourceSpawnerFX;
+import business.UserInterface;
+import business.logicalObjects.GameState;
+import business.logicalObjects.Interaction;
+import business.worldObjects.Colony;
+import business.worldObjects.Resource;
+import business.worldObjects.ResourceSpawner;
+import business.worldObjects.World;
+import business.worldObjects.WorldObject;
/**
* User Interface with JavaFX. This class starts a JavaFX application and
View
8 src/main/java/ui/javaFX/interfaceObjects/AttackEventHandler.java
@@ -1,13 +1,13 @@
-package main.java.ui.javaFX.interfaceObjects;
+package ui.javaFX.interfaceObjects;
-import main.java.business.worldObjects.Colony;
-import main.java.ui.javaFX.JavaFxApplication;
-import main.java.ui.javaFX.worldObjects.ColonyFX;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.input.MouseDragEvent;
import javafx.scene.input.MouseEvent;
+import ui.javaFX.JavaFxApplication;
+import ui.javaFX.worldObjects.ColonyFX;
+import business.worldObjects.Colony;
/**
* Event handler for attacking foe colonies.
View
8 src/main/java/ui/javaFX/interfaceObjects/ColonizeEventHandler.java
@@ -1,12 +1,12 @@
-package main.java.ui.javaFX.interfaceObjects;
+package ui.javaFX.interfaceObjects;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.worldObjects.Colony;
-import main.java.ui.javaFX.JavaFxApplication;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.event.EventTarget;
import javafx.scene.input.MouseEvent;
+import ui.javaFX.JavaFxApplication;
+import business.logicalObjects.CartesianCoordinate;
+import business.worldObjects.Colony;
/**
* Event handler for creating new colonies.
View
8 src/main/java/ui/javaFX/interfaceObjects/ColonyFXMouseOverPane.java
@@ -1,8 +1,5 @@
-package main.java.ui.javaFX.interfaceObjects;
+package ui.javaFX.interfaceObjects;
-import main.java.business.worldObjects.Colony;
-import main.java.ui.javaFX.JavaFxApplication;
-import main.java.ui.javaFX.worldObjects.ColonyFX;
import javafx.animation.ScaleTransition;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
@@ -19,6 +16,9 @@
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.util.Duration;
+import ui.javaFX.JavaFxApplication;
+import ui.javaFX.worldObjects.ColonyFX;
+import business.worldObjects.Colony;
/**
* Pane that opens when hovering over a {@link ColonyFX}.
View
11 src/main/java/ui/javaFX/interfaceObjects/ResourceSpawnerFXMouseOverPane.java
@@ -1,8 +1,5 @@
-package main.java.ui.javaFX.interfaceObjects;
+package ui.javaFX.interfaceObjects;
-import main.java.business.worldObjects.ResourceSpawner;
-import main.java.ui.javaFX.JavaFxApplication;
-import main.java.ui.javaFX.worldObjects.ResourceSpawnerFX;
import javafx.animation.ScaleTransition;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
@@ -18,6 +15,9 @@
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.util.Duration;
+import ui.javaFX.JavaFxApplication;
+import ui.javaFX.worldObjects.ResourceSpawnerFX;
+import business.worldObjects.ResourceSpawner;
/**
* Pane that opens when hovering over a {@link ResourceSpawnerFX}.
@@ -33,7 +33,8 @@
private ResourceSpawnerFX resourceSpawnerFX;
private static Label resourceLabel;
- public ResourceSpawnerFXMouseOverPane(final ResourceSpawnerFX resourceSpawnerFX) {
+ public ResourceSpawnerFXMouseOverPane(
+ final ResourceSpawnerFX resourceSpawnerFX) {
super("RessourceSpawner", createGridPane(resourceSpawnerFX));
this.resourceSpawnerFX = resourceSpawnerFX;
View
4 src/main/java/ui/javaFX/interfaceObjects/RootInfoPane.java
@@ -1,11 +1,11 @@
-package main.java.ui.javaFX.interfaceObjects;
+package ui.javaFX.interfaceObjects;
-import main.java.business.worldObjects.World;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.control.TextArea;
import javafx.scene.control.TitledPane;
import javafx.scene.input.MouseEvent;
+import business.worldObjects.World;
/**
* Pane showing information about the world during root mode.
View
10 src/main/java/ui/javaFX/worldObjects/ColonyFX.java
@@ -1,13 +1,13 @@
-package main.java.ui.javaFX.worldObjects;
+package ui.javaFX.worldObjects;
import javafx.event.EventHandler;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
-import main.java.business.logicalObjects.GroupMembership;
-import main.java.business.worldObjects.Colony;
-import main.java.ui.javaFX.JavaFxApplication;
-import main.java.ui.javaFX.interfaceObjects.ColonyFXMouseOverPane;
+import ui.javaFX.JavaFxApplication;
+import ui.javaFX.interfaceObjects.ColonyFXMouseOverPane;
+import business.logicalObjects.GroupMembership;
+import business.worldObjects.Colony;
/**
* Graphical representation of a {@link Colony} for JavaFX.
View
4 src/main/java/ui/javaFX/worldObjects/ResourceFX.java
@@ -1,11 +1,11 @@
-package main.java.ui.javaFX.worldObjects;
+package ui.javaFX.worldObjects;
import javafx.animation.FadeTransition;
import javafx.animation.ScaleTransition;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.util.Duration;
-import main.java.business.worldObjects.Resource;
+import business.worldObjects.Resource;
/**
* Graphical representation of a {@link Resource} for JavaFX.
View
8 src/main/java/ui/javaFX/worldObjects/ResourceSpawnerFX.java
@@ -1,13 +1,13 @@
-package main.java.ui.javaFX.worldObjects;
+package ui.javaFX.worldObjects;
-import main.java.business.worldObjects.ResourceSpawner;
-import main.java.ui.javaFX.JavaFxApplication;
-import main.java.ui.javaFX.interfaceObjects.ResourceSpawnerFXMouseOverPane;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
+import ui.javaFX.JavaFxApplication;
+import ui.javaFX.interfaceObjects.ResourceSpawnerFXMouseOverPane;
+import business.worldObjects.ResourceSpawner;
/**
* Graphical representation of a {@link RessourceSpawnerRepresentation} for
View
7 src/test/java/business/logicalObjects/GeographicalLogicProviderTest.java
@@ -1,17 +1,14 @@
-package test.java.business.logicalObjects;
+package business.logicalObjects;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.util.HashSet;
import java.util.Set;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.GeographicalLogicProvider;
-import main.java.business.worldObjects.Resource;
-
import org.junit.Test;
+import business.worldObjects.Resource;
/**
* Test for {@link GeographicalLogicProvider}.
View
7 src/test/java/business/logicalObjects/PolarCoordinateTest.java
@@ -1,13 +1,9 @@
-package test.java.business.logicalObjects;
+package business.logicalObjects;
import static org.junit.Assert.assertEquals;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.PolarCoordinate;
-
import org.junit.Test;
-
/**
* Tests for {@link PolarCoordinate}.
*
@@ -23,7 +19,6 @@
@Test
public void nullVectorToCartesianCoordinatesTest() {
-
PolarCoordinate pc = new PolarCoordinate(90, 0);
CartesianCoordinate cc = pc.toCartesianCoordinates();
View
11 src/test/java/business/worldObjects/ColonyTest.java
@@ -1,17 +1,14 @@
-package test.java.business.worldObjects;
+package business.worldObjects;
import static org.junit.Assert.assertEquals;
-import main.java.business.UserInterface;
-import main.java.business.logicalObjects.CartesianCoordinate;
-import main.java.business.logicalObjects.GroupMembership;
-import main.java.business.worldObjects.Colony;
-import main.java.business.worldObjects.World;
-
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
+import business.UserInterface;
+import business.logicalObjects.CartesianCoordinate;
+import business.logicalObjects.GroupMembership;
/**
* Tests for {@link Colony}.

0 comments on commit 682a67e

Please sign in to comment.