Class
caplin.component.composite

CompositeComponent

The class has been deprecated and may be removed in future releases.
The CompositeComponent class represents the view, in MVC terms, of the composite component. The CompositeComponent consists of multiple component objects, an XML DOM (a model), and an HTML DOM (a view).

Constructor Summary

Attributes Name and Description
caplin.component.composite.CompositeComponent(Object oXmlModel, Element eHtmlView, Object mComponents, mSplitters, mComponentIdToXmlNode)

Constructs a new CompositeComponent object.

Method Summary

Attributes Name and Description
void callControllerMethod(String sMethod)

Calls a method on the controller.

<static> caplin.component.composite.CompositeComponent createFromSerializedState(String sXml)

Invoked by the caplin.component.ComponentFactory in order to create a CompositeComponent given and XML string.

void finalize()

The method cleans up resources (de-registers event handlers).

int getComponentSize(String sComponentId)

Returns the size of a child component in pixels without a trailing "px".

DOMElement getElement()

Returns the HTML element for this component.

String getUniqueComponentId()

Gets a guaranteed ID for this component instance.

void hideComponent(String sComponentId)

Used to hide one of the composite components.

void setController(caplin.component.composite.CompositeComponentController oController)

Sets the composite component's controller

Methods implemented from class caplin.component.Component:
getContainer, getPermissionKey, setContainer, setFrame
Methods from caplin.core.Serializable:
getSerializedState
Methods from caplin.component.ComponentLifecycleEvents:
onActivate, onClose, onDeactivate, onHide, onMaximize, onMinimize, onOpen, onResize, onRestore, onShow

Constructor Detail

caplin.component.composite.CompositeComponent(Object oXmlModel, Element eHtmlView, Object mComponents, mSplitters, mComponentIdToXmlNode)

Constructs a new CompositeComponent object.

Parameters
Object oXmlModel The XML DOM that serves as a model for the CompositeComponent.
Element eHtmlView The HTML DOM that represents the HTML view of the CompositeComponent.
Object mComponents A map of component objects that make up the CompositeComponent.
mSplitters
mComponentIdToXmlNode
Deprecated
This is deprecated and will not be supported in the future.

Method Detail

void callControllerMethod(String sMethod)

Calls a method on the controller. This is useful if you want a webcentric decorator button to call a method on the composite component controller e.g.

Parameters
String sMethod

<static> caplin.component.composite.CompositeComponent createFromSerializedState(String sXml)

Invoked by the caplin.component.ComponentFactory in order to create a CompositeComponent given and XML string.

Parameters
String sXml The XML string that is the serialized representation of the compositeComponent.
Returns
An instance of the CompositeComponent corresponding to the serialized form.

void finalize()

The method cleans up resources (de-registers event handlers).

int getComponentSize(String sComponentId)

Returns the size of a child component in pixels without a trailing "px". If this component is in a terrace, this method will return its width. If it is in a stack, this method will return its height.

Parameters
String sComponentId The id of the component we want to query

DOMElement getElement()

Returns the HTML element for this component.

Returns
the HTML element for this component.

String getUniqueComponentId()

Gets a guaranteed ID for this component instance.

Returns
A unique ID

void hideComponent(String sComponentId)

Used to hide one of the composite components. This will only work if there is a sibling component that can take up the unused space.

Parameters
String sComponentId The id of the component to hide

void setController(caplin.component.composite.CompositeComponentController oController)

Sets the composite component's controller

Parameters
caplin.component.composite.CompositeComponentController oController