Skip to content

Commit

Permalink
Renaming Controller to ViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
flqw committed Dec 11, 2014
1 parent aaee1f2 commit b1f7655
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/de/flqw/fx/screens/Screens.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Screens extends StackPane {
private Stage stage;

private HashMap<String, Node> screens = new HashMap<>();
private HashMap<String, Controller> controllers = new HashMap<>();
private HashMap<String, ViewController> controllers = new HashMap<>();

private String activeScreen;

Expand Down Expand Up @@ -48,7 +48,7 @@ public void load(String id, String fxml) {

Node screenRoot = loader.load();

Controller controller = loader.getController();
ViewController controller = loader.getController();

// Inject values.
controller.setScenes(this);
Expand All @@ -68,7 +68,7 @@ public void load(String id, String fxml) {
}

/**
* For javadoc see {@link Controller#switchTo}.
* For javadoc see {@link ViewController#switchTo}.
*
* @param screenId
*/
Expand Down Expand Up @@ -116,8 +116,8 @@ private class ScreenTransitionHandler {

ScreenTransitionState state = ScreenTransitionState.OLD_WILL_DISAPPEAR;

Controller oldController;
Controller newController;
ViewController oldController;
ViewController newController;

Node newScreenRoot;
Node oldScreenRoot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Abstract superclass for FXML Controllers to be used with the Screens framework. Contains all life-cycle methods that may be
* overridden.
*/
public abstract class Controller {
public abstract class ViewController {

/**
* The primary stage of this screen.
Expand Down
4 changes: 2 additions & 2 deletions test/de/flqw/fx/screens/Screen1Controller.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.flqw.fx.screens;

import de.flqw.fx.screens.Controller;
import de.flqw.fx.screens.ViewController;
import de.flqw.fx.screens.Screens.ScreenTransition;
import javafx.animation.TranslateTransition;
import javafx.event.ActionEvent;
Expand All @@ -10,7 +10,7 @@
import javafx.scene.control.Button;
import javafx.util.Duration;

public class Screen1Controller extends Controller {
public class Screen1Controller extends ViewController {

private @FXML Button transitionButton;
private @FXML Button exitButton;
Expand Down
4 changes: 2 additions & 2 deletions test/de/flqw/fx/screens/Screen2Controller.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package de.flqw.fx.screens;

import de.flqw.fx.screens.Controller;
import de.flqw.fx.screens.ViewController;
import de.flqw.fx.screens.Screens.ScreenTransition;
import javafx.animation.TranslateTransition;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.util.Duration;

public class Screen2Controller extends Controller {
public class Screen2Controller extends ViewController {

private @FXML Button backButton;

Expand Down

0 comments on commit b1f7655

Please sign in to comment.