IContainer Interface

IContainer Interface

This Package | All Packages

public interface IContainer

Represents a container object that provides sites for components.

Methods
Name Description
add(IComponent component) Adds a component to the container.
add(IComponent component, String name) Adds a component to the container.
dispose() Removes all components from a container.
getComponent(String name) Retreives a named component from the container.
getComponents() Retreives an array of all components from the container.
remove(IComponent component) Removes a component from the container.

Methods

IContainer.add

Syntax 1
public void add( IComponent component );
Parameters
component
The component object to add.
Description

Adds a component to the container.



Syntax 2
public void add( IComponent component, String name );
Parameters
component
The component object to add.
name
The name of the component being added.
Description

Adds a component to the container.

IContainer.dispose

Syntax
public void dispose();
Description

Removes all components from a container.

IContainer.getComponent

Syntax
public IComponent getComponent( String name );
Parameters
name
The name of the component to retrieve.
Return Value

Returns the component requested, or null if this component is not found.

Description

Retreives a named component from the container.

IContainer.getComponents

Syntax
public IComponent[] getComponents();
Return Value

Returns all components currently sited in this container.

Description

Retreives an array of all components from the container.

IContainer.remove

Syntax
public void remove( IComponent component );
Parameters
component
The component to remove.
Description

Removes a component from the container.