![]() |
![]() |
![]() |
VisualAge provides pop-up menus from the following:
These menus provide options for adding or making changes to various elements of theVisual Composition Editor or bean design.
Depending on the elements you work with, the following pop-up menu items are available:
Select Add Bean from Project from the palette pop-up and the Modify Palette window appears. This version of the Modify Palette window provides an option for you to add beans from your project to the palette.
Select Browse Connections to show or hide connections to or from the bean.
Menu choices
Show To | Displays the connections for which the bean is the target. |
Show From | Displays the connections for which the bean is the source. |
Show To/From | Displays the connections for which the bean is either the target or source. |
Show All | Displays all the connections among beans in the Visual Composition Editor window. |
Hide To | Conceals the connections for which the bean is the target. |
Hide From | Conceals the connections for which the bean is the source. |
Hide To/From | Conceals the connections for which the bean is either the target or source. |
Hide All | Conceals all connections among beans in the Visual Composition Editor window. |
Select Change Bean Name to change the name of a bean placed in the Visual Composition Editor.
You can give beans descriptive names to more easily identify them. For example, you can change the default name "Button1" to "Delete." Change Bean Name does not change the label that appears beans such as push buttons.
When you change the name of any bean, you change the beanName property. This name appears in the status area at the bottom of the Visual Composition Editor window as you make connections, and identifies the bean in the beans list.
Note: | For subclasses of java.awt.Component, the bean name is the same as the name property of the bean. |
For a nonvisual bean, the name also appears as text beneath the icon for the bean on the free-form surface.
From the connection pop-up, select Change Connection Name to change the name of a connection in the Visual Composition Editor.
You can give connections descriptive names to more easily identify them. For example, you can change the default name of a connection that changes the background color from button1actionPerformed to ChangeBackgroundColor.
Select Change type to change the class of a variable bean on the free-form surface. The default class for a dropped variable bean is java.lang.Object. The default class for a torn off property variable is the same as the declared type of the property. For example, if you set a panel to CardLayout and tear off its layout property, the variable type is LayoutManager, not CardLayout.
To make a connection between two beans, select Connect from the pop-up menu. When you select Connect, the list of preferred features associated with the bean appears.
Select a feature from the Preferred features list. If the feature you want is not in the Preferred features list, select Connectable Features. A connection window appears that lists the available features associated with the bean.
The Connectable Features option is available from the bottom of the Connect option on the pop-up. Select Connectable Features to see a complete list of the available features (properties, events, and methods) for the bean that you are connecting. The features in the list depend upon the bean and features with which you are working. For example, since an event cannot be a target, the target connections list does not include events.
If the Connectable Features pop-up does not display the feature you desire, check the Show expert features check box. If the feature is designated Expert, it appears in the list.
Select Delete to delete a bean and its connections, or just the bean, or just the connections. You can use multiple select to delete more than one bean at a time.
Select Event to Code from the bean pop-up to create a connection that calls a code whenever a specified event occurs. The code can be an existing method or a newly written method. For more information see Event-to-Code Connection Window.
Select Layout to adjust the placement of beans in a container using null-layout or to adjust the placement of a container bean on the free-form surface. You can adjust the layout of one bean or adjust placement of several beans in a container. If you select one bean, you can adjust its placement horizontally or vertically, by selecting Distribute. If you select two beans, you can adjust:
If you select three or more beans, you can make all the above adjustment as well as distribution horizontally or vertically within a bounding box.
Select Distribute to space visual beans evenly within a specified area.
Select Horizontally in bounding box to space the selected beans evenly between the right and left edges of the bounding box they occupy. This item appears only if three or more beans are selected.
Use Horizontally in surface to space the selected beans evenly between the right and left edges of the bean on which they were dropped. If the selected beans sit directly on the free-form surface, VisualAge distributes them across the entire scrollable width of the free-form surface.
Use Vertically in bounding box to space the selected beans evenly between the top and bottom edges of the bounding box they occupy. This item appears only if three or more beans are selected.
Use Vertically in surface to space the selected beans evenly between the top and bottom edges of the bean on which they were dropped. If the selected beans sit directly on the free-form surface, VisualAge distributes them across the entire scrollable height of the free-form surface.
Select Modify Palette from the palette pop-up and the Modify Palette window appears.
Use Morph Into to change the class or type of a component. For example, you can use this capability in a visual composite to change AWT components to Swing components with few (if any) changes to property or connection settings. For more information before you proceed, see Morphing.
Select Open to open an editor for the bean you selected. If the selected bean has embedded visual beans, the Visual Composition Editor opens for the bean.
Select Parameter-from-Code from the bean pop-up to complete a connection that calls code whenever a specified event occurs.
Use Promote bean feature to make a feature of an embedded bean accessible outside the scope of the current composite.
Select Refresh Palette from the palette pop-up to view changes made to the palette, such as recently added beans and changes to icons. Refresh Palette also displays beans for features not loaded at the project level.
Select Refresh Interface to refresh the bean interface when you add methods or other BeanInfo in the BeanInfo page. The changes are reflected in the Visual Composition Editor.
Select Reorder Connections From to change the order in which the connections are executed.
Since the connections from an object with the same notification id run in the order in which they are made, you must use Reorder Connections From to place the connections in the order that want them to occur.
Use Restore shape to redraw the selected connections in their original shape.
Select Set Tabbing to specify the tabbing order for beans that support tabbing. The tabbing order determines the sequence in which beans receive focus when the user presses the Tab, backtab, or cursor movement keys.
The initial tabbing order is determined by the order in which you add the beans. Tabbing options include:
You can change the tab order by dragging the tab tags to the desired order.
Select Show Large Icons from the palette pop-up to modify the size of icons on the palette and the Beans List. Show Large Icons is a toggle with the default set to display 16x16 icon images. The large icons are 32x32.
Select Switch to when using the CardLayout manager. The CardLayout manager arranges the components in a linear depth sequence (like a deck of cards). Switch to enables you to navigate through the deck as follows:
Note: | Switch to is also available for the Swing bean, JTabbedPane. |
Select Tear-off property to work with a property as if it were a stand-alone bean. The torn-off property is a variable representing the property and not actually a separate bean.
When you select Tear-off property, VisualAge displays the list of properties for the bean you are tearing from. After you select a property from the list, you can drop the torn-off property on the free-form surface. VisualAge creates a connection (represented by a blue double-headed arrow) between the original bean and the torn-off property. You can then form other connections to or from the torn-off property.
Beans Palette
Connections
Promotion of Bean Features
Property Sheets
Setting Tabbing Order
Tearing Off Properties
Morphing
Connecting Beans
Managing the Beans Palette
Setting the Tabbing Order
Promoting Bean Features
Editing Bean Properties
Reordering Connections
Tearing Off Properties
Connection Windows
Event-to-Code Connection Window
Parameter-from-Code Connection Window
Promote Features Window
Modify Palette Window
Reorder Connections Window