Java 类javafx.application.Application 实例源码
项目:FX-Test
文件:ApplicationLaunch.java
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();
}
}
项目:marathonv5
文件:DisplayWindow.java
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());
}
}
}
}
项目:gogui
文件:GOGUIImpl.java
protected static void startGUI() {
new Thread() {
public void run() {
Application.launch(GOGUIImpl.class);
}
}.start();
}
项目:MinecraftServerSync
文件:MinecraftServerSync.java
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);
}
}
项目:GraphCreator
文件:Plotter.java
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();
}
}
项目:marathonv5
文件:JavaFXElementTest.java
public static void startApplication() {
new Thread(new Runnable() {
@Override public void run() {
Application.launch(ApplicationHelper.class);
}
}).start();
}
项目:Example.EMA.Java.SpeedGuide
文件:SpeedGuide.java
@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();
}
}
项目:marathonv5
文件:RFXComponentTest.java
public static void startApplication() {
new Thread(new Runnable() {
@Override public void run() {
Application.launch(ApplicationHelper.class);
}
}).start();
}
项目:JavaHomework
文件:MainWindows.java
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);
}
项目:qgu
文件:MainTest.java
@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();
}
项目:Pinggers-GIT-SVN-Client
文件:Main.java
/**
* @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");
}
项目:dialog-tool
文件:Main.java
public static void main (String[] args) {
//initialize language files
LangInitializer.init("./data/i18n/languages.json");
//create JavaFX window
Application.launch(JavaFXApplication.class, args);
}
项目:GazePlay
文件:BravoTestVisual.java
@Test
public void shouldRunBravo() throws InterruptedException {
Application.launch(BravoTestApp.class, null);
finishedAnimation.await();
assertTrue(duration > 13000);
assertTrue(duration < 14000);
}
项目:Example.EMA.Java.SpeedGuide
文件:SpeedGuide.java
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");
}
项目:keyboard-light-composer
文件:KeyboardLightComposer.java
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();
}
项目:Suji
文件:Main.java
private void buildDockPane() {
dockPane = new DockPane();
Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
DockPane.initializeDefaultUserAgentStylesheet();
}
项目:voogasalad-ltub
文件:LoaderTester.java
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(args);
}
项目:titanium
文件:PlayerView.java
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);
}
项目:titanium
文件:MainPane.java
public Application getApp() {
return app;
}
项目:titanium
文件:ServerTabsPane.java
public Application getApplication() {
return mainPane.getApp();
}
项目:Java-9-Cookbook
文件:EmbedAudioVideoDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:java.IF17wi
文件:MausMalen.java
public static void main(String[] args) {
Application.launch(args); // startet die Anwendung
}
项目:Java-9-Cookbook
文件:FxmlGuiDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:LineChartDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:CreateGuiDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:BrowserDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:ScatterChartDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:java.IF17wi
文件:RechteckAnimation.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:BubbleChartDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:CssJavaFxDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:BarChartDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Java-9-Cookbook
文件:PieChartDemo.java
public static void main(String[] args) {
Application.launch(args);
}
项目:Matcher
文件:Main.java
public static void main(String[] args) {
Application.launch(Gui.class, args);
}
项目:stvs
文件:StvsRootControllerDemo.java
@Test
public void javaFxTest() {
JavaFxTest.setToBeViewed(() -> simpleScene("session_valid_2.xml"));
Application.launch(JavaFxTest.class);
}
项目:incubator-netbeans
文件:Main.java
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
}
项目:lttng-scope
文件:FadeTransitionEx.java
public static void main(String[] args) {
Application.launch(args);
}
项目:lttng-scope
文件:ParallelTransitionExample.java
public static void main(String[] args) {
Application.launch(args);
}
项目:marathonv5
文件:Main.java
public static void main(String[] args) {
Application.launch(args);
}
项目:marathonv5
文件:Main.java
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
}
项目:marathonv5
文件:Main.java
public static void main(String[] args) {
Application.launch(args);
}