*/
package jalview.gui;
-import java.awt.Color;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Vector;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JColorChooser;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
-import javax.swing.JRadioButtonMenuItem;
-
import jalview.analysis.AAFrequency;
import jalview.analysis.AlignmentAnnotationUtils;
import jalview.analysis.AlignmentUtils;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JColorChooser;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
+
/**
* DOCUMENT ME!
*
JMenu jMenu1 = new JMenu();
- JMenuItem proteinStructureMenu = new JMenuItem();
+ JMenuItem pdbStructureDialog = new JMenuItem();
JMenu rnaStructureMenu = new JMenu();
}
else
{
+ int origCount = rnaStructureMenu.getItemCount();
/*
* add menu items to 2D-render any alignment or sequence secondary
* structure annotation
}
}
}
+ if (rnaStructureMenu.getItemCount() == origCount)
+ {
+ remove(rnaStructureMenu);
+ }
}
menuItem = new JMenuItem(
if (seq == null)
{
sequenceMenu.setVisible(false);
- proteinStructureMenu.setVisible(false);
+ pdbStructureDialog.setVisible(false);
rnaStructureMenu.setVisible(false);
}
}
});
jMenu1.setText(MessageManager.getString("label.group"));
- proteinStructureMenu.setText(MessageManager
- .getString("label.view_protein_structure"));
- proteinStructureMenu.addActionListener(new ActionListener()
+ pdbStructureDialog.setText(MessageManager
+ .getString("label.show_pdbstruct_dialog"));
+ pdbStructureDialog.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent actionEvent)
add(groupMenu);
add(sequenceMenu);
add(rnaStructureMenu);
- add(proteinStructureMenu);
+ add(pdbStructureDialog);
if (sequence!=null)
{
add(hideInsertions);