Introducing the Eclipse Visual Editor David Gallardo.

Slides:



Advertisements
Similar presentations
G5BUID - Java Swing Laying out components Manage realized components Determine size and position Each container has a layout manager (usually)
Advertisements

Introduction to Java 2 Programming
Java Graphical User Interface (GUI) using Visual Editor in eclipse CSI 1390 – Java Programming Instructor: Saeid Nourian University.
Graphic User Interfaces Layout Managers Event Handling.
CMSC 341 Building Java GUIs. 09/26/2007 CMSC 341 GUI 2 Why Java GUI Development? Course is about Data Structures, not GUIs. We are giving you the opportunity.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Automating Tasks With Macros
With Microsoft® Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Java Swing Toolkit Graphics The key to effectively using graphics in Java is understanding: –the basic components of the graphics library –the patterns.
Understanding SWING Architecture CS 4170 UI Design Hrvoje Benko Oct. 9, 2001.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Contructing GUI’s in Java Implemented in the Swing API Imported into your programs by: import javax.swing.*; Most Swing programs also need the AWT packages.
Pasewark & Pasewark 1 Access Lesson 4 Creating and Modifying Forms Microsoft Office 2007: Introductory.
Copyright © Soyatec. Licensed under the Eclipse Public License 1.0 Yves YANG & Philippe Ombredanne.
Access Tutorial 10 Automating Tasks with Macros
Tutorial 6 Using Form Tools and Creating Custom Forms
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Using the Netbeans GUI Builder. The Netbeans IDE provides a utility called the GUI Builder that assists you with creating Windows applications. The Netbeans.
Applets and Frames CS 21a: Introduction to Computing I First Semester,
Learning objectives By the end of this lecture you should be able to:  have a well-earned rest! Ch 24 Beyond the second semester.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
1CS 338: Graphical User Interfaces. Dario Salvucci, Drexel University. Lecture 10: Windows & Layout.
Java GUIs and Graphics CNS Outline  Introduction  Events  Components  Layout managers  Drawing  Introduction  Events  Components  Layout.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Selected Topics in Software Engineering - Distributed Software Development.
GUI development in Java L. Grewe Two methodologies for things to appear on the screen 1. By painting / drawing e.g. drawing an Image e.g. drawing an.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Laying Out Components Interior Design for GUIs. Nov 042 What is Widget Layout? Positioning widgets in their container (typically a JPanel or a JFrame’s.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Layout Manager Summary
Applets and Frames. Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L14: GUI Slide 2 Applets Usually.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
3461 Laying Out Components Interior Design for GUIs.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Ajmer Singh PGT(IP) JAVA IDE Programming - I. Ajmer Singh PGT(IP) GUI (Graphical User Interface) It is an interface that uses a graphic entities along.
Developing GUIs With the Eclipse Visual Editor, SWT Edition David Gallardo.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
Event Handler Methods Text field Object Responder JAVA AWT Environment: Messages are sent between JAVA Objects Screen Event Notification Press Button.
User Interface Components. Layout Placement of UI components in a window – Size & Position Each component occupies a rectangular region in the window.
Developing GUIs With the Eclipse Visual Editor, Swing/AWT Edition David Gallardo.
Applets. 9/04/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L12: Applets Slide 2 Applets Usually.
Introduction to GUI in 1 Graphical User Interface 3 Nouf Almunyif.
Lesson 3: Working with Forms. Learning Objectives After studying this lesson, you will be able to: Identify form design elements Create and print forms.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
Introduction to Swing Mr. Crone. What is Swing? a collection of pre-made Java classes used to create a modern graphical user interface.
Java GUI.
Chapter 8: Writing Graphical User Interfaces
Java Swing.
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Containers and Components
Panels & Layout Managers
Steps to Creating a GUI Interface
Layout Organization and Management
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

Introducing the Eclipse Visual Editor David Gallardo

What’s a GUI builder good for? Coding graphical user interfaces is tedious and requires verbose code Visualizing the effects of code and code changes isn’t intuitive for most people The flexible, powerful layouts that give professional results can be especially difficult to program A GUI builder lets you use graphical design tools in a WYSIWYG environment to design the GUI and generates code for you

Introducing the Eclipse Visual Editor IBM eventually relented and contributed their Visual Editor in Fall 2003 Initial version, 0.5, was Swing/AWT only Version 1.0, released Fall 2004, introduced limited SWT support Version 1.1, released July 2005, adds more SWT support and support for RCP views

Installing VE VE is an independent component that plugs into Eclipse JDT Install using Eclipse Update feature. This will install VE and the following dependencies: –Graphical Editing Framework (GEF) –Eclipse Modeling Framework (EMF) Versions of Eclipse, VE, GEF and EMF must be compatible—Update will make sure that dependency requirements are met

Principal VE features Wizard for creating Visual Classes—classes that extend Swing/AWT components Visual editor with palette of components and containers and two views in usual editor location: –Design view –Source view Java Beans View Properties View Indicator and tool buttons for controlling synchronization between views

Working with components Drag and drop from palette to design view or Java Beans view Adjust size or position in design view (if layout manager permits) Modify properties in Properties View Add event handlers in design view or Java Beans view Modify source directly By default, changes in one view will be reflected automatically in the rest Synchronization can be turned off or on with toolbutton; indicator appears in status bar

Working with layouts If you create a Swing frame, then add a label to it, it’ll fill the frame completely, and you’ll be unable to move or re-size The default layout manager for a Swing frame is BorderLayout. Sizes and location of components are governed by a strict policy. To change, select the content pane in design view or Java Beans view, then change layout manager in Properties view Null layout, for example, lets you modify components’ sizes and placement arbitrarily

VE supported Swing/AWT layouts VE supports the following layouts: Null layout BorderLayout BoxLayout CardLayout FlowLayout GridBagLayout GridLayout SpringLayout is not supported

VE supported SWT layouts VE allows the following layouts: Null Layout FillLayout GridLayout RowLayout …but offers no support for FormLayout

VE layout customizers Different sets of tools tailored for each type of layout –Layout tools –Components In Swing, most complete support for null layout –Display grid –Tools for aligning components, matching size, spacing evenly In SWT, most complete its GridLayout Layout conversion –Useful in SwingBest support converting from null layout to Swing GridBagLayout—which is very useful, since GridBagLayout is difficult to work with

Adding listeners To make a GUI work, you need to add listeners to wire components together Listeners can be added by right-clicking on a components in design view or Java Beans view and selecting Events-> Handlers specific to a components can be selected directly Other events can be selected by selecting Add Events… Dialog box will show applicable listeners and adapters

Demo Swing null layout, convert to GridBagLayout Add listener SWT GridBagLayout Add listener For related article see: