+

Search Tips   |   Advanced Search


Set the orientation for layout containers

Set the orientation for modifiable instances of LayoutContainer nodes.

To set the orientation for a layout container, proceed by the following steps

  1. Obtain a modifiable instance of a layout container.

  2. Obtain the modifiable layout metrics instance.

  3. Set the orientation by using the setValue() method.

Example - Setting orientation of an existing layout container:

//  get modifiable instance of layout container final ModifiableLayoutNode modifiable = (ModifiableLayoutNode) lmController.getModifiableNode(container);

//  get modifiable layout metrics and set the orientation ModifiableLayoutMetrics modifiableLayoutMetrics = modifiable.getModifiableLayoutMetrics(); modifiableLayoutMetrics.setValue(LayoutMetrics.ORIENTATION, Orientation.HORIZONTAL);

If you do not set the orientation of a container, it is automatically set when you insert the container into the topology of the controller by the following rules:


Parent topic:

Modifying properties


Related tasks


Set titles and descriptions
Set unique names
Set metadata
Set supported markups
Set portlet preferences
Set flags
Set themes
Set URLs