From 30c13c1638967753f7b1f9c880a92cc7308b1278 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 29 Aug 2024 14:19:37 +0100 Subject: [PATCH] JAL-4446 refactor progress listener handler code for reuse --- src/jalview/gui/PaSiMapPanel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/PaSiMapPanel.java b/src/jalview/gui/PaSiMapPanel.java index 8f45410..6c8d509 100644 --- a/src/jalview/gui/PaSiMapPanel.java +++ b/src/jalview/gui/PaSiMapPanel.java @@ -42,6 +42,7 @@ import jalview.viewmodel.PaSiMapModel; import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Container; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; @@ -226,7 +227,7 @@ public class PaSiMapPanel extends GPaSiMapPanel pap.setQuiet(true); System.out.println(pap != null); - setPairwiseAlignPanel(pap); + addProgressListenerFor(pap); progressBar.registerHandler(progId, new IProgressIndicatorHandler() { @@ -651,7 +652,6 @@ public class PaSiMapPanel extends GPaSiMapPanel cap.dispose(); } } - public void setProgressBar(String message, long id) { @@ -744,7 +744,7 @@ public class PaSiMapPanel extends GPaSiMapPanel * * @param pap */ - public void setPairwiseAlignPanel(PairwiseAlignPanel pap) + public void addProgressListenerFor(Container pap) { pap.addPropertyChangeListener(new PropertyChangeListener() { -- 1.7.10.2