关于计算机专业应用程序类App有关的外文文献翻译成品:在Nashorn中使用JavaFX(中英文双语对照).docx

关于计算机专业应用程序类App有关的外文文献翻译成品:在Nashorn中使用JavaFX(中英文双语对照).docx

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
此文档是毕业设计外文翻译成品( 含英文原文+中文翻译),无需调整复杂的格式!下载之后直接可用,方便快捷!本文价格不贵,也就几十块钱!一辈子也就一次的事! 文献出处:Kishori Sharan Scripting in Java Integrating with Groovy and JavaScript,2019(如觉得年份太老,可改为近2年,毕竟很多毕业生都这样做) 英文1699单词,10021字符(字符就是印刷符),中文2600汉字。(如果字数多了,可自行删减,大多数学校都是要求选取外文的一部分内容进行翻译的。) Using JavaFX in Nashorn In this chapter, you will learn: 1.The JavaFX support in the jjs command-line tool 2.Providing an implementation for the init ( ) , start ( ) , and stop( ) methods of the JavaFX Application class in scripts 3.How to load and use JavaFX packages and classes using the predefined scripts 4.Creating and launching a simple JavaFX application using a Nashorn script Throughout this chapter, it is assumed that you have beginner-level experience in JavaFX8. If you do not have experience in JavaFX, please learn JavaFX before reading this chapter. JavaFX Support in jjs The j j s command-line tool lets you launch JavaFX applications created in Nashorn scripts. You need to use the –f x option with the j j s tool to run a script as a JavaFX application. The following command runs a script stored in the myf xapp. js file as a JavaFX application: Structure of JavaFX Applications in Scripts In a JavaFX application, you override the following three methods of the Application class to manage the lifecycle of the application: The init ( ) method The start ( ) method The stop( ) method In a Nashorn script, you can manage the lifecycle of a JavaFX application the same way as you do in Java. You can have three functions named init ( ) , start ( ) , and stop( ) in the script. Notice that all three functions are optional in a Nashorn script. These functions correspond to the three methods in the Java class and they are called as follows, in order: 1.The init ( ) function is called. You can initialize the application in this function. 2.The start ( ) function is called. As is the case in a Java application, the start ( ) function is passed the reference to the primary stage of the application. You need to

您可能关注的文档

文档评论(0)

peidong88 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档