import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import java.util.Vector;
-import javax.swing.JCheckBoxMenuItem;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.SwingUtilities;
{
command = "";
}
- jmb.evalStateCommand(command);
- jmb.evalStateCommand("set hoverDelay=0.1");
+ jmb.executeCommand(command, false);
+ jmb.executeCommand("set hoverDelay=0.1", false);
jmb.setFinishedInit(true);
}
@Override
- void showSelectedChains()
- {
- Vector<String> toshow = new Vector<>();
- for (int i = 0; i < chainMenu.getItemCount(); i++)
- {
- if (chainMenu.getItem(i) instanceof JCheckBoxMenuItem)
- {
- JCheckBoxMenuItem item = (JCheckBoxMenuItem) chainMenu.getItem(i);
- if (item.isSelected())
- {
- toshow.addElement(item.getText());
- }
- }
- }
- jmb.centerViewer(toshow);
- }
-
- @Override
public void closeViewer(boolean closeExternalViewer)
{
// Jmol does not use an external viewer
try
{
- jmb.evalStateCommand(command);
+ jmb.executeCommand(command, false);
} catch (OutOfMemoryError oomerror)
{
new OOMWarning("When trying to add structures to the Jmol viewer!",