protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doRestoreState(rs, context);

    RestorableSupport.StateObject so = rs.getStateObject(context, "boundaries");
    if (so != null) {
      this.boundaries.removeAllContours();

      RestorableSupport.StateObject[] sos = rs.getAllStateObjects(so, "boundary");
      if (sos != null) {
        for (RestorableSupport.StateObject boundary : sos) {
          if (boundary == null) continue;

          Iterable<LatLon> locations = rs.getStateObjectAsLatLonList(boundary);
          if (locations != null) this.boundaries.addContour(locations);
        }
      }

      // We've changed the polygon's list of boundaries; flag the shape as changed.
      this.onShapeChanged();
    }
  }