Ejemplo n.º 1
0
  @Override
  protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    RestorableSupport.StateObject so = rs.addStateObject(context, "layers");
    for (Layer layer : this.layers) {
      RestorableSupport.StateObject lso = rs.addStateObject(so, "layer");
      layer.doGetRestorableState(rs, lso);
    }
  }
  protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    if (this.boundaries.getContourCount() > 0) {
      RestorableSupport.StateObject so = rs.addStateObject(context, "boundaries");
      for (int i = 0; i < this.boundaries.getContourCount(); i++) {
        rs.addStateValueAsLatLonList(so, "boundary", this.boundaries.getContour(i));
      }
    }
  }