Debian Codegraph @

fontawesomefx-emojione/src/main/java/de/jensd/fx/glyphs/emojione/demo/EmojiOneDemoApp.java

raw
1 /**
2 * Copyright (c) 2015 Jens Deters http://www.jensd.de
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
5 *
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9 * KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10 *
11 */
12 package de.jensd.fx.glyphs.emojione.demo;
13
14 import de.jensd.fx.glyphs.emojione.EmojiOne;
15 import de.jensd.fx.glyphs.emojione.EmojiOneView;
16 import de.jensd.fx.glyphs.emojione.utils.EmojiOneFactory;
17 import javafx.application.Application;
18 import javafx.scene.Scene;
19 import javafx.scene.control.ScrollPane;
20 import javafx.scene.layout.FlowPane;
21 import javafx.stage.Stage;
22
23 /**
24 *
25 * @author Jens Deters
26 */
27 public class EmojiOneDemoApp extends Application {
28
29 @Override
30 public void start(Stage primaryStage) throws Exception {
31
32 FlowPane iconsPane = new FlowPane(3, 3);
33 for (EmojiOne icon : EmojiOne.values()) {
34 iconsPane.getChildren().add(new EmojiOneView(icon, "3em"));
35 }
36 Scene scene = new Scene(new ScrollPane(iconsPane), 500, 500);
37 primaryStage.setScene(scene);
38 primaryStage.setTitle("FontAwesomeFX: Apple Color Emoji Demo: " + EmojiOne.values().length + " Icons");
39 primaryStage.show();
40
41 }
42
43 public static void main(String[] args) {
44 launch(args);
45 }
46 }