Renaming Beans and Connections

The Visual Composition Editor assigns default names to distinguish beans and connections when you generate the code to build your program element. For example, for each bean, VisualAge generates a get method that you should use to access the bean within user methods or code. In addition to use in generated methods for beans and connections, the names for selected beans and connections appear in the information area at the bottom of the Visual Composition Editor.

The Visual Composition Editor assigns bean names based on the bean palette name or the name you specify when you use the Choose Bean tool. For example, VisualAge names the first button bean that you drop Button1, the second Button2, the third Button3, and so forth. When you select this bean, the information area at the bottom of the Visual Composition Editor displays the message Button1 selected.

The Visual Composition Editor assigns connection names based on the type of connection. For example, the first property-to-property connection is named connPtoP1, the second is connPtoP2, etc. All other connection types receive their names simlarly. For example, an event-to-code connection is named connEtoC1, an event-to-method is named connEtoM1, etc.

To assign bean or connection names that are more descriptive or meaningful to your program element, follow these steps:

  1. Move the mouse pointer over the bean or connection that you want to rename.
  2. Click mouse button 2 and the pop-up menu appears.
  3. Select Change Bean Name or Change Connection Name and the Name Change Request or Connection Name Change Request window appears.
  4. Type a new name in the entry field.
  5. Click OK. The Visual Composition Editor changes the name.

To view the changes outside the Visual Composition Editor, you must regenerate the code.

You can also rename beans in the property sheet and you can change bean or connection names from the pop-up in the Beans List.
Note:When you name a bean, take into account that VisualAge uses the name of the bean in generating get methods. For example, if you name a torn-off property font, the generated method getFont overrides the inherited method.


Related concepts
Visual Composition Editor Overview

Related procedures
Opening the Property Sheet for a Bean

Related references
Visual Composition Editor
Pop-Up Menus for the Visual Composition Editor

Setting the Tabbing Order

The tabbing order specifies how the input focus moves from bean to bean as the user presses the Tab key.

  1. Open the pop-up menu for the composite bean.
  2. Select Set tabbing and then Show tab tags and numbered tab tags appear.
  3. Place the mouse pointer over the tab tag you want to change.
  4. Press and hold mouse button 1.
  5. Drag the tab tag to its new position.
  6. Release mouse button 1.
  7. Repeat until the numbered tags reflect the tabbing order you desire.

You can also change the tabbing order by moving the beans in the Beans List.


Related concepts
Visual Composition Editor Overview
Setting Tabbing Order

Related references
Visual Composition Editor
Pop-Up Menus for the Visual Composition Editor