protected Page[] createPages(PageModel pageModel) {
ArrayList<QueuePage> pages = new ArrayList<QueuePage>();
QueuePage currentPage=new QueuePage(mSettings, getPageFormat());
pages.add(currentPage);
for (int i=0; i<pageModel.getColumnCount(); i++) {
ColumnModel column = pageModel.getColumnAt(i);
for (int k=0; k<column.getProgramCount();k++) {
Program program = column.getProgramAt(k);
if (!currentPage.addProgram(program)) {
currentPage = new QueuePage(mSettings, getPageFormat());
pages.add(currentPage);
currentPage.addProgram(program, true);
}