• Embed Doc
  • Readcast
  • Collections
  • 3
    CommentGo Back
Download
 
Department of Computer Science 12 - An Eclipse GUI Builder University of Manitoba
i
www.cs.umanitoba.ca/~eclipse
 
12 - An Eclipse GUI Builder
Overview:....................................................................................................................1A GUI Builder:............................................................................................................1Acquiring the Designer Plug-in:..................................................................................2Installation:..................................................................................................................2Activating the Designer:..............................................................................................3Creating a new SWT/JFace Java Project:....................................................................3Creating a new SWT Java File:...................................................................................4Parts of the Designer:..................................................................................................7Open Definition and Convert Local to Field Buttons...............................................11Handling Events with the Designer:..........................................................................11Adding an Event Listener with the SWT Designer:..................................................12Deleting an Event Listener with the SWT Designer:................................................14Using Layout Managers in the SWT Designer:........................................................14 NullLayout:...............................................................................................................15FillLayout:.................................................................................................................18RowLayout:...............................................................................................................19GridLayout:...............................................................................................................20FormLayout (Professional Version Only):................................................................22StackLayout (Professional Version Only):................................................................30BorderLayout (Professional Version Only):.............................................................31FlowLayout (Professional Version Only):................................................................33GridLayout (AWT) (Professional Version Only):....................................................34Creating Menus in the SWT Designer (Professional Version Only):.......................34Custom Widget Templates (Professional Version Only):.........................................37Widget Morphing (Professional Version Only):.......................................................38Custom Composites (Professional Version Only):...................................................38JFace Viewers (Professional Version Only):............................................................41Custom JFace Dialog Creation:.................................................................................42JFace Wizard Page Creation (Professional Version Only):......................................44JFace Application Creation (Professional Version Only):........................................46Code Generation Options:.........................................................................................50Type Specific Code Generation Options (Professional Version Only):....................52Additional Features of the Designer:.........................................................................53Creating a UI: Two Examples...................................................................................55Creating a GUI for an Address Book Application:...................................................55Creating a new Project:.............................................................................................55Creating a new SWT Application:............................................................................55Designing the GUI Window:.....................................................................................56Creating Menus:........................................................................................................61Creating Event Handlers:..........................................................................................63Creating an SWT GUI for a Client Billing Application:...........................................65Taking a Look at the Original GUI:..........................................................................66Creating Our Own ClientBillingUI:..........................................................................67Creating the Client List Group:.................................................................................68
 
Department of Computer Science 12 - An Eclipse GUI Builder University of Manitoba
ii
www.cs.umanitoba.ca/~eclipse
 Creating a Tabbed Folder:.........................................................................................69The Clients Tab:........................................................................................................69The Transactions Tab:...............................................................................................71Creating a Menu:.......................................................................................................72Running the Application:..........................................................................................73Creating a Swing GUI for the Client Billing Application:........................................73Creating the ClientBillingUI:....................................................................................73Creating the Client List JPanel:.................................................................................75Creating a JTabbedPane:...........................................................................................78The Clients Tab:........................................................................................................79The Transactions Tab:...............................................................................................81Creating a Menu:.......................................................................................................85Running the Application:..........................................................................................86Summary:..................................................................................................................86 
 
Department of Computer Science 12 - An Eclipse GUI Builder University of Manitoba 1 www.cs.umanitoba.ca/~eclipse
 
12 - An Eclipse GUI Builder
1, 2 
by Raphael Enns and Shantha Ramachandran
Department of Computer Science, University of Manitoba, Winnipeg, Manitoba, Canada
 
Last revised: May 21, 2004Overview:
In this tutorial, we describe how to use a GUI Builder plug-in for Eclipse, as well as look at its features. The GUI Builder that we will look at in this tutorial is the Designer created by Instantiations, Inc., and is available athttp://www.swt-designer.com. We will be using version 2.0.0 of the Designer in this tutorial.
A GUI Builder:
In the previous tutorials, we have seen that SWT and Eclipse are fairly simple andstraightforward to use. One of the most common questions about SWT, however, is“Where is the GUI Builder?” The answer is that there is no GUI Builder that comes withEclipse. However, because Eclipse is open source and designed for plug-ins, a GUIBuilder plug-in is able to be made and can be integrated right into Eclipse.The Designer is a plug-in that allows you design SWT and Swing GUIs in Eclipse. TheDesigner is available athttp://www.swt-designer.com. A restricted version of the plug-inis available for free download at the above website. There is also a professional version,which includes extra features, that is available for $199 USD. Look athttp://www.instantiations.com/swt-designer/comparison.htmlto see a comparison between the free and the professional versions.As of version 2.0 of the Designer, Instantiations includes both SWT and Swing support inthe Designer. The SWT part is the same as in previous versions and is called the SWTDesigner. The Swing part is called the Swing Designer and is similar to the SWTDesigner. There is also a WindowBuilder product in the Designer which is simply boththe SWT Designer and the Swing Designer.Since most of the features are the same or similar between the SWT Designer and theSwing Designer, this tutorial will mainly look at features of the SWT Designer. Todemonstrate the similarities and the differences between the SWT Designer and theSwing Designer, one of the examples at the end of this tutorial will be done in Swing.
1
This work was funded by an IBM Eclipse Innovation Grant.
2
© Raphael Enns, Shantha Ramachandran and David Scuse
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...

This is no video tutorial in the comment by exultantelectio. It's just a bunch of spam and maybe some malware stuff.

Thanks. Great tutorial mate... Here's the Video Tutorial: http://bit.ly/cXQPGN - If you prefer video like myself. Don't get me wrong, I still like ur tutorial!

You must be to leave a comment.
Submit
Characters: ...