Manipulating Connections

Once you have made connections to and from beans on the free-form surface, you can modify them as follows:

Showing and Hiding Connections

You can show and hide connections by using the Show Connections Show connections and Hide Connections Hide connections tools. They can be found on the tool bar or as selections on the Tools pull-down menu. These tools show or hide all connections that have the selected bean or beans as their end points. If no beans are selected, these tools show and hide all connections in the composite bean.

If you hide connections, the Visual Composition Editor is refreshed faster and is less cluttered, making it easier for you to work.

You can also show and hide connections from the pop-up menu by selecting the Browse Connections cascade menu. The choices in this menu affect only connections going to and from the bean whose pop-up menu you opened.

Deleting Connections

To delete a connection, do one of the following:

Selecting and Deselecting Connections

You select connections in the same way that you select beans. When you select a connection, boxes called selection handles Selection Handle appear on it to show that it is selected. When first drawn, a connection contains three selection handles: one at each end and one in the middle. You can use selection handles to change either of the following:

Selecting a Single Connection

  1. Move the mouse pointer over the connection you want to select.
  2. Click mouse button 1 and the connection is selected.

Selecting Multiple Connections

To select multiple connections, do one of the following:

Deselecting Connections

To deselect a connection without selecting another bean or connection, follow these steps:

  1. Move the mouse pointer over the connection line.
  2. Hold down the Ctrl key.
  3. Click mouse button 1.

Reordering Connections

If you make several connections from the same bean, they run in the order in which you made the connections. To ensure the correct flow of control when you generate the source code, you might need to reorder the connections. If so, do the following:

  1. Select the source bean.

  2. From the source bean pop-up menu, select Reorder Connections From. The Reorder Connections window appears, showing a list of your connections.

  3. With the mouse pointer over the connection you want to reorder, press and hold the appropriate mouse button:

  4. Drag the connection to the place in the list where you want the connection to occur.
    Note:Parameter connections must always follow the connections they supply.

  5. Release the mouse button.

  6. Repeat these steps until the connections are listed in the order in which you want them to occur.

  7. Close the window.

Changing the Connection Name

You can change the name of a connection to make identification easier. To change the connection name:

  1. Open the pop-up for the connection.

  2. Select Change Connection Name.

  3. Modify the connection name.

The connection name changes in the Visual Composition Editor and, after you save the bean, in the source code.

Changing the Source and Target of Connections

You can change the end points of a connection without redrawing it, either by dragging the connection or by changing its properties.

You can change the source of any connection. In most cases, you can also change the target. However, you cannot change the target to a type that is not allowed. For example, you cannot change a target to an event because an event can only be the source of a connection.

Moving Either End of a Connection to a Different Bean

  1. Select the connection.
  2. Move the mouse pointer over the appropriate selection handle at the end of the connection.
  3. Press and hold mouse button 1.
  4. Move the mouse pointer to the new bean or connection.
  5. Release the mouse button.

If you change the target of a feature-to-method connection to a bean that does not support the target method, the connection menu appears, and you can select a new target feature.

Moving Either End of a Connection to a Different Feature

  1. Open properties for the connection. The Properties window for that connection type appears.
  2. Select new end points from the lists shown.
  3. Click OK.

Reversing the Direction of a Connection

The direction of property-to-property connections determines which end point is initialized first. The target property is initialized first based on the value of the source. Only property-to-property connections can be reversed. To do this, open properties for the connection and select the Reverse push button.

Changing the Shape of a Connection

To help you distinguish among several connection lines that are close together, you can change the shape of connections. To do this, follow these steps:

You can change the connection back to its original shape by selecting Restore Shape from the pop-up window.


Related concepts
Connections

Related procedures
Selecting and Deselecting Beans
Connecting Beans
Editing Connection Properties
Displaying Bean Pop-Up Menus

Related references
Show Connections
Hide Connections
Reorder Connections From
Change Connection Name