+ public static List<String> 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
+ public void gapColour_actionPerformed(JPanel gap)
+ {
+ if (!useLegacyGap.isSelected())
+ {
+ Color col = JColorChooser.showDialog(this,
+ MessageManager.getString("label.select_gap_colour"),
+ gapColour.getBackground());
+ if (col != null)
+ {
+ gap.setBackground(col);
+ }
+ gap.repaint();
+ }
+ }
+
+ @Override
+ public void hiddenColour_actionPerformed(JPanel hidden)
+ {
+ Color col = JColorChooser.showDialog(this,
+ MessageManager.getString("label.select_hidden_colour"),
+ hiddenColour.getBackground());
+ if (col != null)
+ {
+ hidden.setBackground(col);
+ }
+ hidden.repaint();
+ }
+
+ @Override
+ protected void useLegacyGaps_actionPerformed(ActionEvent e)
+ {
+ boolean enabled = useLegacyGap.isSelected();
+ if (enabled)
+ {
+ gapColour.setBackground(
+ jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_LEGACY_GAP);
+ }
+ else
+ {
+ gapColour.setBackground(
+ jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP);
+ }
+ gapColour.setEnabled(!enabled);
+ gapLabel.setEnabled(!enabled);
+ }
+
+ @Override
+ protected void resetOvDefaults_actionPerformed(ActionEvent e)
+ {
+ useLegacyGap.setSelected(false);
+ useLegacyGaps_actionPerformed(null);
+ showHiddenAtStart.setSelected(false);
+ hiddenColour.setBackground(
+ jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN);
+ }
+
+ @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)
+ {
+ JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ MessageManager
+ .getString("warn.user_defined_width_requirements"),
+ MessageManager.getString("label.invalid_id_column_width"),
+ JvOptionPane.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())
+ {
+ JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ MessageManager.getString("label.invalid_chimera_path"),
+ MessageManager.getString("label.invalid_name"),
+ JvOptionPane.ERROR_MESSAGE);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * If Chimera or ChimeraX 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)