Interface AShapeLayout

All Superinterfaces:
All Known Implementing Classes:
AbstractAShapeLayout, CutEdgeAShapeLayout, DefaultAShapeLayout, HitShapeAShapeLayout, RowAShapeLayout

public interface AShapeLayout

The interface that defines how a layout manager that works to layout AShapes within other AShapes. Note that for a shape to have to possibility to be used as a 'stamp' (I.e. renderer, like TableCellRenderer) the layout that that shape uses must be stateless (I.e. reevaluate the layout everytime and not save/cache any information between the layout sessions).

Method Summary
 java.lang.Integer getLayoutSize(AShape shape, int type, int dim, java.lang.Integer otherDimSizeHint)
          Return a type of size (i.e.
 void layoutShapes(AShape parent)
          Layout the first level sub shapes of the parent and call AShape.layout() on them

Method Detail


void layoutShapes(AShape parent)
Layout the first level sub shapes of the parent and call AShape.layout() on them

parent - The parent which sub shapes should be laid out.


java.lang.Integer getLayoutSize(AShape shape,
                                int type,
                                int dim,
                                java.lang.Integer otherDimSizeHint)
Return a type of size (i.e. min/preferred/max) for a dimension, if there is one.

shape - 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.
The size or null there are no answer that makes sense or it isn't set.

Copyright © 2009 MiG InfoCom AB. All Rights Reserved.