context.pageList.listview.setSelectedIndex(doc.getCurrentPageIndex());
}
public void insertContents(SketchDocument.SketchPage page) {
SwitchTheme.PresoThemeAction theme = (SwitchTheme.PresoThemeAction) page.getDocument().getProperties().get("theme");
SText title = new SText();
title.setText("Presentation Title");
title.setFillPaint(FlatColor.BLACK);
title.setFontName("OpenSans");
title.setFontSize(70);
title.setAutoSize(false);
title.setWidth(600);
center(title, page);
title.setStringProperty("text-class","title");
title.setTranslateY(190);
theme.styleText(title);
page.add(title);
SText subtitle = new SText();
subtitle.setText("by the author");
subtitle.setFillPaint(FlatColor.BLACK);
subtitle.setFontName("OpenSans");
subtitle.setFontSize(36);
subtitle.setAutoSize(false);
subtitle.setWidth(350);
center(subtitle, page);
subtitle.setStringProperty("text-class", "subtitle");
subtitle.setTranslateY(280);
theme.styleText(subtitle);
page.add(subtitle);
}