} else if (getTabs().getSelectedIndex() == UIFacade.RESOURCES_INDEX) {
startDate = getResourcePanel().area.getChartModel().getStartDate();
endDate = getResourcePanel().area.getChartModel().getEndDate();
}
try {
PrintPreview preview = new PrintPreview(
getProject(),
getUIFacade(),
chart,
startDate,
endDate);
if (preview != null)
preview.setVisible(true);
}
catch (OutOfMemoryError e) {
getUIFacade().showErrorDialog(GanttLanguage.getInstance().getText("printing.out_of_memory"));
return;
}