• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DesktopApplicationContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.pivot.wtk.DesktopApplicationContext的典型用法代码示例。如果您正苦于以下问题:Java DesktopApplicationContext类的具体用法?Java DesktopApplicationContext怎么用?Java DesktopApplicationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DesktopApplicationContext类属于org.apache.pivot.wtk包,在下文中一共展示了DesktopApplicationContext类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: shutdown

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
@Override
public boolean shutdown(boolean optional) throws Exception {
    if (optional) {
        int numberOfCurrentRunningDownloads = Services.getDownloadService().getNumberOfCurrentRunningDownloads();
        if (numberOfCurrentRunningDownloads > 0) {
            String message = msgformat("There {0,choice,1#is|1<are} currently {0} active download{0,choice,1#|1<s}.\nReally quit?", numberOfCurrentRunningDownloads);
            final Alert alert = new Alert(MessageType.QUESTION, message, new ArrayList<>("Yes", "No"), true);
            alert.setTitle("Quit?");
            alert.open(this.display, this.window, new DialogCloseListener() {
                @Override
                public void dialogClosed(Dialog dialog, boolean modal) {
                    if (alert.getSelectedOptionIndex() == 0) {
                        DesktopApplicationContext.exit(false);
                    }
                }
            });
            return true;
        }
    }
    Services.getDownloadService().shutdown();
    Services.getHttpClientService().shutdown();
    if (this.provider != null) {
        this.provider.reset();
        this.provider.stop();
        this.provider = null;
    }
    this.display = null;
    return false;
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:30,代码来源:Main.java


示例2: apply

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
@Override
public Statement apply(final Statement base, final FrameworkMethod method, final Object target) {
    return new Statement() {
        @Override
        public void evaluate() throws Throwable {
            TestDesktopPivotApplication.init(target);
            SwingUtilities.invokeAndWait(new Runnable() {
                @Override
                public void run() {
                    DesktopApplicationContext.main(TestDesktopPivotApplication.class, startupArgs);
                }
            });
            TestDesktopPivotApplication.getLatch().await();
            GriffonApplication application = TestDesktopPivotApplication.getApplication();
            application.getInjector().injectMembers(target);
            handleTestForAnnotation(application, target);

            before(application, target);
            try {
                base.evaluate();
            } finally {
                after(application, target);
            }
        }
    };
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:27,代码来源:GriffonPivotRule.java


示例3: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
    log.info("GrooveJames started.");
    log.info("GrooveJames running on {} {} ({}) in {}", System.getProperty("java.vm.name"), System.getProperty("java.runtime.version"), System.getProperty("java.vm.vendor"), System.getProperty("java.home"));
    System.setProperty("org.apache.pivot.wtk.skin.terra.location", "/groovejames/gui/GrooveJames_theme.json");
    args = OSUtils.filterSystemProperties(args);
    DesktopApplicationContext.main(Main.class, args);
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:8,代码来源:Main.java


示例4: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
if(args == null || args.length < 1 || args[0] == null) {
          URL url = MosaicPaneRefImpl.class.getResource("testModel.txt");
          String path = Paths.get(url.toExternalForm()).toAbsolutePath().toString();
          try{
              path = Paths.get(url.toURI()).toAbsolutePath().toString();
          }catch(Exception e) { e.printStackTrace(); }
          
          args = new String[] { "--file="+path, "--surface=test"};
      }

DesktopApplicationContext.main(MosaicPaneRefImpl.class, args);
  }
 
开发者ID:fxpresso,项目名称:Mosaic,代码行数:14,代码来源:MosaicPaneRefImpl.java


示例5: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main( String[] args )
{
	if (args.length > 0) // Command Line Function
    {
        Out.setLogger(null);
        Out.print(LOG_LEVEL.INFO, "Command Line compiling enabled");
        Out.print(LOG_LEVEL.INFO, "Loading application...");
        new Master();
        
        for (String s: args) {
            if (new File(s).exists() && s.endsWith(".dcp")) {
                Out.print(LOG_LEVEL.INFO, "Processing dcp file: " + s);
                System.out.println();
                
                Master.facade.process(s);// compile save file with izpack
            }
            else {
                Out.print(LOG_LEVEL.ERR, "Filepath doesn't exist or file is incorrect! Please give a valid path to a dcp save file.");
            }
        }
    }
    else // GUI Application
    {
        // Apache Pivot bugfix for Java VM versions containing '_'
        String javaVersionFix = System.getProperty("java.runtime.version").split("_")[0];
        System.setProperty("java.vm.version", javaVersionFix);
        Out.print(LOG_LEVEL.INFO, "Fixing Java version to v" + System.getProperty("java.vm.version"));

        DesktopApplicationContext.main(Master.class, args);
    }
}
 
开发者ID:DevComPack,项目名称:setupmaker,代码行数:32,代码来源:App.java


示例6: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
    DesktopApplicationContext.main(ShareActionTestApp.class, args);
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:4,代码来源:ShareAction.java


示例7: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
    DesktopApplicationContext.main(TextAreaTest.class, args);
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:4,代码来源:TextAreaTest.java


示例8: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
    DesktopApplicationContext.main(DissectorApplication.class, args);
}
 
