Class CustomLayout

A container component with freely designed layout and style. The container consists of items with textually represented locations. Each item contains one sub-component. The adapter and theme are resposible for rendering the layout with given style by placing the items on the screen in defined locations.

The definition of locations is not fixed - the each style can define its locations in a way that is suitable for it. One typical example would be to create visual design for a website as a custom layout: the visual design could define locations for "menu", "body" and "title" for example. The layout would then be implemented as XLS-template with for given style.

The default theme handles the styles that are not defined by just drawing the subcomponents with flowlayout.

CustomLayout(String)

Constructor for custom layout with given style

addComponent(Component)

Parameters

c

The component to be added.

Add a component into this container. The component is added without specifying the location (empty string is then used as location). Only one component can be added to the default "" location and adding more components into that location overwrites the old components.

addComponent(Component, String)

Parameters

c

The component to be added.

location

The location of the component

Add a component into this container to given location.

getComponent(String)

Parameters

location

The name of the location where the requested component resides

return

Component in the given location or null if not found.

Get child-component by its location.

getComponentIterator()

Parameters

return

Iterator of the components inside the container.

Get component container iterator for going trough all the components in the container.

getTag()

Parameters

return

Component UIDL tag as string.

Get component UIDL tag.

paintContent(PaintTarget)

Parameters

event

PaintEvent.

Exceptions

PaintException

The paint operation failed.

Paint the content of this component.

removeComponent(Component)

Parameters

c

The component to be removed.

Remove a component from this container.

removeComponent(String)

Parameters

location

Location identifier of the component

Remove a component from this container from given location.