From 7ec8c23d92c88099a6378cc60e896e4c90ada5e7 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 18 Feb 2015 11:08:00 +0000 Subject: [PATCH] JAL-1482 refactor setTableData to more sensible name for feature settings api --- src/jalview/api/FeatureSettingsControllerI.java | 2 ++ src/jalview/appletgui/FeatureSettings.java | 7 ++++--- src/jalview/controller/FeatureSettingsController.java | 3 ++- src/jalview/gui/FeatureSettings.java | 9 ++++++--- src/jalview/ws/DasSequenceFeatureFetcher.java | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/jalview/api/FeatureSettingsControllerI.java b/src/jalview/api/FeatureSettingsControllerI.java index c718e36..2bcd667 100644 --- a/src/jalview/api/FeatureSettingsControllerI.java +++ b/src/jalview/api/FeatureSettingsControllerI.java @@ -2,5 +2,7 @@ package jalview.api; public interface FeatureSettingsControllerI { + + void discoverAllFeatureData(); } diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index b51906d..2b79256 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -64,7 +64,7 @@ import java.util.Vector; public class FeatureSettings extends Panel implements ItemListener, MouseListener, MouseMotionListener, ActionListener, - AdjustmentListener + AdjustmentListener, FeatureSettingsControllerI { FeatureRenderer fr; @@ -114,7 +114,7 @@ public class FeatureSettings extends Panel implements ItemListener, fr.findAllFeatures(true); // was default - now true to make all visible } - setTableData(); + discoverAllFeatureData(); this.setLayout(new BorderLayout()); scrollPane = new ScrollPane(); @@ -279,7 +279,8 @@ public class FeatureSettings extends Panel implements ItemListener, men.show(this.featurePanel, x, y); } - public void setTableData() + @Override + public void discoverAllFeatureData() { if (fr.getAllFeatureColours()!=null && fr.getAllFeatureColours().size()>0) { diff --git a/src/jalview/controller/FeatureSettingsController.java b/src/jalview/controller/FeatureSettingsController.java index ebf4958..7dd1399 100644 --- a/src/jalview/controller/FeatureSettingsController.java +++ b/src/jalview/controller/FeatureSettingsController.java @@ -3,7 +3,8 @@ package jalview.controller; import jalview.api.FeatureRenderer; import jalview.api.FeatureSettingsModelI; -public class FeatureSettingsController implements jalview.api.FeatureSettingsControllerI +public class FeatureSettingsController // implements + // jalview.api.FeatureSettingsControllerI { FeatureSettingsControllerGuiI settingUI; FeatureRenderer fr; diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 918fc02..940a216 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.FeatureSettingsControllerI; import jalview.bin.Cache; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; @@ -88,7 +89,8 @@ import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; -public class FeatureSettings extends JPanel +public class FeatureSettings extends JPanel implements + FeatureSettingsControllerI { DasSourceBrowser dassourceBrowser; @@ -227,7 +229,7 @@ public class FeatureSettings extends JPanel fr.findAllFeatures(true); // display everything! } - setTableData(); + discoverAllFeatureData(); final PropertyChangeListener change; final FeatureSettings fs = this; fr.addPropertyChangeListener(change = new PropertyChangeListener() @@ -421,7 +423,8 @@ public class FeatureSettings extends JPanel */ Hashtable typeWidth = null; - synchronized public void setTableData() + @Override + synchronized public void discoverAllFeatureData() { Vector allFeatures = new Vector(); Vector allGroups = new Vector(); diff --git a/src/jalview/ws/DasSequenceFeatureFetcher.java b/src/jalview/ws/DasSequenceFeatureFetcher.java index e22aa12..3db663d 100644 --- a/src/jalview/ws/DasSequenceFeatureFetcher.java +++ b/src/jalview/ws/DasSequenceFeatureFetcher.java @@ -587,7 +587,7 @@ public class DasSequenceFeatureFetcher if (af != null && af.featureSettings != null) { - af.featureSettings.setTableData(); + af.featureSettings.discoverAllFeatureData(); } if (getFeatSettings() != null) -- 1.7.10.2