public void run()
{
PrinterJob printJob = PrinterJob.getPrinterJob();
- PageFormat pf = printJob.pageDialog(printJob.defaultPage());
+ PageFormat defaultPage = printJob.defaultPage();
+ PageFormat pf = printJob.pageDialog(defaultPage);
+
+ if (defaultPage == pf)
+ {
+ /*
+ * user cancelled
+ */
+ return;
+ }
printJob.setPrintable(this, pf);
}
sg.setColourScheme(cs);
sg.getGroupColourScheme().setThreshold(
- av.getViewportColourScheme().getThreshold(),
+ av.getResidueShading().getThreshold(),
av.isIgnoreGapsConsensus());
// sg.recalcConservation();
sg.setName("JTreeGroup:" + sg.hashCode());
for (int a = 0; a < aps.length; a++)
{
if (aps[a].av.getGlobalColourScheme() != null
- && aps[a].av.getViewportColourScheme()
+ && aps[a].av.getResidueShading()
.conservationApplied())
{
Conservation c = new Conservation("Group", sg.getSequences(null),