JAL-3187 view controller UI api method to show feature settings UI

authorJim Procter <jprocter@issues.jalview.org>
Wed, 12 Feb 2020 17:10:07 +0000 (17:10 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 12 Feb 2020 17:10:07 +0000 (17:10 +0000)
src/jalview/api/AlignViewControllerGuiI.java
src/jalview/gui/AlignFrame.java

index 86e61e7..56414d8 100644 (file)
@@ -62,4 +62,12 @@ public interface AlignViewControllerGuiI
    * @return
    */
   FeatureSettingsControllerI getFeatureSettingsUI();
+
+  /**
+   * displays the Feature Settigns control panel for the alignment view - if one
+   * exists it is closed and re-opened.
+   * 
+   * @return the current feature settings controller
+   */
+  FeatureSettingsControllerI showFeatureSettingsUI();
 }
index fcb6572..f05c118 100644 (file)
@@ -3187,6 +3187,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   @Override
   public void featureSettings_actionPerformed(ActionEvent e)
   {
+    showFeatureSettingsUI();
+  }
+
+  @Override
+  public FeatureSettingsControllerI showFeatureSettingsUI()
+  {
     if (featureSettings != null)
     {
       featureSettings.close();
@@ -3199,6 +3205,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       showSeqFeatures_actionPerformed(null);
     }
     featureSettings = new FeatureSettings(this);
+    return featureSettings;
   }
 
   /**