开发者ID:bramp,项目名称:dissector,代码行数:4,代码来源:DissectorApplication.java


示例9: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
    DesktopApplicationContext.main(DesktopPivotGriffonApplication.class, args);
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:4,代码来源:DesktopPivotGriffonApplication.java


示例10: run

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void run(String[] args) {
    DesktopApplicationContext.main(DesktopPivotGriffonApplication.class, args);
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:4,代码来源:DesktopPivotGriffonApplication.java


示例11: start

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void start(String[] args) {
	PlayerServer playerServer = PlayerServer.getInstance();
	CameraServer cameraServer = CameraServer.getInstance();
	PlayerServerListener playerServerListener = null;
	
	try {
		// comment in next line for "test run"
		// SerialInterface sI = new SerialInterface("COM8");
		GameModerator gameModerator = GameModerator.getInstance();
		playerServerListener = new PlayerServerListener(gameModerator);
		playerServer.addListener(playerServerListener);
		
		PlayerNetwork.register(playerServer);
		playerServer.bind(PlayerNetwork.PLAYER_SERVICE_PORT, PlayerNetwork.PLAYER_SERVICE_PORT);
		playerServer.start();
		
		cameraServer.bind(WorldNetwork.CAMERA_SERVICE_PORT, WorldNetwork.CAMERA_SERVICE_PORT);
		
		CameraServerListener cameraServerListener = new CameraServerListener(gameModerator);
		cameraServer.addListener(cameraServerListener);
		WorldNetwork.register(cameraServer);
		
		cameraServer.start();
		
		boolean displayGui = true;
		if (args != null) {
			for (String string : args) {
				if ("--gui=false".equals(string)) {
					displayGui = false;
					break;
				}
			}
		}
		
		if (displayGui) {
			new RepeatingReleasedEventsFixer().install();
			DesktopApplicationContext.main(ServerView.class, args);
		}
	} catch (Exception e) {
		_logger.error("Exception caught during application startup.", e);
		
		if (playerServer != null) {
			playerServer.close();
		}
		if (cameraServer != null) {
			cameraServer.close();
		}
		// TODO: Are this all connections, we need to close?
	}
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:51,代码来源:Main.java


示例12: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
	DesktopApplicationContext.main(CameraApplication.class, args);
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:4,代码来源:CameraApplication.java


示例13: main

import org.apache.pivot.wtk.DesktopApplicationContext; //导入依赖的package包/类
public static void main(String[] args) {
	DesktopApplicationContext.main(PlayerSimulatorApplication.class, args);
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:4,代码来源:PlayerSimulatorApplication.java



注:本文中的org.apache.pivot.wtk.DesktopApplicationContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java State类代码示例发布时间:2022-05-22
下一篇:
Java Base64类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap