defaultPlotName_ = defaultPlotName;
options_ = options;
progressIndicator_ = addProgressIndicator();
ThemedButton saveButton = new ThemedButton("Save",
new ClickHandler() {
public void onClick(ClickEvent event)
{
attemptSavePdf(false, new Operation() {
@Override
public void execute()
{
// get options to send back to caller for persistence
PaperSize paperSize = paperSizeEditor_.selectedPaperSize();
SavePlotAsPdfOptions pdfOptions = SavePlotAsPdfOptions.create(
paperSize.getWidth(),
paperSize.getHeight(),
isPortraitOrientation(),
useCairoPdf(),
viewAfterSaveCheckBox_.getValue());
onClose.execute(pdfOptions);
closeDialog();
}
});
}
});
addOkButton(saveButton);
addCancelButton();
ThemedButton previewButton = new ThemedButton("Preview",
new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
// get temp file for preview