コード例 #1
0
  @Override
  protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    rs.addStateValueAsBoolean(context, "enableCaps", this.enableCaps);

    if (this.locations != null) rs.addStateValueAsLatLonList(context, "locations", this.locations);
  }
コード例 #2
0
  protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    Iterable<? extends LatLon> iterable = this.getLocations();
    if (iterable != null) rs.addStateValueAsLatLonList(context, "locationList", iterable);

    rs.addStateValueAsBoolean(context, "closed", this.isClosed());
  }
コード例 #3
0
  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));
      }
    }
  }