package jalview.jbgui;
import jalview.gui.JvSwingUtils;
-import jalview.gui.StructureViewer.Viewer;
+import jalview.gui.StructureViewer.ViewerType;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
protected JPanel maxColour = new JPanel();
- protected JComboBox<String> colour = new JComboBox<String>();
+ protected JComboBox<String> protColour = new JComboBox<String>();
+
+ protected JComboBox<String> nucColour = new JComboBox<String>();
/*
* Connections tab components
maxColour_actionPerformed(maxColour);
}
});
- colour.setFont(verdana11);
- colour.setBounds(new Rectangle(172, 225, 155, 21));
- JLabel colourLabel = new JLabel();
- colourLabel.setFont(verdana11);
- colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
- colourLabel.setText(MessageManager.getString("label.alignment_colour")
+
+ protColour.setFont(verdana11);
+ protColour.setBounds(new Rectangle(172, 225, 155, 21));
+ JLabel protColourLabel = new JLabel();
+ protColourLabel.setFont(verdana11);
+ protColourLabel.setHorizontalAlignment(SwingConstants.LEFT);
+ protColourLabel.setText(MessageManager
+ .getString("label.prot_alignment_colour") + " ");
+ JvSwingUtils.addtoLayout(coloursTab, MessageManager
+ .getString("label.default_colour_scheme_for_alignment"),
+ protColourLabel, protColour);
+
+ nucColour.setFont(verdana11);
+ nucColour.setBounds(new Rectangle(172, 240, 155, 21));
+ JLabel nucColourLabel = new JLabel();
+ nucColourLabel.setFont(verdana11);
+ nucColourLabel.setHorizontalAlignment(SwingConstants.LEFT);
+ nucColourLabel.setText(MessageManager
+ .getString("label.nuc_alignment_colour")
+ " ");
JvSwingUtils.addtoLayout(coloursTab, MessageManager
.getString("label.default_colour_scheme_for_alignment"),
- colourLabel, colour);
+ nucColourLabel, nucColour);
+
JPanel annotationShding = new JPanel();
annotationShding.setBorder(new TitledBorder(MessageManager
.getString("label.annotation_shading_default")));
structViewer.setFont(verdana11);
structViewer.setBounds(new Rectangle(160, ypos, 120, height));
- structViewer.addItem(Viewer.JMOL.name());
- structViewer.addItem(Viewer.CHIMERA.name());
+ structViewer.addItem(ViewerType.JMOL.name());
+ structViewer.addItem(ViewerType.CHIMERA.name());
+ structViewer.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ structureViewer_actionPerformed((String) structViewer
+ .getSelectedItem());
+ }
+ });
structureTab.add(structViewer);
ypos += lineSpacing;
}
/**
+ * Action on choosing a structure viewer from combobox options.
+ *
+ * @param selectedItem
+ */
+ protected void structureViewer_actionPerformed(String selectedItem)
+ {
+ }
+
+ /**
* Show a dialog for the user to choose a file. Returns the chosen path, or
* null on Cancel.
*