X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=daae5a531da9b9a3388913f87f3eaf3bfa64ccca;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=9adb254454542086b87d64d4da277e1530ab3c1b;hpb=416319530fff2c87f9bcbc0f0d568fe4b8566c70;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 9adb254..daae5a5 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. @@ -105,6 +105,12 @@ public class FeatureSettings extends JPanel table.getValueAt(selectedRow, 1), fr.minmax, evt.getX(), evt.getY()); } + else if (evt.getClickCount() == 2) + { + fr.ap.alignFrame.avc.markColumnsContainingFeatures( + evt.isAltDown(),evt.isShiftDown() || evt.isMetaDown(), evt.isMetaDown(), + (String) table.getValueAt(selectedRow, 0)); + } } }); @@ -132,7 +138,8 @@ public class FeatureSettings extends JPanel } } }); - + table.setToolTipText(""+JvSwingUtils + .wrapTooltip("Click/drag feature types up or down to change render order.
Double click to select columns containing feature in alignment/current selection
Pressing Alt will select columns outside features rather than inside
Pressing Shift to modify current selection (rather than clear current selection)
Press CTRL or Command/Meta to toggle columns in/outside features
")+""); scrollPane.setViewportView(table); dassourceBrowser = new DasSourceBrowser(this); @@ -298,7 +305,7 @@ public class FeatureSettings extends JPanel @Override public void actionPerformed(ActionEvent arg0) { - fr.ap.alignFrame.avc.markColumnsContainingFeatures(false, type); + fr.ap.alignFrame.avc.markColumnsContainingFeatures(false, false, false, type); } }); JMenuItem clearCols = new JMenuItem(MessageManager.getString("label.select_columns_not_containing")); @@ -308,7 +315,7 @@ public class FeatureSettings extends JPanel @Override public void actionPerformed(ActionEvent arg0) { - fr.ap.alignFrame.avc.markColumnsContainingFeatures(true, type); + fr.ap.alignFrame.avc.markColumnsContainingFeatures(true, false, false, type); } }); men.add(selCols); @@ -1152,13 +1159,13 @@ public class FeatureSettings extends JPanel private String[] getDisplayedFeatureGroups() { String[] gps = null; + ArrayList _gps = new ArrayList(); if (fr != null) { if (fr.featureGroups != null) { Iterator en = fr.featureGroups.keySet().iterator(); - gps = new String[fr.featureColours.size()]; int g = 0; boolean valid = false; while (en.hasNext()) @@ -1168,16 +1175,15 @@ public class FeatureSettings extends JPanel if (on != null && on.booleanValue()) { valid = true; - gps[g++] = gp; + _gps.add(gp); } } - while (g < gps.length) - { - gps[g++] = null; - } if (!valid) { return null; + } else { + gps = new String[_gps.size()]; + _gps.toArray(gps); } } }