/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * * @author Andrey Nazarov */ package test.css.controls; import java.net.URL; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.scene.Node; import javafx.scene.layout.Pane; import java.util.Set; import javafx.application.Platform; import javafx.scene.text.Text; import test.css.controls.styles.Style; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.ScrollablePageWithSlots; import test.javaclient.shared.TestNode; import test.javaclient.shared.Utils; public class ControlsCSSApp extends BasicButtonChooserApp { private static int width = 1500; private static int heigth = 900; private static boolean isSetterMode = false; public static final String SETTER_MODE = "SetterMode"; TestNode rootTestNode = new TestNode(); private static void setSetterMode(boolean isSetterMode) { ControlsCSSApp.isSetterMode = isSetterMode; } public ControlsCSSApp() { super(width, heigth, "CssControls", false); } public static void main(String args[]) { if (args != null && args.length > 0) { if (args[0].equals(SETTER_MODE)) { ControlsCSSApp.setSetterMode(true); //Now there is no way to init app in Launcher } } Utils.launch(ControlsCSSApp.class, args); } private void createPages(ControlPage page, TestNode rootTestNode) { createPages(page, rootTestNode, null); } private void createPages(ControlPage page, TestNode rootTestNode, String styleName) { ScrollablePageWithSlots pageWithSlot = new ScrollablePageWithSlots(page.name(), width, height); rootTestNode.add(pageWithSlot); Set