package scrollableDataTable;

import java.util.ArrayList;
import java.util.Random;

import dataScroller.Data;

public class ScrollableDataTable 
{
	private ArrayList<Data> data;
	private String [] priority = {"blocker", "critical", "major", "minor", "trivial"};
	private String [] priorityIcon = {"/pics/sdt/priority_blocker.gif", "/pics/sdt/priority_critical.gif", "/pics/sdt/priority_major.gif", "/pics/sdt/priority_minor.gif", "/pics/sdt/priority_trivial.gif"};
	
	public ScrollableDataTable() {
		
		data = new ArrayList<Data>();
		int k;
		for(int i = 0; i < 10000; i++) {
			k = new Random().nextInt(5);
			data.add(new Data("Bug " + new Random().nextInt(10 + i), i,priority[k], priorityIcon[k]));
		}
	}

	public ArrayList<Data> getData() {
		return data;
	}

	public void setData(ArrayList<Data> data) {
		this.data = data;
	}
}