org.apache.batik.gvt.flow

Class RegionInfo

public class RegionInfo extends Object

This class holds the neccessary information to render a <batik:flowRegion> that is defined within the <batik:flowRoot> element. Namely it holds the bounds of the region and the desired vertical alignment.
Constructor Summary
RegionInfo(Shape s, float verticalAlignment)
Creates a new RegionInfo with the given shape and alignment.
Method Summary
ShapegetShape()
Returns the flow region shape.
floatgetVerticalAlignment()
Gets the vertical alignment for this flow region.
voidsetShape(Shape s)
Sets the flow region shape.
voidsetVerticalAlignment(float verticalAlignment)
Sets the alignment position of the text within this flow region.

Constructor Detail

RegionInfo

public RegionInfo(Shape s, float verticalAlignment)
Creates a new RegionInfo with the given shape and alignment.

Method Detail

getShape

public Shape getShape()
Returns the flow region shape.

getVerticalAlignment

public float getVerticalAlignment()
Gets the vertical alignment for this flow region.

Returns: the vertical alignment for this flow region. It will be 0.0 for top, 0.5 for middle and 1.0 for bottom.

setShape

public void setShape(Shape s)
Sets the flow region shape.

setVerticalAlignment

public void setVerticalAlignment(float verticalAlignment)
Sets the alignment position of the text within this flow region. The value must be 0.0 for top, 0.5 for middle and 1.0 for bottom.

Parameters: verticalAlignment the vertical alignment of the text.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.