/*
* Creates a marker container with a marker for each seven days
*/
public Container.Indexed createmarkerDataSource()
{
Container.Indexed container = new IndexedContainer();
container.addContainerProperty(Timeline.PropertyId.TIMESTAMP, Date.class, null);
container.addContainerProperty(Timeline.PropertyId.CAPTION, String.class, "our marker symbol");
container.addContainerProperty(Timeline.PropertyId.VALUE, String.class, "Our description");
//add a marker for every 7 days
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MONTH, -1);
java.util.Date today = new java.util.Date();
SimpleDateFormat formatter = new SimpleDateFormat("EEE, MMM d, ''yy");
while(cal.getTime().before(today))
{
//create a point in time
Item item = container.addItem(cal.getTime());
//set the time stamp property
item.getItemProperty(Timeline.PropertyId.TIMESTAMP).setValue(cal.getTime());
//set the caption property