com.guiseframework.component.layout
Class FlowLayout

java.lang.Object
  extended by com.globalmentor.beans.BoundPropertyObject
      extended by com.guiseframework.event.GuiseBoundPropertyObject
          extended by com.guiseframework.component.layout.AbstractLayout<T>
              extended by com.guiseframework.component.layout.AbstractFlowLayout<FlowConstraints>
                  extended by com.guiseframework.component.layout.FlowLayout
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Layout<FlowConstraints>

public class FlowLayout
extends AbstractFlowLayout<FlowConstraints>

A layout that flows information along an axis.

Author:
Garret Wilson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.guiseframework.component.layout.AbstractLayout
AbstractLayout.ConstraintsPropertyChangeListener
 
Field Summary
 
Fields inherited from class com.guiseframework.component.layout.AbstractFlowLayout
ALIGNMENT_PROPERTY, FLOW_PROPERTY, GAP_AFTER_PROPERTY, GAP_BEFORE_PROPERTY, GAP_BETWEEN_PROPERTY, WRAPPED_PROPERTY
 
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
 
Constructor Summary
FlowLayout()
          Default constructor with Flow.PAGE layout.
FlowLayout(Flow flow)
          Flow constructor with no wrapping.
FlowLayout(Flow flow, boolean wrapped)
          Flow and wrap constructor.
 
Method Summary
 FlowConstraints createDefaultConstraints()
          Creates default constraints for the container.
 java.lang.Class<? extends FlowConstraints> getConstraintsClass()
           
 
Methods inherited from class com.guiseframework.component.layout.AbstractFlowLayout
getAlignment, getFlow, getGapAfter, getGapBefore, getGapBetween, isWrapped, setAlignment, setFlow, setGap, setGapAfter, setGapBefore, setGapBetween, setWrapped
 
Methods inherited from class com.guiseframework.component.layout.AbstractLayout
addComponent, componentConstraintsChanged, fireConstraintsPropertyChange, getComponentConstraintsChangeListener, getConstraints, getConstraintsPropertyChangeListener, getOwner, removeComponent, setOwner
 
Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject
getSession
 
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.guiseframework.component.layout.Layout
getSession
 
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

FlowLayout

public FlowLayout()
Default constructor with Flow.PAGE layout.


FlowLayout

public FlowLayout(Flow flow)
Flow constructor with no wrapping.

Parameters:
flow - The logical axis (line or page) along which information is flowed.
Throws:
java.lang.NullPointerException - if the flow axis is null.

FlowLayout

public FlowLayout(Flow flow,
                  boolean wrapped)
Flow and wrap constructor.

Parameters:
flow - The logical axis (line or page) along which information is flowed.
wrapped - Whether flowed children should be wrapped when the flow extent is reached.
Throws:
java.lang.NullPointerException - if the flow axis is null.
Method Detail

getConstraintsClass

public java.lang.Class<? extends FlowConstraints> getConstraintsClass()
Returns:
The class representing the type of constraints appropriate for this layout.

createDefaultConstraints

public FlowConstraints createDefaultConstraints()
Creates default constraints for the container. The new flow constraints will use the default alignment specified by the layout.

Returns:
New default constraints for the container.
Throws:
java.lang.IllegalStateException - if this layout does not support default constraints.
See Also:
AbstractFlowLayout.getAlignment(), AbstractFlowConstraints.setAlignment(double)


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.