org.viewaframework.view
Interface ComponentsAware

All Known Subinterfaces:
ViewContainer, ViewContainerDialog, ViewContainerEditor, ViewContainerFrame
All Known Implementing Classes:
AboutView, AbstractViewContainer, AbstractViewContainerDialog, AbstractViewContainerFrame, AbstractViewContainerTray, DefaultViewContainer, DefaultViewContainerEditor, DefaultViewContainerFrame, DetailView, LoginView, MasterView

public interface ComponentsAware

This interface helps ViewContainer to handle visual components in an easy way.

Since:
1.0
Author:
Mario Garcia

Method Summary
 Component getComponentByName(String name)
          This method retrieves components by its name.
 List<Component> getComponentsByName(String name)
          This method retrieves components by its name.
 Map<String,List<Component>> getNamedComponents()
          It retrieves all the named components within the main Container returned by this view.
 void setNamedComponents(Map<String,List<Component>> namedComponents)
          NamedComponents should be filled by an external delegator.
 

Method Detail

getComponentsByName

List<Component> getComponentsByName(String name)
This method retrieves components by its name. If the component doesn't exist it returns an empty List.

Parameters:
name - The name of the component we want to retrieve
Returns:
The Component

getComponentByName

Component getComponentByName(String name)
This method retrieves components by its name. If the component doesn't exist it returns null.

Parameters:
name - The name of the component we want to retrieve
Returns:
The Component

getNamedComponents

Map<String,List<Component>> getNamedComponents()
It retrieves all the named components within the main Container returned by this view.

Returns:
A map with all the named components

setNamedComponents

void setNamedComponents(Map<String,List<Component>> namedComponents)
NamedComponents should be filled by an external delegator. It should inspect the rootPane of the view and retrieve all named java.awt.Component components.

Parameters:
namedComponents -


Copyright © 2010. All Rights Reserved.