/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 */
package Debrief.Wrappers;

import java.awt.Color;

import MWC.GUI.Shapes.PlainShape;
import MWC.GenericData.HiResDate;

@SuppressWarnings("serial")
public class DynamicShapeWrapper extends ShapeWrapper
{
	
	private String _theTrackName;

	public DynamicShapeWrapper(String label, PlainShape theShape, Color theColor,
			HiResDate theDate, String name)
	{
		super(label, theShape, theColor, theDate);
		_theTrackName = name;
	}

	public String getTrackName()
	{
		return _theTrackName;
	}

	public void setTrackName(String theTrackName)
	{
		this._theTrackName = theTrackName;
	}

}

@@ -568,16 +568,42 @@
 Color;%0A%0A
+import MWC.GUI.Plottable;%0A
 import M
@@ -1121,12 +1121,255 @@
 Name;%0A%09%7D
+%0A%09%0A%09/** override the default sort order (name), since%0A%09 * we wish to sort by DTG%0A%09 */%0A%09public int compareTo(Plottable o)%0A%09%7B%0A%09%09final DynamicShapeWrapper sw = (DynamicShapeWrapper) o;%0A%09%09return this.getStartDTG().compareTo(sw.getStartDTG());%0A%09%7D%0A%09
 %0A%0A%7D%0A

create a sort order for these shapes, so they're stored in chronological order