From d919b93d3c0a57e36c2a90a34a6788bca86bfe81 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 1 May 2014 15:12:07 +0100 Subject: [PATCH] JAL-1497 check to see if tree structure is ready for display, and show a 'tree loading' message if it isn't. --- src/jalview/gui/TreeCanvas.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 9e2e582..97cca4b 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -667,9 +667,12 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, RenderingHints.VALUE_ANTIALIAS_ON); g2.setColor(Color.white); g2.fillRect(0, 0, width, height); - g2.setFont(font); + if (longestName==null || tree ==null) + { + g2.drawString("Calculating tree.",20,20); + } offy = font.getSize() + 10; fm = g2.getFontMetrics(font); -- 1.7.10.2