# com.bea.ide.actions
IActionContainer Interface

public interface IActionContainer

This interface allows generator objects to modify action containers. An object with this interface is passed to the `IGenerator.populate(IActionContainer)``` method.

## Field Summary

`public static final int` | `TYPE_MENU` Indicates that this container is a menu (normal or popup).
`public static final int` | `TYPE_PALETTE` Indicates that this container is a palette.
`public static final int` | `TYPE_PALETTE_GROUP` Indicates that this container is a palette group.
`public static final int` | `TYPE_TOOLBAR` Indicates that this container is a toolbar.

## Method Summary

`public void` | `add`(`IActionProxy` p) Adds the specified action proxy to the container.
`public void` | `add`(`IAction` a, `String` sLabel) Adds the specified action to the container with the specified label text.
`public void` | `add`(`IAction` a, `String` sLabel, `Icon` icon, `String` sTooltip) Adds the specified action to the container with the specified label text, icon and tooltip.
`public `IActionContainer`` | `addContainer`(`String` sLabel, `Icon` icon, `String` sTooltip) Creates a new nested container and returns it.
`public `IActionContainer`` | `addContainer`(`String` sLabel, `Icon` icon, `String` sTooltip, `Object` property) Creates a new nested container and returns it.
`public void` | `addSeparator`() Adds a separator to the container.
`public int` | `getType`() Returns the type of container this is, so that if necessary, the generator may add different information.

## Field Detail

### TYPE_MENU

    public static final int TYPE_MENU

  Indicates that this container is a menu (normal or popup).

### TYPE_PALETTE

    public static final int TYPE_PALETTE

  Indicates that this container is a palette.

### TYPE_PALETTE_GROUP

    public static final int TYPE_PALETTE_GROUP

  Indicates that this container is a palette group.

### TYPE_TOOLBAR

    public static final int TYPE_TOOLBAR

  Indicates that this container is a toolbar.

## Method Detail

### add(IActionProxy) Method

    public void add(IActionProxy p)

Adds the specified action proxy to the container.

#### Parameters

p
  Action proxy to add.

### add(IAction, String) Method

    public void add(IAction a,
                    String sLabel)

Adds the specified action to the container with the specified label text.

#### Parameters

a
  Action to add.

sLabel
  Label for the action.

### add(IAction, String, Icon, String) Method

    public void add(IAction a,
                    String sLabel,
                    Icon icon,
                    String sTooltip)

Adds the specified action to the container with the specified label text, icon and tooltip.

#### Parameters

a
  Action to add.

sLabel
  Label for the action.

icon
  Icon for the action.

sTooltip
  Tooltip for the action.

### addContainer(String, Icon, String) Method

    public IActionContainer addContainer(String sLabel,
                                         Icon icon,
                                         String sTooltip)

Creates a new nested container and returns it. This method will return `null` for TYPE_TOOLBAR which does not support nesting.

#### Parameters

sLabel
  Label for the new container.

icon
  Icon for the new container

sTooltip
  Tooltip for the new container.

#### Returns

A new implementation of the IActionContainer interface that will be nested in the current container at the current position. May return `null` if the container doesn't support nesting.

### addContainer(String, Icon, String, Object) Method

    public IActionContainer addContainer(String sLabel,
                                         Icon icon,
                                         String sTooltip,
                                         Object property)

Creates a new nested container and returns it. This method will return `null` for TYPE_TOOLBAR which does not support nesting.

#### Parameters

sLabel
  Label for the new container.

icon
  Icon for the new container.

sTooltip
  Tooltip for the new container.

property
  Specifies any container-dependent attributes. In the case of the data palette, this is used to specify the name of the popup menu to display on the new button.

#### Returns

A new implementation of the IActionContainer interface that will be nested in the current container at the current position. May return `null` if the container doesn't support nesting.

### addSeparator() Method

    public void addSeparator()

Adds a separator to the container.

### getType() Method

    public int getType()

Returns the type of container this is, so that if necessary, the generator may add different information.

#### Returns

One of TYPE_MENU, TYPE_TOOLBAR, TYPE_PALETTE_GROUP.