Once you have placed beans on the free-form surface, you can make the following changes to achieve the look and function you want:
To select a single bean, click the bean with mouse button 1. If you previously selected other beans, they are deselected automatically.
To select multiple beans, do one of the following:
You can select beans or connections, but not both together. However, if you delete a bean with connections, the Visual Composition Editor deletes the connections and the bean.
When you select a bean in the Visual Composition Editor, selection handles
appear on the corners and between the corner handls. If you select
more than one bean, the last bean selected has solid selection handles,
indicating that it is the anchor bean and the other selected beans
have hollow selection handles. The anchor bean is the guide by which
the other beans are manipulated. For example, if you want to match the
widths of two beans, the anchor bean is used as the guideline width.
To change the anchor bean, hold Shift and click the already selected new anchor bean.
Note: | You can also select and modify beans, one at a time, in the beans list. |
To deselect a bean after you have selected it, click mouse button 1 anywhere on the Visual Composition Editor.
To deselect multiple but not all selected beans, follow these steps:
You can deselect all selected beans by clicking mouse button 1 anywhere but on a selected bean.
Positioning a bean refers to aligning or spacing. For beans in a null layout, the tool bar and the Tools pull-down menu provide options for aligning beans.
The anchor bean, indicated by solid selection handles, is the bean that serves as the alignment reference. To align beans with one another, select the ones you want to modify and select the anchor bean last. You can also change the anchor bean by holding Shift and clicking on the new anchor bean.
To align beans:
The pop-up menu provides options for spacing within the bounding box, an unseen box that contains the selected beans. You can also manage the placement of parts by using a layout managerh.
To space beans within the bounding box:
Note: | If you specify a non-null layout for the container, the bean alignment and spacing are controlled by that layout manager and not the alignment tools. |
You can change the size of a visual bean in the Visual Composition Editor using any of the following techniques:
Beans that cannot be resized, such as variables, menus, and tear-off properties have reversed background color, but no selection handles. Beans using non-null layouts cannot be resized, but have selection handles.
Note: | If you specify a non-null layout for the container, the bean sizing is affected by that layout manager. |
To change the size of a visual bean in a container using a null layout, follow these steps:
Note: | Pressing the Esc key before releasing the mouse button cancels resizing without making changes. |
To size a bean in only one direction, press and hold the Shift key while sizing the bean. Holding down the Shift key prevents one dimension of the bean from changing when you resize the other dimension. For example, to change the width of a bean but prevent its height from changing, hold down the Shift key while changing the width.
The size of the selected beans changes to match the size of the anchor bean.
To move a bean in the Visual Composition Editor, follow these steps:
If the bean you are dragging is one of several that you selected, all selected beans move together. Pressing the Esc key before releasing the mouse button cancels the move without making changes.
You can reorder or reparent a bean in the beans list. To reorder, select a bean in the beans list and drag it to a new position within its composite bean. This action does not change the position of the bean in the Visual Composition Editor (except as noted below), but reorders the list, which affects the tabbing order. To reparent a bean, select and drag it to a different composite bean in the beans list. This action does change the position of the bean in the Visual Composition Editor. You cannot, however, select multiple beans on the beans list.
To modify bean placement on the Visual Composition Editor from within the Beans List window without reparenting, open the Properties for the bean and modify the Constraints.
Note: | If you use BoxLayout, FlowLayout, or GridLayout managers, you can move beans on the Visual Composition Editor surface by reordering them in the beans list. |
Moving a composite bean requires special handling. For information, see Code Generated from Visually Composed Beans.
To copy beans using the clipboard:
If you decide against pasting the beans, unload the mouse pointer by
selecting the
Selection tool.
As long as you do not copy another item to the clipboard, you can continue copying these beans.
Note: | When you copy or cut and paste beans, the Visual Composition Editor preserves the bean names but not the connections. |
When you copy or cut and paste two or more beans, they retain their positions relative to each other.
To copy beans by dragging:
Note: | Pressing the Esc key before releasing the mouse button cancels copying without making changes. |
Copying a composite bean requires special handling. For information, see Code Generated from Visually Composed Beans.
To delete beans, select them and press Delete or select Delete from the pop-up menu.
When you delete a connected bean, the connections between that bean and other beans are also deleted. However, when you select Edit and then Undo, you restore the deleted bean and any connections that were removed.
To see a menu of operations you can perform on a bean, click mouse button 2 on the bean. The pop-up menu for the bean appears. Choices on the pop-up menu allow you to delete the bean, rename it, and perform other operations (which vary, depending on the bean).
To display a pop-up menu for multiple beans:
Note: | When you open a pop-up menu for multiple selected beans, one menu displays the choices common to all selected beans. Operations performed from that pop-up affect all selected beans. |
Setting Tabbing Order
Layout Managers in Visual Composition
Tearing Off Properties
Property-to-Property Connections
Beans Palette
Setting Layout Properties during Visual Composition
Opening the Property Sheet for a Bean
Changing Bean Size and Position
The Tool Bar in Visual Composition
Align Left
Align Center
Align Right
Align Top
Align Middle
Align Bottom
Vertically In Bounding Box
Horizontally In Bounding Box
Set Tabbing
Morph Into
Morph Into
Tear-Off Property