Skip to content

Commit

Permalink
move 'demo' files to /demo/src/main
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Mar 23, 2017
1 parent 66207c9 commit a95bac3
Show file tree
Hide file tree
Showing 75 changed files with 5,314 additions and 5,317 deletions.
3 changes: 0 additions & 3 deletions subprojects/demo/demo.gradle → demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ dependencies {
// FontAwesome (Bintray)
compile 'de.jensd:fontawesomefx-fontawesome:4.7.0-5'
}

sourceSets.main.java.srcDirs = [rootProject.file('demo')]
sourceSets.main.resources.srcDirs = [rootProject.file('demo')]
110 changes: 55 additions & 55 deletions demo/demos/MainDemo.java → demo/src/main/java/demos/MainDemo.java
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
package demos;

import com.jfoenix.controls.JFXDecorator;
import com.jfoenix.svg.SVGGlyphLoader;
import demos.gui.main.MainController;
import io.datafx.controller.flow.Flow;
import io.datafx.controller.flow.container.DefaultFlowContainer;
import io.datafx.controller.flow.context.FXMLViewFlowContext;
import io.datafx.controller.flow.context.ViewFlowContext;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MainDemo extends Application {

@FXMLViewFlowContext
private ViewFlowContext flowContext;

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

public void start(Stage stage) throws Exception {

new Thread(() -> {
try {
SVGGlyphLoader.loadGlyphsFont(MainDemo.class.getResourceAsStream("/resources/fonts/icomoon.svg"),
"icomoon.svg");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}).start();

Flow flow = new Flow(MainController.class);
DefaultFlowContainer container = new DefaultFlowContainer();
flowContext = new ViewFlowContext();
flowContext.register("Stage", stage);
flow.createHandler(flowContext).start(container);

JFXDecorator decorator = new JFXDecorator(stage, container.getView());
decorator.setCustomMaximize(true);
Scene scene = new Scene(decorator, 800, 850);
scene.getStylesheets().add(MainDemo.class.getResource("/resources/css/jfoenix-fonts.css").toExternalForm());
scene.getStylesheets().add(MainDemo.class.getResource("/resources/css/jfoenix-design.css").toExternalForm());
scene.getStylesheets().add(MainDemo.class.getResource("/resources/css/jfoenix-main-demo.css").toExternalForm());
// stage.initStyle(StageStyle.UNDECORATED);
// stage.setFullScreen(true);
stage.setMinWidth(700);
stage.setMinHeight(800);
stage.setScene(scene);
stage.show();
}

}
package demos;

import com.jfoenix.controls.JFXDecorator;
import com.jfoenix.svg.SVGGlyphLoader;
import demos.gui.main.MainController;
import io.datafx.controller.flow.Flow;
import io.datafx.controller.flow.container.DefaultFlowContainer;
import io.datafx.controller.flow.context.FXMLViewFlowContext;
import io.datafx.controller.flow.context.ViewFlowContext;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MainDemo extends Application {

@FXMLViewFlowContext
private ViewFlowContext flowContext;

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

public void start(Stage stage) throws Exception {

new Thread(() -> {
try {
SVGGlyphLoader.loadGlyphsFont(MainDemo.class.getResourceAsStream("/fonts/icomoon.svg"),
"icomoon.svg");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}).start();

Flow flow = new Flow(MainController.class);
DefaultFlowContainer container = new DefaultFlowContainer();
flowContext = new ViewFlowContext();
flowContext.register("Stage", stage);
flow.createHandler(flowContext).start(container);

JFXDecorator decorator = new JFXDecorator(stage, container.getView());
decorator.setCustomMaximize(true);
Scene scene = new Scene(decorator, 800, 850);
scene.getStylesheets().add(MainDemo.class.getResource("/css/jfoenix-fonts.css").toExternalForm());
scene.getStylesheets().add(MainDemo.class.getResource("/css/jfoenix-design.css").toExternalForm());
scene.getStylesheets().add(MainDemo.class.getResource("/css/jfoenix-main-demo.css").toExternalForm());
// stage.initStyle(StageStyle.UNDECORATED);
// stage.setFullScreen(true);
stage.setMinWidth(700);
stage.setMinHeight(800);
stage.setScene(scene);
stage.show();
}

}
Loading

0 comments on commit a95bac3

Please sign in to comment.