Eclipse Plug-in Development

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Start menu -> all program -> Microsoft Visual SourceSafe-> Microsoft Visual Studio 2010 Click.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
FrontPage Express By John G. Summerville Ph.D.©, RN.
Structured Problem Solving Object- Oriented Concepts 1.
By Janet Holland & Barbara Higgins-Dover Adobe Photoshop Blended Image Tutorial.
© by Pearson Education, Inc. All Rights Reserved. continued …
Migrating to GUI Conference Migrating to GUI How do you get there from here?
Art 128 Interface Programming 1 In-class Presentation Week 11B.
TITLE: Template for a 84.1 cm wide x cm tall poster (A0)
1 Standard Widget Toolkit. 2 SWT l a widget toolkit for Java developers l provides a portable API and tight integration with the underlying native OS.
Master Slide. Why Create a Master Slide Allows you to create slide layouts EXACTLY how you want it Keep things consistent from one slide to the next Save.
HTML Code. What we will cover Basic HTML Body Font Images Hyperlinks Tables Frames.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
MS-Access XP Lesson 5. Creating a Query with Expression Builder Eg. Consider the following table. Table Name: Overtime Fields & Data types: Emp No (Number),
Designing a Classroom Web Site Using NVU Beginning Level.
Web Design HTML, Frontpage, DreamWeaver μέρος β ΠΡΥ019 - Πληροφορική Δρ.Βάσος Βασιλείου.
JFace 吳昆澤. UI framework for plug-ins JFace provides classes for handling common UI programming tasks: Viewers handle the drudgery of populating, sorting,
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Word Tips. Objectives Open and close MS Word Learn the parts of the Word window Learn the toolbar, their buttons, and what they do Create and save a new.
1 Basic HTML. 2 Part 1: Basic Web Page Production.
Basic HTML Workshop By: Preeda Chunjongkolkul (Pete) Systems Librarian/Webmaster
Creating Web Pages with Links, Images, and Formatted Text Information Presented by S. Cox.
CPG 4331 Class Agenda Word  Getting Started  Editing Documents  Changing Views in Documents  Format Text / Format Documents  Work With Tables  Work.
INTEGRATION TO GENERATE MOTIVATION TO LEARN INTEGRATION TO FOSTER CREATIVITY.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Using . Creating and Sending Messages The Inbox view serves as Outlook’s interface Click the Inbox icon in the Outlook Bar or Folder List.
TUTORIAL 5 INSTRUCTOR: HANIF ULLAH ID: OFFICE #: 2029 DATE: 18/11/2012 Introduction to MS Project 2007.
 Use the think diagram … ISP Server.
Georgia Institute of Technology Making Text for the Web Barb Ericson Georgia Institute of Technology March 2006.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. Chapter 9 GUI Programming Using Tkinter 1.
Adobe Photoshop Blended Image Tutorial Adobe Photoshop Tools Toolbar Tools Palette Windows Menu.
CA095. Open WriterofConcord1.docx from your flash drive. Scroll down to References.
Event Driven, GUI Avshalom Elmalech Eliahu Khalastchi 2010.
Double click here to add event title Double click here to add event date Double click here to add event time Double click here to add event location.
Study Guide Test 1 Microsoft Word 8 th grade. Font The type of letters in which a document is printed. A font consists of the typeface, style, size, and.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Motion Graphics & Animation.
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
GAME:IT Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a simple.
1 HTML. 2 Full forms WWW – world Wide Web HTTP – Hyper Text Transfer Protocol HTML – Hyper Text Markup Language.
PowerPoint Example. How to Insert new slides –Go to Insert new slide and select 2 column text Bulleted list Table Text and chart Organizational chart.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
1 R3 R1 R5 R4 R6 R2 B B A A Looking at the Code Under the View menu Select Source.
Hamilton Software Products The Measure of Excellence Customized dialog.
Create a new stylesheet called Hotel Style
With Microsoft FrontPage 2000
PHP Image Manipulation
Sect. 9-5 continued Absolute convergence and conditional convergence
Layout - you need to understand that a simple navigation bar:
Eclipse Plug-in Development
Chapter 2 – Introduction to the Visual Studio .NET IDE
AWT Components and Containers
OPTIONAL LOGO HERE Professional Template for a 36 inch high x 48 inch wide Poster Presentation Your name and the names of the people who have contributed.
This is the blank slide default for this design.
Eclipse Plug-in Development
Eclipse Plug-in Development
Eclipse Plug-in Development
Nebula Grid Tom Schindl - BestSolution.at / Platform UI
Blended Image Tutorial
How to Start This PowerPoint® Tutorial
Eclipse Plug-in Development
Common Barriers to Accessibility on the Web
PAPER TITLE (Template for ICETMIE Abstract )
Literary template Add your words Here,according To your need to draw the text box size. Reporting Person:
Graphical User Interface
Use this slide to present information in bullet form.
Presentation transcript:

