import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.Random;
-import java.util.Set;
import java.util.Vector;
import javax.swing.JCheckBoxMenuItem;
// TODO Auto-generated method stub
}
});
+ JMenuItem writeFeatures = new JMenuItem(
+ MessageManager.getString("label.create_chimera_attributes"));
+ writeFeatures.setToolTipText(MessageManager
+ .getString("label.create_chimera_attributes_tip"));
+ writeFeatures.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ sendFeaturesToChimera();
+ }
+ });
+ viewerActionMenu.add(writeFeatures);
+ }
+
+ /**
+ * Send a command to Chimera to create residue attributes for Jalview features
+ * <p>
+ * The syntax is: setattr r <attName> <attValue> <atomSpec>
+ * <p>
+ * For example: setattr r jv:chain "Ferredoxin-1, Chloroplastic" #0:94.A
+ */
+ protected void sendFeaturesToChimera()
+ {
+ jmb.sendFeaturesToChimera(getAlignmentPanel());
}
/**
int confirm = JOptionPane.showConfirmDialog(this, prompt,
MessageManager.getString("label.close_viewer"),
JOptionPane.YES_NO_CANCEL_OPTION);
- if (confirm == JOptionPane.CANCEL_OPTION)
+ /*
+ * abort closure if user hits escape or Cancel
+ */
+ if (confirm == JOptionPane.CANCEL_OPTION
+ || confirm == JOptionPane.CLOSED_OPTION)
{
return;
}
setChainMenuItems(jmb.getChainNames());
this.setTitle(jmb.getViewerTitle("Chimera", true));
- if (jmb.getPdbFile().length > 1 && jmb.getSequence().length > 1)
- {
+ // if (jmb.getPdbFile().length > 1 && jmb.getSequence().length > 1)
+ // {
viewerActionMenu.setVisible(true);
- }
+ // }
if (!jmb.isLoadingFromArchive())
{
seqColour_actionPerformed(null);