Debian Codegraph @

fontawesomefx-octicons/src/main/java/de/jensd/fx/glyphs/octicons/demo/OctIconsDemoApp.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.octicons.demo;
13
14 import de.jensd.fx.glyphs.octicons.OctIcon;
15 import de.jensd.fx.glyphs.octicons.OctIconView;
16 import de.jensd.fx.glyphs.octicons.utils.OctIconFactory;
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 OctIconsDemoApp extends Application {
28
29 @Override
30 public void start(Stage primaryStage) throws Exception {
31 FlowPane iconsPane = new FlowPane(3, 3);
32 for (OctIcon octicon : OctIcon.values()) {
33 iconsPane.getChildren().add(new OctIconView(octicon, "3em"));
34 }
35 Scene scene = new Scene(new ScrollPane(iconsPane), 500, 500);
36 primaryStage.setScene(scene);
37 primaryStage.setTitle("OctIcons Demo: " + OctIcon.values().length + " Icons");
38 primaryStage.show();
39
40 }
41
42 public static void main(String[] args) {
43 launch(args);
44 }
45 }