}
}
- abstract void showSelectedChains();
-
/**
* Action on selecting one of Jalview's registered colour schemes
*/
ColourSchemeI cs = ColourSchemes.getInstance()
.getColourScheme(colourSchemeName, getAlignmentPanel().av, al,
null);
- getBinding().setJalviewColourScheme(cs);
+ getBinding().colourByJalviewColourScheme(cs);
}
/**
buildColourMenu();
}
- @Override
- public void setJalviewColourScheme(ColourSchemeI cs)
- {
- getBinding().setJalviewColourScheme(cs);
- }
-
/**
* Sends commands to the structure viewer to superimpose structures based on
* currently associated alignments. May optionally return an error message for
return tm;
}
- /**
- * End the progress bar with the specified handle, leaving a message (if not
- * null) on the status bar
- *
- * @param msg
- * @param handle
- */
+ @Override
public void stopProgressBar(String msg, long handle)
{
if (progressBar != null)
}
}
- @Override
- public void stopProgressBar(Object object, long handle)
- {
- }
-
protected IProgressIndicator getProgressIndicator()
{
return progressBar;
// default does nothing
}
+ /**
+ * Show only the selected chain(s) in the viewer
+ */
+ protected void showSelectedChains()
+ {
+ List<String> toshow = new ArrayList<>();
+ for (int i = 0; i < chainMenu.getItemCount(); i++)
+ {
+ if (chainMenu.getItem(i) instanceof JCheckBoxMenuItem)
+ {
+ JCheckBoxMenuItem item = (JCheckBoxMenuItem) chainMenu.getItem(i);
+ if (item.isSelected())
+ {
+ toshow.add(item.getText());
+ }
+ }
+ }
+ getBinding().showChains(toshow);
+ }
+
}