-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
5,314 additions
and
5,317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 55 additions & 55 deletions
110
demo/demos/MainDemo.java → demo/src/main/java/demos/MainDemo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} |
Oops, something went wrong.