Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age...
Transcript of Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age...
![Page 1: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/1.jpg)
Introduction to Eclipse, SWT and JFace
![Page 2: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/2.jpg)
Overview1.Eclipse
1. Short History2. Coding Environment3. Plug-Ins and Features
2.SWT1. About SWT2. Examples3. SWT Widget Tree
3.JFace1. About JFace2. Example -> Table
2
![Page 3: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/3.jpg)
Eclipse – Short History
●Developed from IBM Visual Age for Java 4.0●Open Source since 7. Nov 2001●Eclipse Foundation started 2. Feb 2004●RPC (OSGi conform) since Version 3.0●Eclipse 3.3 released 25.06.07
3
![Page 4: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/4.jpg)
Eclipse – Coding Environment
●Workspaces●Views●Perspectives●Editor
4
![Page 5: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/5.jpg)
Plug-Ins and Features
●Easy Updating with integrated UpdateManager●Many different Plug-Ins for various purposes (UI Editing, UML Modelling, SVN ...)
5
![Page 6: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/6.jpg)
Subclipse as Example Plug-In
●Often Used:
●Commit and●Update●Show in Resource History●Mark as Resolved
6
![Page 7: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/7.jpg)
SWT - About SWT
●Standard Widget Toolkit (2001)●Library of graphical objects in Java●Uses native OS GUI elements●Resources limited by OS, not Java VM
7
![Page 8: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/8.jpg)
SWT – Examples
8
● Look & Feel of running operation system
● 16 Architectures Supported
![Page 9: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/9.jpg)
SWT Examples
1 import org.eclipse.swt.*;2 import org.eclipse.swt.graphics.*;3 import org.eclipse.swt.widgets.*;4 public class HelloWorld {5 public static void main(String[] args){6 Display display = new Display();7 Shell shell = new Shell(display);8 shell.setText("Hello World");9 shell.setSize(200,100);10 shell.open ();11 while (!shell.isDisposed()) {12 if (!display.readAndDispatch())13 display.sleep ();14 }15 display.dispose();16 }17 }
9
Results in:
![Page 10: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/10.jpg)
SWT Widget Tree
10
●Window Management with ●Layouts (GridLayout e.g.)
![Page 11: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/11.jpg)
About JFace
●JFace extends SWT with MVC approach
●JFace does not hide SWT●Helps with standard tasks like dialogs, viewers, wizards etc
11
![Page 12: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/12.jpg)
JFace Example -> Table
Seperated in:
●SWT | Table●Jface | TableViewer (=View)●Jface | ContentProvider (=Model)●Jface | SelectionListener (=Control)
12
![Page 13: Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age for Java 4.0 Open Source since 7. Nov 2001 Eclipse Foundation started 2. Feb 2004](https://reader034.fdocuments.net/reader034/viewer/2022042303/5ecee6a59648e02c7b7f9b83/html5/thumbnails/13.jpg)
Introduction to Eclipse, SWT and JFace
Questions?
13