コード例 #1
0
  public void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject so) {
    rs.addStateValueAsBoolean(so, "drawInterior", this.isDrawInterior());

    rs.addStateValueAsBoolean(so, "drawOutline", this.isDrawOutline());

    rs.addStateValueAsBoolean(so, "enableAntialiasing", this.isEnableAntialiasing());

    this.getInteriorMaterial().getRestorableState(rs, rs.addStateObject(so, "interiorMaterial"));

    this.getOutlineMaterial().getRestorableState(rs, rs.addStateObject(so, "outlineMaterial"));

    rs.addStateValueAsDouble(so, "interiorOpacity", this.getInteriorOpacity());

    rs.addStateValueAsDouble(so, "outlineOpacity", this.getOutlineOpacity());

    rs.addStateValueAsDouble(so, "outlineWidth", this.getOutlineWidth());

    rs.addStateValueAsInteger(so, "outlineStippleFactor", this.getOutlineStippleFactor());

    rs.addStateValueAsInteger(so, "outlineStipplePattern", this.getOutlineStipplePattern());

    if (this.getInteriorImageSource() != null && this.getInteriorImageSource() instanceof String)
      rs.addStateValueAsString(so, "interiorImagePath", (String) this.getInteriorImageSource());

    rs.addStateValueAsDouble(so, "interiorImageScale", this.getInteriorImageScale());
  }
コード例 #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
  @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);
  }