de.lessvoid.nifty.layout.manager
Class VerticalLayout

java.lang.Object
  extended by de.lessvoid.nifty.layout.manager.VerticalLayout
All Implemented Interfaces:
LayoutManager

public class VerticalLayout
extends Object
implements LayoutManager

A VerticalLayout implementation of the LayoutManager interface. The children elements are arranged in a vertical form in relation to the root element.

Author:
void

Constructor Summary
VerticalLayout()
           
 
Method Summary
 SizeValue calculateConstraintHeight(LayoutPart root, List<LayoutPart> children)
          Calculates a new Height constraint.
 SizeValue calculateConstraintWidth(LayoutPart root, List<LayoutPart> children)
          Calculates a new Width constraint.
 void layoutElements(LayoutPart root, List<LayoutPart> children)
          Layout the given elements using the given root element as the parent element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerticalLayout

public VerticalLayout()
Method Detail

layoutElements

public void layoutElements(LayoutPart root,
                           List<LayoutPart> children)
Description copied from interface: LayoutManager
Layout the given elements using the given root element as the parent element. The actual layout algorithm is performed by the Layout implementations.

Specified by:
layoutElements in interface LayoutManager
Parameters:
root - root element all children belong to
children - children elements of the root element

calculateConstraintWidth

public SizeValue calculateConstraintWidth(LayoutPart root,
                                          List<LayoutPart> children)
Description copied from interface: LayoutManager
Calculates a new Width constraint. Note that it is the callers responsibility to find out if this is possible. At the moment this is only possible when all child elements have a width constraint set in px.

Specified by:
calculateConstraintWidth in interface LayoutManager
children - children elements of the root element
Returns:
new calculated SizeValue

calculateConstraintHeight

public SizeValue calculateConstraintHeight(LayoutPart root,
                                           List<LayoutPart> children)
Description copied from interface: LayoutManager
Calculates a new Height constraint. Note that it is the callers responsibility to find out if this is possible. At the moment this is only possible when all child elements have a Height constraint set in px.

Specified by:
calculateConstraintHeight in interface LayoutManager
children - children elements of the root element
Returns:
new calculated SizeValue


Copyright © 2011. All Rights Reserved.