Note: Matisse4MyEclipse features are deprecated begining with MyEclipse 10.0. For Swing functions, it is recommended you use SWT/Swing Designer, which is compatible with your existing work files.
MyEclipse Visual Swing Designer is an implementation of NetBeans Matisse that integrates its functionality into MyEclipse to enable the rapid development of Java Swing rich client applications (RCP) within the MyEclipse environment. Developed in partnership with Sun’s NetBeans project, MyEclipse Visual Swing Designer offers full control and round trip development between RAD visual design tools and underlying Java source code. It consists of a form designer with a source mode, an extensible palette of Swing and AWT controls with drag-and-drop placement support, advanced alignment guides and sizing tools, as well as property and outline views.
MyEclipse Visual Swing Designer includes:
- Swing/Matisse workbench perspective
- Form Editor with visual Design and Source modes
- Extensible palette of Swing and AWT controls
- Form creation and project library configuration wizard
- Properties view
- Outline view
- Preferences for operation customization
- Numerous UI control and event configuration wizards.
The design process involves drag-and-drop placement of Swing and AWT components from the UI controls palette onto a visual form. The Form editor provides advanced alignment guides and sizing tools to enable quick development of aesthetically pleasing user interfaces in minutes. The source mode of the Form editor is an embedded version of the Eclipse Java editor and allows quick viewing and modification of generated and supporting Java code.
- A Matisse form consists of an XML form description file and a corresponding Java source file, e.g., Contact.form & Contact.java
- As the Matisse form is visually edited, the corresponding Java source file is updated in real-time to produce the content and layout of the form.
- Generated Java source methods and fields are delineated with special Java comments that begin and end with a one-line comment including the substring //GEN-.., e.g., //GEN-BEGIN or //GEN-END. Avoid editing between these special comments; otherwise there is the potential that the Form Editor could overwrite these code sections during a visual editing session.
- Where possible, Matisse4MyEclipse attempts to accurately replicate all the NetBeans Swing GUI Designer functions. In some areas, this is not possible due to Eclipse user-interface and interaction conventions, integration dependencies or technology limitations. See Differences Between Matisse4MyEclipse and NetBeans 5.0 Swing GUI Designer for more information.
The Swing/Matisse perspective presents an organization of the primary Matisse views and the Form editor in a workbench layout very similar to the NetBeans 5.0 user-interface organization. The intent of this perspective is to quickly introduce new Matisse4MyEclipse users to the primary Matisse views and editors and to provide NetBeans users with a familiar layout.
By default, the Swing/Matisse perspective opens when you create a Matisse form. If the Swing/Matisse perspective is not open, you can open it by selecting Window>Open Perspective>Other, and selecting MyEclipse Swing/Matisse.
Selecting a perspective
The workbench displays the Swing/Matisse perspective’s predefined views, toolbar, and menu actions. You can customize the perspective by adding/removing views and action sets, and repositioning and resizing any view.
Working with Matisse4MyEclipse begins with creating a new Matisse Form as part of your project.
MyEclipse supports many different kinds of Swing-based forms that you can add to your project, including:
- MDI Application (A form for a JDesktopPane-based MDI application)
- and more…
When you create the new form, MyEclipse prompts you to open the Swing/Matisse perspective where can design your form in the visual editor. The focus of the Matisse4MyEclipse tools is to help you work quickly and efficiently by providing tools that allow you to visually edit your forms while also allowing you to dig deep into the code and tweak behaviors you want to customize.
Some of the tools available for designing your forms are:
Form Designer – At the center of the screen, you have the visual representation of the form you are designing, and the components on that form can be dragged and dropped or organized in any fashion you want.
Form Outline – This displays the hierarchy of the visual components in your form (for example, which panels contain which components, etc.)Matisse Palette – This palette includes the components for designing your form. It can also contain custom components.
Properties – This displays the properties, events, and code generation settings for each component in your form for you to tweak or fine-tune as you want.
Source/Design – The tabs at the bottom of the Form Designer allow you to easily switch between the Source and Design views of your form, allowing you to work in the view you prefer.
Quick Preview – This preview mode pops up an emulated version of your running form for you so you can get an idea of how it will look at runtime without needing to run the entire application.
Matisse4MyEclipse also supports the use of Custom Swing Components in the Matisse palette. You can add new components by opening the palette’s management tools.
Select the type of component you’d like to add.
Now, you have access to your custom components from the Matisse palette. They can be dropped into any form you are working on or you can edit properties using the advanced form design tools.
This section highlights some of the most notable differences between Matisse4MyEclipse and the NetBeans 5.0 Swing Designer. To remain consistent with other MyEclipse visual design tools, Matisse4MyEclipse uses a slightly different interaction model than NetBeans for adding a UI control from the Matisse palette to a form.
The Matisse4MyEclipse process is:
- Pickup UI control in Matisse Palette (mouse click)
- Move cursor over Matisse form
- Drop UI control (mouse click)
NetBeans process is:
- Select UI control in Matisse Palette (mouse down)
- Move cursor over Matisse form
- Drop UI control (mouse up)
The Source mode of the Form editor is an implementation of the Eclipse Java editor. This modification enables the Form editor to work more naturally with other Eclipse Java source management features.Matisse4MyEclipse does not guard against the opening of the backing Java source file of a Matisse form into the Eclipse Java Source editor. In general, this practice should be avoided in favor of using the Matisse Form editor.