§ 瀏覽學位論文書目資料
  
系統識別號 U0002-1707202012572600
DOI 10.6846/TKU.2020.00483
論文名稱(中文) 基於JavaFX的繪圖程式庫
論文名稱(英文) A Graphic Library Based On JavaFX
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 資訊管理學系碩士班
系所名稱(英文) Department of Information Management
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 108
學期 2
出版年 109
研究生(中文) 謝伯昌
研究生(英文) PO-CHANG HSIEH
學號 606630415
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2020-05-23
論文頁數 60頁
口試委員 指導教授 - 廖賀田
委員 - 魏世杰
委員 - 鄭為民
委員 - 廖賀田
關鍵字(中) JavaFX
繪圖程式庫
關鍵字(英) JavaFX
Graphic Library
第三語言關鍵字
學科別分類
中文摘要
自電腦從二十世紀發明後,人們的生活開始逐漸趨向數據化,對電腦的依賴度也呈等比成長。自早期的文字介面,慢慢轉為現在的圖形介面,隨之各種美觀的應用程式陸續開發、出現,各種程式開發語言也發展出自己的圖形介面工具。其中Java語言為世界最多人使用的物件導向程式設計語言之一,其中也提供了視窗程式的開發工具,在歷經AWT、Swing後,來到現在的JavaFX。
JavaFX提供了不少視窗程式開發的方法,其中含有3D繪圖的支援與開發,這是在AWT和Swing所沒有的。
本論文逐步將JavaFX 3D繪圖整合進本實驗室的函式庫TwFC內,並建立一套含Swing、OpenGL和JavaFX的繪圖函式庫。為了讓使用者在撰寫程式時可以獨立於底層的繪圖程式庫,我們先新增一個package來存放自製的類別,自製類別內轉接JavaFX原始碼。接著依次整合三維物件、面板、滑鼠事件和鍵盤事件,將自製的類別整合入TwFC內。論文中演示了TwFC與JavaFX整合後的範例。
英文摘要
Since the invention of the computer in the twentieth century, people's lives have gradually become digital, and their dependence on computers has also grown in proportion. Since the early text interface, it slowly turned into the current graphical interface, and various beautiful applications have been developed and emerged, and various programming languages have also developed their own graphical interface tools. Among them, the Java language is one of the most object-oriented programming languages used by people in the world. It also provides development tools for window programs. After going through AWT and Swing, it comes to the current JavaFX.
JavaFX provides a lot of methods for window program development, including the support and development of 3D graphics, which is not available in AWT and Swing.
In this paper, JavaFX 3D drawing is gradually integrated into the laboratory's library TwFC, and a set of drawing libraries containing Swing, OpenGL and JavaFX is established. In order to allow users to write programs independently of the underlying drawing library, we first add a package to store the self-made category, and transfer the JavaFX source code in the self-made category. Then integrate 3D objects, panels, mouse events and keyboard events in sequence, and integrate the self-made categories into TwFC. The paper demonstrates the example of the integration of TwFC and JavaFX.
第三語言摘要
論文目次
目錄
 第一章 緒論	1
1.1	研究動機	1
1.2	論文概觀	2
 第二章 文獻探討	3
2.1	3D繪圖	3
2.2	Java GUI發展	3
2.2.1	AWT發展	3
2.2.2	Swing發展	4
2.2.3	JavaFX發展	4
2.3	JavaFX介紹	5
2.3.1	JavaFX程式建造	6
2.3.2	JavaFX架構	9
2.3.3	JavaFX生命週期	10
2.3.4	JavaFX事件	11
2.3.5	JavaFX 3D繪圖	12
 第三章 TwFC函式庫	29
3.1	TwFC架構	29
3.2	函式庫型別	30
3.3	3D座標系	30
3.4	3D世界	30
3.5	3D物件	31
3.6	3D攝影機	32
3.7	3D面板	34
3.8	3D事件	35
3.9	座標系轉換	36
 第四章 整合函式庫	39
4.1	自製函式庫	39
4.2	物件整合	42
4.3	面板整合	43
4.4	事件整合	45
4.4.1	滑鼠事件	47
4.4.2	鍵盤事件	50
4.5	結果範例	53
 第五章 結論	57
