org.writersforge.catalan.templates.generic
Class GenericRegionMap

java.lang.Object
  extended byorg.writersforge.catalan.templates.generic.GenericRegionMap
All Implemented Interfaces:
RegionMap

public class GenericRegionMap
extends java.lang.Object
implements RegionMap

A RegionMap that is backed by a Generic XML <region-map> element.

Author:
jsheets

Constructor Summary
GenericRegionMap(org.writersforge.bellows.ListDatum regions)
          Creates a new instance of GenericRegionMap.
 
Method Summary
 java.awt.Rectangle getRegionExtents(java.lang.String regionName)
          Returns the geometrical extents of the named region.
 java.lang.String[] getRegionNames()
          Returns an array of all valid region names in this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericRegionMap

public GenericRegionMap(org.writersforge.bellows.ListDatum regions)
Creates a new instance of GenericRegionMap.

Parameters:
regions - the Datum representation of the region map
Method Detail

getRegionNames

public java.lang.String[] getRegionNames()
Returns an array of all valid region names in this map.

Specified by:
getRegionNames in interface RegionMap
Returns:
an array of region names

getRegionExtents

public java.awt.Rectangle getRegionExtents(java.lang.String regionName)
Returns the geometrical extents of the named region.

Specified by:
getRegionExtents in interface RegionMap
Parameters:
regionName - the text name of the region
Returns:
a Rectangle that defines the region's extents, or null if region does not exist