public virtual void Refresh() { int index = -1; if (strokes.has(this.Id.ToString())) { if (this is Handleable) { ((Handleable)strokes.get(this.Id.ToString())).deleteDragHandles(); } index = strokes.IndexOf(strokes.get(this.Id.ToString())); if (strokes.has(this.Id.ToString())) { strokes.Remove(strokes.get(this.Id.ToString())); } } strokes.Insert(index, this.Clone()); }