參考文獻	58

圖目錄
==========================================
圖 2 1:JavaFX與Swing比較	5
圖 2 2:JavaFX與HTML、JavaScript比較	6
圖 2 3:初始視窗	6
圖 2 4:Launch的兩種寫法	7
圖 2 5:JavaFX實際程式碼範例	8
圖 2 6:實際演示結果	8
圖 2 7:JavaFX結構	9
圖 2 8:場景圖	10
圖 2 9:Handler向下找目標	11
圖 2 10:Handler回傳獲取Node	12
圖 2 11:3D支援程式碼	12
圖 2 12:支援3D繪圖	13
圖 2 13:不支援3D繪圖	13
圖 2 14:不支援3D警告訊息	14
圖 2 15:Scene建構子	14
圖 2 16:JavaFX相機繼承圖	15
圖 2 17:透視投影示意圖	15
圖 2 18:平行投影示意圖	16
圖 2 19:截面示意圖(圖源自Sharan, “Learn JavaFX 8”, 2015)	17
圖 2 20:視角示意圖(圖源自Sharan, “Learn JavaFX 8”, 2015)	17
圖 2 21:平行投影實際演示	18
圖 2 22:透視投影實際演示	18
圖 2 23:SubScene建構子	19
圖 2 24:JavaFX 光源繼承圖	19
圖 2 25:環境光源實際演示	20
圖 2 26:點光源實際演示	20
圖 2 27:JavaFX 3D繪圖繼承圖	21
圖 2 28:JavaFX 3D Shape原生範例	22
圖 2 29:頂點位置	22
圖 2 30:自製色碼表	23
圖 2 31:顏色陣列抓取	23
圖 2 32:面的製作	24
圖 2 33:正反面判斷	25
圖 2 34:DrawMode.FILL實際演示	25
圖 2 35:DrawMode.LINE實際演示	26
圖 2 36:CullFace.BACK實際演示	27
圖 2 37:CullFace.FRONT實際演示	27
圖 2 38:CullFace.NONE實際演示	28
圖 3 1:3D座標系比較	30
圖 3 2:攝影機繼承圖	33
圖 3 3:Panel繼承圖之一	34
圖 3 4:Gs3DPanel滑鼠壓下事件	35
圖 3 5:HostView3D滑鼠壓下事件	36
圖 3 6:Obj3DManager滑鼠壓下事件	36
圖 3 7:Obj3D滑鼠壓下事件	36
圖 3 8:Embedding Projector截圖	37
圖 3 9:TwFC截圖	38
圖 4 1:自製SceneNode部分程式碼	39
圖 4 2:SceneShape3D繼承圖	40
圖 4 3:面的切割	41
圖 4 4:面的陣列部分程式碼	42
圖 4 5:getFXImage範例程式碼	42
圖 4 6:objSrc範例程式碼	43
圖 4 7:Panel繼承圖之二	43
圖 4 8:Gf3DPanel座標轉換部分程式碼	44
圖 4 9:Gs3DPanel實際演示	45
圖 4 10:Gf3DPanel實際演示	45
圖 4 11:WInputEventI實作圖	46
圖 4 12:WMouseEventI繼承圖	47
圖 4 13:WInputEventI滑鼠系列繼承圖	48
圖 4 14:Gs3DPanel滑鼠壓下事件修正後	49
圖 4 15:Gf3DPanel滑鼠壓下事件	49
圖 4 16:WInputEventI鍵盤事件繼承圖	50
圖 4 17:Swing key code陣列	51
圖 4 18:JavaFX key code陣列	52
圖 4 19:Key code轉換	52
圖 4 20:WKeyCode部分程式碼	53
圖 4 21:範例說明(start)	54
圖 4 22:範例說明(viewInit_FX)	54
圖 4 23:範例說明(TwoViewHBox)	55
圖 4 24:範例說明(dispatchKeyPressed)	55
圖 4 25:範例說明(JavaFX成果)	56
圖 4 26:範例說明(Swing成果)	56


