Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

The Menu Bar in Visual Composition

The following menus provide options unique to the Visual Composition Editor:

Bean

The Bean menu provides options to perform the following tasks:


Save Bean Saves the current bean and generates and compiles its code.
Re-generate Code Generates and compiles the code for the current bean.
Run--In Applet Viewer Saves the current bean, generates and compiles its code, and runs the bean in an applet viewer.
Run--Run main Saves the current bean, generates and compiles its code, and runs the bean in a test frame.
Run--Set Class Path Modifies the path for the current class. VisualAge adds the path for each dropped bean. However, if you are using other files, such as .gif files, be sure to add their location to the path.
Modify Palette Manipulates categories and beans in the beans palette.
Fix Unresolved References Changes the class of an unknown component to one that is loaded into your workspace. Before you select this, read Resolve Class References.
Construct Visuals from Source Reverse-engineers a visual composite from Java source code. Before you select this, read Use of Visual Beans Created in Other Tools.

Tools

Select Tools to help build and manipulate your user interface. The Visual Composition Editor also provides such tools as Show connections and Hide connections that lets you change how the free-form surface looks as you build your user interface.

You can access all or some of these tools from the tool bar, which is just below the menu bar in the Visual Composition Editor, and from pop-up menus.

The alignment tools are only available when using the null layout manager.

The anchor bean, indicated by solid selection handles, is the bean that serves as the alignment reference. When you want to align beans with one another, select the ones you want to move and select the anchor bean last. You can also change the anchor bean by holding the Ctrl key and double-clicking on the new anchor bean.

Run

Select Run Run to save the bean, generate code, compile the class, and run the compiled bean in an applet window.

Properties

Select Properties Properties to display the property sheet for the bean you selected. The property sheet contains editable values for the selected bean. You can open the property sheet for a selected bean either from the Visual Composition Editor or Beans List window.

If you selected multiple beans and then Properties, a property sheet appears and displays the common properties for the selected beans. When you change a property on the property sheet, the change affects all the selected beans.

Beans List

Select Beans List Beans List to display a list of the beans and connections used in your user interface. You can perform many of the same tasks within the beans list as you would in the Visual Composition Editor. This ability is particularly important when you are working with components that are covered by other components. For example, if your base bean is a panel using a border layout, another panel used as the center component expands to fill all empty space. Performing tasks on the covered border layout panel is difficult.

Show Connections

Select Show Connections to display the connections you create between beans. This tool works on all connections only if nothing is selected. Otherwise, only the connections to and from the selected beans are affected.

The Visual Composition Editor displays all connections by default.

Hide Connections

Select Hide Connections Hide connections to conceal the connecting links between beans. If you wish to hide all connections, do not select any beans. Otherwise, select only the beans with connections you wish to hide.

If your program has numerous connections, you can reduce the visual clutter by hiding those not currently being modified.beans

Align Left

Select Align Left Align left to move the selected beans so that their left edges are aligned.

Align Center

Select Align Center Align center to move the selected beans so that their centers are aligned vertically.

Align Right

Select Align Right Align right to move the selected beans so that their right edges are aligned.

Align Top

Select Align Top Align top to move the selected beans so that their top edges are aligned.

Align Middle

Select Align Middle Align middle to move the selected beans so that their centers are aligned horizontally.

Align Bottom

Select Align Bottom Align bottom to move the selected beans so that their bottom edges are aligned.

Distribute Horizontally

Select Distribute Horizontally Distribute horizontally to move the selected beans so that they are spaced evenly between the left and right container borders.

Distribute Vertically

Select Distribute Vertically Distribute vertically to move the selected beans so that they are spaced evenly between the top and bottom of the container borders.

Match Width

Select Match Width Match width to size the selected beans to the width of the anchor bean.

Match Height

Select Match Height Match height to size the selected beans to the height of the anchor bean.


Related concepts
Property Sheets
Beans Palette
Free-Form Surface

Related procedures
Editing Bean Properties
Opening the Property Sheet for a Bean
Managing the Beans Palette
Undoing and Redoing Changes in the Visual Composition Editor

Related references
Modify Palette
Modify Palette Window
Choose Bean Window
Resolve Class References
Morph Into
The Tool Bar in Visual Composition
Keys