Eclipse Plug-in Development SWT/JFace Development Part 2 Composites and Resource Management 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Contents Introducing the Composite class Containers Canvas TabFolder and CTabFolder Shell Group Table and Tree Resource Management Color Font Image 11/12/2018 Soyatec (http://www.soyatec.com)

Introducing the Composite class Container Scrollable SWT.V_SCROLL SWT.H_SCROLL Styles SWT.NO_RADIO_GROUP SWT.EMBEDDED SWT.CENTER TabList Background Mode SWT.INHERIT_NONE SWT.INHERIT_DEFAULT SWT.INHERIT_FORCE 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Canvas PaintListener PaintEvent Styles SWT.NO_BACKGROUND SWT.NO_REDRAW_RESIZE SWT.NO_MERGE_PAINTS 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Canvas Graphics Canvas canvas = new Canvas(shell, SWT.BORDER); canvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { GC gc = e.gc; gc.setBackground(display.getSystemColor(SWT.COLOR_BLUE)); gc.fillRectangle(1, 1, 50, 50); gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN)); gc.setForeground(display.getSystemColor(SWT.COLOR_RED)); gc.drawText("Text: Foxes vs. Dogs", 85, 25); gc.setForeground(display.getSystemColor(SWT.COLOR_YELLOW)); gc.drawOval(150, 100, 50, 50); } }); 11/12/2018 Soyatec (http://www.soyatec.com)

TabFolder and CTabFolder SWT.TOP SWT.BOTTOM TabItem TabFolder folder = new TabFolder(shell, SWT.TOP); for (int i = 0; i < 3; i++) { TabItem item = new TabItem(folder, SWT.NONE); item.setText("item " + i); Label label = new Label(folder, SWT.NONE); label.setText("Add control here."); item.setControl(label); } folder.setSelection(1); 11/12/2018 Soyatec (http://www.soyatec.com)

TabFolder and CTabFolder Styles SWT.TOP SWT.BOTTOM SWT.FLAT SWT.SINGLE SWT.MULTI SWT.BORDER Simple Top Right Control CTabItem SWT.CLOSE 11/12/2018 Soyatec (http://www.soyatec.com)

TabFolder and CTabFolder 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Shell Styles SWT.NO_TRIM SWT.CLOSE SWT.TITLE SWT.MIN SWT.MAX SWT.BORDER SWT.RESIZE SWT.ON_TOP SWT.TOOL SWT.SHEET SWT.SEHLL_TRIM SWT.DIALOG_TRIM 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Group Group Group group = new Group(shell, SWT.NONE); group.setText("Foxes vs. Dogs"); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Initialize SWT.NONE SWT.CHECK // Table with default style Table table1 = new Table(shell, SWT.BORDER); table1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); // Table with SWT.CHECK style Table table2 = new Table(shell, SWT.CHECK | SWT.BORDER); table2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Add TableItems // Table with default style // Add 5 table items. for (int i = 0; i < 5; i++) { TableItem item = new TableItem(table1, SWT.CENTER); item.setText("default-item " + i); } // Table with SWT.CHECK style TableItem item = new TableItem(table2, SWT.CENTER); item.setText("check-item " + i); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Add TableColumns // Table with default style // Add table column TableColumn nameColumn = new TableColumn(table1, SWT.CENTER); nameColumn.setText("Name"); // Table with SWT.CHECK style TableColumn optionColumn = new TableColumn(table2, SWT.CENTER); optionColumn.setText("Option"); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Add TableColumns // Table with default style // Add table column TableColumn nameColumn = new TableColumn(table1, SWT.CENTER); nameColumn.setText("Name"); nameColumn.setWidth(100); // Table with SWT.CHECK style TableColumn optionColumn = new TableColumn(table2, SWT.CENTER); optionColumn.setText("Option"); optionColumn.setWidth(120); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Set header visible // Table with default style // Make herder visible table1.setHeaderVisible(true); // Table with SWT.CHECK style table2.setHeaderVisible(true); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table SWT.VIRTUAL final Table table = new Table(parent, SWT.VIRTUAL | SWT.BORDER); table.setItemCount(1000000); table.addListener(SWT.SetData, new Listener() { public void handleEvent(Event event) { TableItem item = (TableItem) event.item; int index = table.indexOf(item); item.setText("Item " + index); System.out.println(item.getText()); } }); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table Listener Selection SWT.CHECK == event.detail DefaultSelection Double Clicked MesaureItem EraseItem PaintItem 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Table 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Tree 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Tree Expand & Collapse TreeListener treeExpand treeCollapsed 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Resource Management Managing operating system resources in SWT Dsiplay allocate and dispose Color and RGB Font and FontData Image from path or stream ResourceManager in JFace ImageDescriptor FontDescriptor ColorDescriptor 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Resource Management Color Standard color Color with RGB ColorDescriptor 1. Display.getSystemColor(int); //SWT.COLOR_* 2. RGB rgb = new RGB(red, green, blue); Color color = new Color(display, rgb); 3. ColorDescriptor.createFrom(Color); ColorDescriptor.createFrom(RGB); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Resource Management Font Standard font Font with FontData FontDescriptor 1. Display.getSystemFont() 2. FontData fd = new FontData(name, height, style); //style: NORMAL, BOLD, ITALIC Font font = new Font(display, fd); 3. FontDescriptor.createFrom(Font); FontDescriptor.createFrom(FontData); FontDescriptor.createFrom(FontData[]); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Resource Management Image Standard image Image from path Image from input stream ImageDescriptor ImageData 1. Display.getSystemImage(int); // SWT.ICON_*; 2. Image image = new Image(device, fileName); // absolute path of image. 3. InputStream inputStream = class.getResourceAsStream(name); Image image = new Image(device, inputStream); 4. ImageDescriptor.createFromFile(Class, fileName); ImageDescriptor.createFromImage(Image); ImageDescriptor.createFromURL(URL); 5. ImageData imageData = new ImageData(“fileName”); Image image = new Image(device, imageData); 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) Resource Management Draw Image with GC Shell shell = new Shell(display); Image image = new Image(display, 300, 200); GC gc = new GC(image); gc.setBackground(display.getSystemColor(SWT.COLOR_CYAN)); gc.setForeground(display.getSystemColor(SWT.COLOR_RED)); gc.drawRectangle(44, 28, 200, 100); gc.fillRectangle(45, 29, 199, 99); gc.drawString("Hello SWT", 120, 68); gc.dispose(); shell.setBackgroundImage(image); 11/12/2018 Soyatec (http://www.soyatec.com)

Skype: jin.liu.soyatec Email: jin.liu@soyatec.com Any Questions? Skype: jin.liu.soyatec Email: jin.liu@soyatec.com 11/12/2018 Soyatec (http://www.soyatec.com)

Soyatec (http://www.soyatec.com) The end 11/12/2018 Soyatec (http://www.soyatec.com)