+
+ JMenuItem writeFeatures = new JMenuItem(
+ MessageManager.getString("label.create_viewer_attributes"));
+ writeFeatures.setToolTipText(MessageManager.formatMessage(
+ "label.create_viewer_attributes_tip", chimera));
+ writeFeatures.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ sendFeaturesToViewer();
+ }
+ });
+ viewerActionMenu.add(writeFeatures);
+
+ final JMenu fetchAttributes = new JMenu(MessageManager.formatMessage(
+ "label.fetch_viewer_attributes", chimera));
+ fetchAttributes.setToolTipText(MessageManager.formatMessage(
+ "label.fetch_viewer_attributes_tip", chimera));
+ fetchAttributes.addMouseListener(new MouseAdapter()
+ {
+
+ @Override
+ public void mouseEntered(MouseEvent e)
+ {
+ buildAttributesMenu(fetchAttributes);
+ }
+ });
+ viewerActionMenu.add(fetchAttributes);
+ }
+
+ /**
+ * Asks Chimera for residues with the given attribute name, and set as
+ * features on the corresponding sequence positions (if any)
+ *
+ * @param attName
+ */
+ @Override
+ protected void getResidueAttributes(String attName)
+ {
+ jmb.copyStructureAttributesToFeatures(attName, getAlignmentPanel());
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected void sendFeaturesToViewer()
+ {
+ jmb.sendFeaturesToViewer(getAlignmentPanel());