public static synchronized void bootstrap() { if( launched ) { return; } launched = true; l = new CountDownLatch(1); Thread t = new Thread() { @Override public void run() { Application.launch(BootApplication.class); } }; t.start(); try { l.await(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void setTheme() { JSONObject themeSection = Preferences.instance().getSection("theme"); boolean builtin = themeSection.optBoolean("builtin"); String path = themeSection.optString("path", "/themes/marathon.css"); String name = themeSection.optString("name", "Marathon"); if (builtin) { if (name != null) { Application.setUserAgentStylesheet(name); } } else { if (path != null) { URL resource = getClass().getResource(path); if (resource != null) { Application.setUserAgentStylesheet(resource.toExternalForm()); } } } }
protected static void startGUI() { new Thread() { public void run() { Application.launch(GOGUIImpl.class); } }.start(); }
public static void main(String[] args) throws IOException { try { Application.launch(args); System.exit(0); } catch (Exception e) { LOGGER.error("Uncaught exception", e); System.exit(1); } }
public static void plot(LineGraph... graphs) { if (plotted) throw new RuntimeException("Plot can be called only once. Instead put all graphs in one call."); plotted = true; Plotter.graphs = graphs; try { Application.launch(); } catch (IllegalStateException e) { showGraphs(); } }
public static void startApplication() { new Thread(new Runnable() { @Override public void run() { Application.launch(ApplicationHelper.class); } }).start(); }
@Override public void start(Stage primaryStage) throws Exception { try { final SplashScreen splash = SplashScreen.getSplashScreen(); // Determine if we passed anything on the cmd line parseCmdLine(); // Define our controllers SpeedGuideViewController viewController = loadFXMLController("view/SpeedGuideView.fxml"); SpeedGuideConnection connectionController = loadFXMLController("view/ConnectionDialog.fxml"); // Wire up our Model/View/Controllers viewController.setConnectionViewController(connectionController); viewController.setDebug(m_debug); viewController.defineControlBindings(m_consumer); // Notify our consumer some setup information m_consumer.setDebug(m_debug); m_consumer.setViewController(viewController); // Define the main viewing scene, AnchorPane layout = viewController.getLayout(); Scene scene = new Scene(layout, layout.getPrefWidth(), layout.getPrefHeight()); // Prevent the user from resizing the window too small primaryStage.setMinHeight(layout.getMinHeight()); primaryStage.setMinWidth(layout.getMinWidth()); // Assign to our main stage and show the application to the end user primaryStage.setTitle("Speed Guide"); primaryStage.setScene(scene); primaryStage.show(); // Set up our EMA Consumer and launch a thread to run... Thread t = new Thread(m_consumer); t.start(); Application.Parameters params = getParameters(); connectionController.initialize(params.getNamed().get(HOST_PARAM), params.getNamed().get(SERVICE_PARAM), params.getNamed().get(USER_PARAM), m_consumer); // Attempt to Connect into Elektron if ( splash != null ) splash.close(); connectionController.connect(); } catch (Exception e) { System.out.print("Exception in Application Start: "); e.printStackTrace(); stop(); } }
public static void main(String[] args) { if(args.length >= 1){ try{ StarsRiver.MainWindows.date = LocalDate.parse(args[0],DateTimeFormatter.ofPattern("yyyy-MM-dd")); } catch(Exception e){ StarsRiver.MainWindows.date = LocalDate.now(); } } Application.launch(MainWindows.class, args); }
@BeforeClass public static void initJFX() { Thread t = new Thread("JavaFX Init Thread") { public void run() { Application.launch(FakeApp.class, new String[0]); } }; t.setDaemon(true); t.start(); }
/** * @param args * the Arguments used to start the JVM * @throws InterruptedException * When something unexcpted happens */ public static void main(String[ ] args) throws InterruptedException { Main.launchArgs = args.clone(); PWLogger.setupLogger(); PWLogger.getLogger("Main").info("Starting"); PWLogger.getLogger("Main").info("Startup Arguments: " + Arrays.toString(Main.launchArgs)); Application.launch(Overview.class, args); PWLogger.getLogger("Main").info("Exit"); }
public static void main (String[] args) { //initialize language files LangInitializer.init("./data/i18n/languages.json"); //create JavaFX window Application.launch(JavaFXApplication.class, args); }
@Test public void shouldRunBravo() throws InterruptedException { Application.launch(BravoTestApp.class, null); finishedAnimation.await(); assertTrue(duration > 13000); assertTrue(duration < 14000); }
private void parseCmdLine() throws Exception { Application.Parameters params = getParameters(); if ( params.getRaw().contains("--h") || params.getRaw().contains("--help") || params.getNamed().containsKey("h") || params.getNamed().containsKey("help")) { System.out.println(NEWLINE+"Syntax:"+NEWLINE); System.out.println(" > java -jar SpeedGuide.jar [options] or"+NEWLINE); System.out.println(" > SpeedGuide.exe [options] <Windows only>"+NEWLINE); System.out.println("Options:"+NEWLINE); System.out.println(" --host=hostname:port Server address/hostname and port of your Market Data server."); System.out.println(" Syntax: <host/ip>:<port>. Eg: elektron:14002 or 192.168.1.1:14002"); System.out.println(" --service=serviceName Service Name providing market data content."); System.out.println(" Eg: ELEKTRON_AD."); System.out.println(" --user=userName User name required if authentication is enabled on server."); System.out.println(" Note: if no user name is provided, the utility will use your desktop login"); System.out.println(" --d[ebug] Debug Mode. Display verbose messages to the console"); System.out.println(" --h[elp] Prints this screen"+NEWLINE); System.out.println("If neither the --host nor --service is not provided, the utility will prompt the user to enter these values."+NEWLINE); System.out.println("Example:"); System.out.println(" > SpeedGuide.exe --host=elektron:14002 --service=ELEKTRON_AD -user=testuser"); stop(); } m_debug = params.getRaw().contains("--d") || params.getRaw().contains("--debug") || params.getNamed().containsKey("d") || params.getNamed().containsKey("debug"); }
public static void main(String[] args) throws ReflectiveOperationException { loadPlugins(); // IntelliJ is not able to comprehend this much Lambda? (as it was before) Registerer.registerObjects(Device.class, DeviceRegister.getInstance()); Registerer.registerParsed(Effect.class, c -> EffectFactory.createFactory(c), EffectsRegister.getInstance()); Registerer.registerParsed(ValueStrategy.class, c -> ValueStrategyFactory.createFactory(c), ValueStrategyRegister.getInstance()); Registerer.registerParsed(BlendMode.class, c -> BlendModeFactory.createFactory(c), BlendModeRegister.getInstance()); Registerer.registerParsed(ScaleMode.class, c -> ScaleModeFactory.createFactory(c), ScaleModeRegister.getInstance()); Application.launch(KeyboardLightComposerApplication.class, args); // DefaultRenderer renderer = new DefaultRenderer(); // Device device = // DeviceRegister.getInstance().getRegisteredObjectsAsList().get(0); // // renderer.setDevice(device); // // Effect effect = // EffectsRegister.getInstance().getRegisteredObjectsAsList().get(0).newInstance(); // EffectLayer solidColorLayer = new EffectLayer(effect); // // solidColorLayer.getEffectLayerInformation().getWidth().setValue(5); // solidColorLayer.getEffectLayerInformation().getHeight().setValue(3); // // solidColorLayer.getEffectLayerInformation().getX().setValue(3); // solidColorLayer.getEffectLayerInformation().getY().setValue(3); // // device.init(); // // renderer.render(Arrays.asList(solidColorLayer)); // // sleep(); // // device.shutdown(); }
private void buildDockPane() { dockPane = new DockPane(); Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA); DockPane.initializeDefaultUserAgentStylesheet(); }
/** * @param args the command line arguments */ public static void main(String[] args) { Application.launch(args); }
public PlayerView(Player player, Server server, Application app) { this.player = player; this.server = server; this.app = app; ImageView copyImage = new ImageView(AssetsLoader.getAsset("copy.png")); copyImage.setFitWidth(16); copyImage.setFitHeight(16); ImageView steamImage = new ImageView(AssetsLoader.getAsset("steam.png")); steamImage.setFitWidth(16); steamImage.setFitHeight(16); ImageView banImage = new ImageView(AssetsLoader.getAsset("ban.png")); banImage.setFitWidth(16); banImage.setFitHeight(16); ImageView kickImage = new ImageView(AssetsLoader.getAsset("kick.png")); kickImage.setFitWidth(16); kickImage.setFitHeight(16); kickButton = new Button("", kickImage); banButton = new Button("", banImage); kickButton.setTooltip(new Tooltip("Kick this player")); banButton.setTooltip(new Tooltip("Ban this player")); actionPane = new HBox(kickButton, banButton); kickButton.setOnAction(this::kickPlayerAction); banButton.setOnAction(this::banPlayerAction); steamIDLabel = new Label(player.getSteamId()); copyButton = new Button("", copyImage); steamProfileButton = new Button("", steamImage); copyButton.setOnAction(this::copySteamIDToClipboardAction); steamProfileButton.setOnAction(this::steamProfileAction); copyButton.setTooltip(new Tooltip("Copy steamID to clipboard")); steamPan = new HBox(steamIDLabel, copyButton, steamProfileButton); }
public Application getApp() { return app; }
public Application getApplication() { return mainPane.getApp(); }
public static void main(String[] args) { Application.launch(args); }
public static void main(String[] args) { Application.launch(args); // startet die Anwendung }
public static void main(String[] args) { Application.launch(Gui.class, args); }
@Test public void javaFxTest() { JavaFxTest.setToBeViewed(() -> simpleScene("session_valid_2.xml")); Application.launch(JavaFxTest.class); }
/** * @param args the command line arguments */ public static void main(String[] args) { Application.launch(Main.class, (java.lang.String[])null); }