com.miginfocom.ashape.layout
Class AbstractAShapeLayout

java.lang.Object
  extended by com.miginfocom.ashape.layout.AbstractAShapeLayout
All Implemented Interfaces:
AShapeLayout, java.io.Serializable
Direct Known Subclasses:
CutEdgeAShapeLayout, DefaultAShapeLayout, HitShapeAShapeLayout, RowAShapeLayout

public abstract class AbstractAShapeLayout
extends java.lang.Object
implements AShapeLayout

Provides a default implementation of getLayoutSize(com.miginfocom.ashape.shapes.AShape, int, int, Integer) since it it usually the same for most layouts.

See Also:
Serialized Form

Constructor Summary
AbstractAShapeLayout()
           
 
Method Summary
 java.lang.Integer getLayoutSize(AShape parent, int type, int dim, java.lang.Integer otherDimSizeHint)
          Return a type of size (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.miginfocom.ashape.layout.AShapeLayout
layoutShapes
 

Constructor Detail

AbstractAShapeLayout

public AbstractAShapeLayout()
Method Detail

getLayoutSize

public java.lang.Integer getLayoutSize(AShape parent,
                                       int type,
                                       int dim,
                                       java.lang.Integer otherDimSizeHint)
Description copied from interface: AShapeLayout
Return a type of size (i.e. min/preferred/max) for a dimension, if there is one.

Specified by:
getLayoutSize in interface AShapeLayout
Parameters:
parent - The shape to return the size for.
type - The type of size to return. E.g. Distributor.MIN.
dim - The dimension for which to return the size. E.g SwingConstants.HORIZONTAL
otherDimSizeHint - On optional size in the not-asked-for dimension. Useful for text shapes that wraps for instance.
Returns:
The size or null there are no answer that makes sense or it isn't set.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.