![]() | ![]() | ||||||||||
Designer Overview Designer (a.k.a. Couch Coder) is a visual designer and Java GUI generator. Walk through the Screen Shots to see how easily Designer works. Screen Shot Index
Properties: General Imports Attributes Methods Events Menu Bar Directories Component Properties Related Pages For the class you are creating there are a set of class properties that you can edit and a list of components. Each component also has a set of properties. When you have
specified your class properties, components, and component properties, you can generate most of the code for your Java Applet or Application.
In addition to the workspace, there are two default tool palettes; the component tools and the alignment tools. These tool palettes appear unless you uncheck the corresponding items in the View Menu.
To add a component to your workspace, click on a tool in the toolbar and then click anywhere on the grid. You can also press the left mouse button and drag the corner to add components of a specific size. You can easily resize a component by dragging one of the corner handles.
Many aspects of the Java Class you are creating or editing are specified in the Class Properties dialog, available from the File menu or by double-clicking on the grid background. Properties: General The first page, the General properties, is where you specify the class name you are creating. You also specify the superclass. You may choose a different superclass depending on whether you want to generate an Applet, Application, or Dialog. Any interface names you enter in the interfaces field will be generated with an "implements" keyword when your class is defined. You also specify your layout class here. By default, GridBag Layout is assumed, but you may specify any layout class. If you choose Other.., you must specify the layout class name. Any arguments are generated as parameters to the constructor of the layout class in the generated code.
The Attributes page lets you specify the scope for your class (whether it is public, private, or protected) and the final and abstract attributes. A class may not be both abstract and final. You may also specify a window title or background color for your class.
The Methods page lets you choose methods to include in your class. Methods come from existing classes using the Import from Source menu item on the file menu. At first you will not have many methods, but over time you can create template files with methods you commonly use and then include them in newly created classes. Your library of available methods will grow as you use Designer.
Events form the core of Java programming. Many program actions are triggered by interactions with screen components that generate events. For example, a button that is clicked by the user will generate an event that you can use to provide whatever action you wish to occur when that button is clicked. Designer supports both 1.0 and 1.1 Java events.
The Menu page allows you to specify menus and menu items for your application. Applets and Dialogs do not support menu bars.
The directories page allows you to choose a location to save your source and workspace files. Note that the file names are the same as the class name.
Every component you add to your class has properties of its own. Here is the first page of the Component Properties Dialog.
Here you specify the component name, label, and class name. The components have defaults for these values, but using the Other components, you can specify any component. The Initializer is used when the component is instantiated. If the component is not visible, it will not appear on the grid of the workspace, but you can still select and edit it using the Select menu item of the Tools menu. If the component you have chosen has other properties, the Other Properties button will be enabled.
The Advanced properties specify how your component is laid out in the parent panel or class. They are used in generating constraint objects.
|
|||||||||||
Copyright 1996-2000 © The Paradigm Exchange All rights reserved | |||||||||||