de.lessvoid.nifty.layout.manager
Class OverlayLayout

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

public class OverlayLayout
extends Object
implements LayoutManager

OverlayLayout doesn't layout things. It just forwards the size of the root box to the children.

Author:
void

Constructor Summary
OverlayLayout()
           
 
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 rootElement, List<LayoutPart> elements)
          layoutElements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlayLayout

public OverlayLayout()
Method Detail

layoutElements

public final void layoutElements(LayoutPart rootElement,
                                 List<LayoutPart> elements)
layoutElements.

Specified by:
layoutElements in interface LayoutManager
Parameters:
rootElement - @see LayoutManager
elements - @see LayoutManager

calculateConstraintWidth

public final 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
Parameters:
children - children elements of the root element
Returns:
new calculated SizeValue

calculateConstraintHeight

public final 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
Parameters:
children - children elements of the root element
Returns:
new calculated SizeValue


Copyright © 2012. All Rights Reserved.