org.omegahat.Graphics.Layouts
Class LayoutAllocatorRegionDescription

java.lang.Object
  |
  +--org.omegahat.Graphics.Primitives.RectRegionDescription
        |
        +--org.omegahat.Graphics.Layouts.AllocatorRectRegionDescription
              |
              +--org.omegahat.Graphics.Layouts.LayoutAllocatorRegionDescription
All Implemented Interfaces:
AllocatorRegionDescriptionInt, RegionDescriptionInt

public class LayoutAllocatorRegionDescription
extends AllocatorRectRegionDescription

Class used directly by LayoutAllocator when creating symblic descriptions of the areas a component occupies, providing a connection back to the allocator so that all the actual realized regions can be computed in one step for the allocators components.


Field Summary
protected  int id
           
 
Fields inherited from class org.omegahat.Graphics.Layouts.AllocatorRectRegionDescription
allocator
 
Fields inherited from class org.omegahat.Graphics.Primitives.RectRegionDescription
height, hJust, vJust, width, x, y
 
Constructor Summary
LayoutAllocatorRegionDescription(RegionAllocator allocator, int id)
           
 
Method Summary
 RectRegion compute(ScaleInt sx, ScaleInt sy, int parentOrigin, double widthCM, double heightCM, int fontSize, GraphicalContainerInt parent)
          Compute the actual bounding box described by this region description in terms of the normalized dimensions of its parent container, that is NPC.
 int getId()
          Accessor for id field
 int setId(int value)
          Accessor for setting id field
 
Methods inherited from class org.omegahat.Graphics.Layouts.AllocatorRectRegionDescription
compute, getAllocator, setAllocator
 
Methods inherited from class org.omegahat.Graphics.Primitives.RectRegionDescription
getHeight, getHJust, getVJust, getWidth, getX, getY, justifyX, justifyY, setHeight, setHJust, setVJust, setWidth, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omegahat.Graphics.Primitives.RegionDescriptionInt
getHeight, getHJust, getVJust, getWidth, getX, getY, setHeight, setHJust, setVJust, setWidth, setX, setY
 

Field Detail

id

protected int id
Constructor Detail

LayoutAllocatorRegionDescription

public LayoutAllocatorRegionDescription(RegionAllocator allocator,
                                        int id)
Method Detail

compute

public RectRegion compute(ScaleInt sx,
                          ScaleInt sy,
                          int parentOrigin,
                          double widthCM,
                          double heightCM,
                          int fontSize,
                          GraphicalContainerInt parent)
Description copied from interface: RegionDescriptionInt
Compute the actual bounding box described by this region description in terms of the normalized dimensions of its parent container, that is NPC.
Overrides:
compute in class RectRegionDescription
Following copied from interface: org.omegahat.Graphics.Primitives.RegionDescriptionInt
Parameters:
sx - parent container's horizontal ScaleInt object for transforming coordinates in that space.
sy - parent container's vertical ScaleInt object for transforming coordinates in that space.

getId

public int getId()
Accessor for id field

setId

public int setId(int value)
Accessor for setting id field