@Role
public interface LayoutManager
layoutContainer(Block)
function should read the container children and modify them accordingly to meet the
required layout. Note that although the function can access the whole tree through the passed block, it is
recommended that the changes are limited to the container block and its children. Also, usually the container block
should be a group block. Parameters are used to pass various parameters required for the layouting (sizes, style
options, etc).Modifier and Type | Method and Description |
---|---|
Object |
getParameter(String parameterName) |
void |
layoutContainer(org.xwiki.rendering.block.Block container)
Performs the layout of
container , modifying the blocks inside. |
void |
setParameter(String parameterName,
Object parameterValue)
Sets a parameter needed for the layout.
|
void layoutContainer(org.xwiki.rendering.block.Block container)
container
, modifying the blocks inside.
TODO: might as well have been with a list of blocks as parameter, but I wanted to mimic the awt LayoutManager interface, which lays out a container and not a list of contents. Reviewer, WDYT?
container
- the block whose contents to layoutvoid setParameter(String parameterName, Object parameterValue)
parameterName
- the name of the parameter to setparameterValue
- the value of the parameterCopyright © 2004–2021 XWiki. All rights reserved.