Component Handling

  Basic operations
  Variable names
  Anonymous and non-anonymous components
  Copy and paste


Basic operations     Top of page

Place components or containers in the grid: Drag the component icon from the to the desired grid cell. The last inserted component stays activated, so you can insert several components of the same kind with Ctrl-Shift-Click.
Move components to another grid cell: Click inside the component's bounds (in contrast to the component's grid cell) and drag the component to the target cell.
Duplicate components: Additionally press Alt while moving the component.
Add components to a container: Drag the component icon from the components palette to the container's grid cell. You can also move an already inserted component to a container's grid cell.
Apply containers to components (or other containers): Drag the container icon from the components palette to the component's grid cell. You can also move an already inserted container to a component's grid cell.
Select a component or container by clicking its grid cell, select multiple components with Ctrl-Click and create contiguous selections with Shift-Click. (Note: You can not create multiple selections containing components which belong to different parent containers).
Delete selected components: Press Backspace or Del.


Variable names     Top of page

Each component has a variable name (unique within the component's name space). To change it, either Alt-doubleclick the component or select 'Rename' from the component's or press <F2> while the component is selected.

Note: There is one reserved variable name: "defaultButton". The JButton having this name will be set as default button if the exported layout class extends JFrame, JDialog or JApplet.


Anonymous and non-anonymous components     Top of page

Each component has an anonymous state. When exporting a layout, you can choose that only non-anonymous components shall appear as member fields of the exported class (see Exporting layout classes). In the project view, you can choose to hide anonymous components so you can concentrate on the more important components when editing the layout. By default a component is anonymous, you can change this from the component's .

Note: If you change a component's variable name, the component's anonymous property will automatically change to false.

The tooltip of non-anonymous components will show the underlined , by pressing and holding <N>, the tooltips of all non-anonymous components of the layout will show up.


Copy and paste     Top of page

You can copy and paste components between different layouts and also between different projects. If you have copied a selection including several components and paste them into a design grid, RADi tries to preserve the component's relative position if possible, else the components are pasted one after another into the empty cells, beginning with the (first) selected cell.
If there are more components to paste than there are empty cells, you will see a .

Note: When copying components to a different project, all referenced resources will be copied, too.

See also:
The design grid
Components in grid cells
Containers in grid cells
Shortcuts
Resources