+ public static Collection getGroupURLLinks()
+ {
+ return groupURLLinks;
+ }
+
+ @Override
+ public void minColour_actionPerformed(JPanel panel)
+ {
+ Color col = JColorChooser.showDialog(this,
+ MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground());
+ if (col != null)
+ {
+ panel.setBackground(col);
+ }
+ panel.repaint();
+ }
+
+ @Override
+ public void maxColour_actionPerformed(JPanel panel)
+ {
+ Color col = JColorChooser.showDialog(this,
+ MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground());
+ if (col != null)
+ {
+ panel.setBackground(col);
+ }
+ panel.repaint();
+ }
+
+ @Override
+ protected void userIdWidth_actionPerformed()
+ {
+ try
+ {
+ String val = userIdWidth.getText().trim();
+ if (val.length() > 0)
+ {
+ Integer iw = Integer.parseInt(val);
+ if (iw.intValue() < 12)
+ {
+ throw new NumberFormatException();
+ }
+ userIdWidth.setText(iw.toString());
+ }
+ } catch (NumberFormatException x)
+ {
+ JOptionPane
+ .showInternalMessageDialog(
+ Desktop.desktop,
+ MessageManager.getString("warn.user_defined_width_requirements"),
+ MessageManager.getString("label.invalid_id_column_width"),
+ JOptionPane.WARNING_MESSAGE);
+ userIdWidth.setText("");
+ }
+ }
+
+ @Override
+ protected void autoIdWidth_actionPerformed()
+ {
+ userIdWidth.setEnabled(!autoIdWidth.isSelected());
+ userIdWidthlabel.setEnabled(!autoIdWidth.isSelected());
+ }
+
+ /**
+ * Returns true if chimera path is to a valid executable, else show an error
+ * dialog.
+ */
+ private boolean validateChimeraPath()
+ {
+ if (chimeraPath.getText().trim().length() > 0)
+ {
+ File f = new File(chimeraPath.getText());
+ if (!f.canExecute())
+ {
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ MessageManager.getString("label.invalid_chimera_path"),
+ MessageManager.getString("label.invalid_name"),
+ JOptionPane.ERROR_MESSAGE);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * If Chimera is selected, check it can be found on default or user-specified
+ * path, if not show a warning/help dialog.
+ */
+ @Override
+ protected void structureViewer_actionPerformed(String selectedItem)