org.nakedobjects.plugins.dnd.viewer.builder
Class StackLayout

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.builder.AbstractBuilderDecorator
      extended by org.nakedobjects.plugins.dnd.viewer.builder.StackLayout
All Implemented Interfaces:
ViewBuilder

public class StackLayout
extends AbstractBuilderDecorator

A stack layout stacks its components vertically, one on top of the other, working down from the top. Each component is given the space it requests. Components adopt the width of the widest component when that component's view specification's isAligned method returns true, or the layout's fixedWidth flag is set (via the two parameter constructor).


Field Summary
 
Fields inherited from class org.nakedobjects.plugins.dnd.viewer.builder.AbstractBuilderDecorator
wrappedBuilder
 
Constructor Summary
StackLayout(ViewBuilder design)
           
StackLayout(ViewBuilder design, boolean fixedWidth)
           
 
Method Summary
 Size getRequiredSize(View view)
           
 boolean isOpen()
          Indicates whether this view is expanded, or iconized.
 void layout(View view, Size maximumSize)
           
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.builder.AbstractBuilderDecorator
build, createCompositeView, createViewAxis, decorateSubview, getReference, isReplaceable, isSubView, setReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StackLayout

public StackLayout(ViewBuilder design)

StackLayout

public StackLayout(ViewBuilder design,
                   boolean fixedWidth)
Method Detail

getRequiredSize

public Size getRequiredSize(View view)
Specified by:
getRequiredSize in interface ViewBuilder
Overrides:
getRequiredSize in class AbstractBuilderDecorator

isOpen

public boolean isOpen()
Description copied from interface: ViewBuilder
Indicates whether this view is expanded, or iconized.

Specified by:
isOpen in interface ViewBuilder
Overrides:
isOpen in class AbstractBuilderDecorator
Returns:
true if it is showing the object's details; false if it is showing the object only.

layout

public void layout(View view,
                   Size maximumSize)
Specified by:
layout in interface ViewBuilder
Overrides:
layout in class AbstractBuilderDecorator


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.