From: Jim Procter Date: Thu, 29 Aug 2024 13:19:37 +0000 (+0100) Subject: JAL-4446 refactor progress listener handler code for reuse X-Git-Tag: Release_2_11_4_0~14^2~6^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=30c13c1638967753f7b1f9c880a92cc7308b1278;p=jalview.git JAL-4446 refactor progress listener handler code for reuse --- 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() {