表目錄
==========================================
表 3 1:World3D部分方法介紹	31
表 3 2:Obj3D部分方法介紹	31
表 3 3:View3D部分方法介紹	33
表 3 4:G_3dPanelI部分方法介紹	34
表 4 1:WInputEventI部分方法介紹	46
參考文獻
1.華人百科, java awt, https://www.itsfun.com.tw/AWT/wiki-4501717-9568496, 檢索日期: 2020年1月29日
2.Wiki, Graphical User Interface, https://zh.wikipedia.org/wiki/%E5%9B%BE%E5%BD%A2%E7%94%A8%E6%88%B7%E7%95%8C%E9%9D%A2, 檢索日期: 2020年1月29日
3.Wiki, java swing, https://zh.wikipedia.org/wiki/Swing_(Java), 檢索日期: 2020年1月29日
4.黃嘉輝(2014), “JavaFX 8技術手冊”, 出版: 碁峰資訊
5.Kishori Sharan(2015), “Learn JavaFX 8, Building User Experience and Interfaces with Java 8”, Location: Apress
6.Wiki, javafx, https://en.wikipedia.org/wiki/JavaFX, 檢索日期: 2020年4月17日
7.Wiki, 3D graphic, https://en.wikipedia.org/wiki/3D_computer_graphics, 檢索日期: 2020年3月25日
8.江國豪, “支援物件導向技術的繪圖程式庫”, 碩士論文, 淡江大學資訊管理研究所, 2012年
9.林錦坤, “支援遠端介面的繪圖程式庫”, 碩士論文, 淡江大學資訊管理研究所, 2017年
10.楊迪文, “魔術方塊模擬器的設計與製作”, 碩士論文, 淡江大學資訊管理研究所, 2018年
11.Gluon(2018), Gluon and JavaFX. https://gluonhq.com/gluon-and-javafx/.檢索日期: 2020年4月17日
12.Paul Krill(2018). Removed from JDK 11, JavaFX 11 arrives as a standalone module. https://www.infoworld.com/article/3305073/removed-from-jdk-11-javafx-11-arrives-as-a-standalone-module.html.檢索日期: 2020年4月17日
13.Björn Müller, March 2013. Why, Where, and How JavaFX Makes Sense. https://www.oracle.com/technical-resources/articles/java/casa.html. 檢索日期: 2020年4月10日
14.Beyond Java. Which Is the Hottest UI Framework in the Java World: JSF or JavaFX?(May 2013). 檢索日期: 2020年4月10日
15.Reddit, javafx market share, https://www.reddit.com/r/java/comments/5hcunn/is_javafx_not_really_dead/.檢索日期: 2020年4月19日
16.Wiki, Google Trends, https://zh.wikipedia.org/wiki/Google%E6%90%9C%E5%B0%8B%E8%B6%A8%E5%8B%A2, 檢索日期: 2020年4月19日
17.Wiki, 函式庫, https://zh.wikipedia.org/wiki/%E5%87%BD%E5%BC%8F%E5%BA%AB, 檢索日期: 2020年4月10日
18.Fabrizio Lamberti, Gianluca Paravati, Paolo Montuschi(2017). EA-GLES: An Energy-Aware 3D Graphics Library for Mobile Devices. 2017 IEEE International Conference on AI & Mobile Services (AIMS). Honolulu, HI, USA. https://ieeexplore.ieee.org/abstract/document/8027280/authors#authors
19.Wiki, openGL ES, https://zh.wikipedia.org/wiki/OpenGL_ES, 檢索日期: 2020年4月18日
20.Hu, Yuanming. (2018). Taichi: An Open-Source Computer Graphics Library. https://arxiv.org/abs/1804.09293
21.Wiki, python, https://en.wikipedia.org/wiki/Python_(programming_language), 檢索日期: 2020年1月29日
22.Wiki, opengl, https://zh.wikipedia.org/wiki/OpenGL, 檢索日期: 2020年1月29日
23.每日頭條. Embedding Projector. https://kknews.cc/zh-tw/tech/qe589or.html. 檢索日期: 2020年5月27日
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文立即公開
校外
同意授權
校外電子論文立即公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信