+ All Categories
Home > Documents > Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age...

Introduction to Eclipse, SWT and JFace · Eclipse – Short History Developed from IBM Visual Age...

Date post: 25-May-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
13
Introduction to Eclipse, SWT and JFace
Transcript
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

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

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

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

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

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

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

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

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

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

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

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

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

Introduction to Eclipse, SWT and JFace

Questions?

13


Recommended