Example #1
0
  /**
   * Creates a region (first deleting it if one with that name exists)
   *
   * @param string
   * @param xaxis
   * @return
   * @throws Exception
   */
  public static final IRegion replaceCreateRegion(
      final IRegionSystem system, final String name, final RegionType type) throws Exception {

    if (system.getRegion(name) != null) {
      system.removeRegion(system.getRegion(name));
    }
    return system.createRegion(name, type);
  }