import java.util.Collections;
import java.util.List;
-import javax.swing.JCheckBoxMenuItem;
import javax.swing.JInternalFrame;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
}
/**
- * Show only the selected chain(s) in the viewer
- */
- @Override
- 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());
- }
- }
- }
- jmb.showChains(toshow);
- }
-
- /**
* Close down this instance of Jalview's Chimera viewer, giving the user the
* option to close the associated Chimera window (process). They may wish to
* keep it open until they have had an opportunity to save any work.
String chid = new String(
pdb.getId() + ":" + pdb.getChains().elementAt(i).id);
jmb.getChainNames().add(chid);
- jmb.getChainFile().put(chid, file);
+ jmb.addChainFile(chid, file);
}
}