void closeFeatureSettings(FeatureSettingsControllerI featureSettings,
boolean closeContainingFrame);
+ /**
+ *
+ * @return true if a feature settings panel is currently open
+ */
+ boolean isFeatureSettingsOpen();
+
}
viewport = alignPanel.av;
avc.setViewportAndAlignmentPanel(viewport, alignPanel);
setMenusFromViewport(viewport);
+ if (featureSettings != null && featureSettings.isOpen()
+ && featureSettings.fr.getViewport() != viewport)
+ {
+ if (viewport.isShowSequenceFeatures())
+ {
+ // refresh the featureSettings to reflect UI change
+ showFeatureSettingsUI();
+ }
+ else
+ {
+ // close feature settings for this view.
+ featureSettings.close();
+ }
+ }
+
}
/*
// transfer reference for existing feature settings to new alignFrame
if (ap == af.alignPanel)
{
- newaf.featureSettings = viewFeatureSettings;
+ newaf.featureSettings = (viewFeatureSettings.fr.ap == ap)
+ ? viewFeatureSettings
+ : null;
newaf.setFeatureSettingsGeometry(fsBounds);
}
addInternalFrame(newaf, af.getTitle(), AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
+ // and materialise a new feature settings dialog instance for the new alignframe
+ // (closes the old as if 'OK' was pressed)
+ if (ap == af.alignPanel && newaf.featureSettings != null
+ && newaf.featureSettings.isOpen()
+ && af.alignPanel.getAlignViewport().isShowSequenceFeatures())
+ {
+ newaf.showFeatureSettingsUI();
+ }
}
af.alignPanels.clear();
if (gatherThis)
{
- if (af.featureSettings != null)
+ if (af.featureSettings != null && af.featureSettings.isOpen())
{
if (source.featureSettings == null)
{
}
}
}
+ // refresh the feature setting UI for the source frame if it exists
+ if (source.featureSettings != null
+ && source.featureSettings.isOpen())
+ {
+ source.showFeatureSettingsUI();
+ }
}
return button;
}
}
+
+ public boolean isOpen()
+ {
+ if (af.getSplitViewContainer() != null)
+ {
+ return af.getSplitViewContainer().isFeatureSettingsOpen();
+ }
+ return frame != null && !frame.isClosed();
+ }
}
class FeatureIcon implements Icon