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;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
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;
pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
pathLabel.setHorizontalAlignment(SwingConstants.LEFT);
pathLabel.setText(MessageManager.getString("label.chimera_path"));
- pathLabel.setToolTipText(MessageManager
- .getString("label.chimera_path_tip"));
+ final String tooltip = JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.chimera_path_tip"));
+ pathLabel.setToolTipText(tooltip);
pathLabel.setBounds(new Rectangle(10, ypos, 140, height));
structureTab.add(pathLabel);
});
structureTab.add(chimeraPath);
- structureTab.addFocusListener(new FocusAdapter()
- {
- @Override
- public void focusLost(FocusEvent e)
- {
- validateStructure(e);
- }
-
- });
return structureTab;
}
/**
+ * 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.
*