From: Charles Ofoegbu Date: Fri, 23 Jan 2015 16:47:20 +0000 (+0000) Subject: JAL-1553 added help documentation and updated AnnotationColumnChooser to exclude... X-Git-Tag: Jalview_2_9~107^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=61d7d669232e22adc47cac9fe8dd9db291d382fe;p=jalview.git JAL-1553 added help documentation and updated AnnotationColumnChooser to exclude MigLayout as it is not supported in applets --- diff --git a/help/help.jhm b/help/help.jhm index af010a4..eafcc68 100755 --- a/help/help.jhm +++ b/help/help.jhm @@ -105,7 +105,8 @@ - + + diff --git a/help/helpTOC.xml b/help/helpTOC.xml index b67eb6f..9cfd17e 100755 --- a/help/helpTOC.xml +++ b/help/helpTOC.xml @@ -90,6 +90,7 @@ + diff --git a/help/html/calculations/AnnotationColumnSelectionWithSM.gif b/help/html/calculations/AnnotationColumnSelectionWithSM.gif new file mode 100644 index 0000000..4373493 Binary files /dev/null and b/help/html/calculations/AnnotationColumnSelectionWithSM.gif differ diff --git a/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif b/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif new file mode 100644 index 0000000..921f028 Binary files /dev/null and b/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif differ diff --git a/help/html/calculations/columnFilterByAnnotation.html b/help/html/calculations/columnFilterByAnnotation.html new file mode 100644 index 0000000..62bfcf1 --- /dev/null +++ b/help/html/calculations/columnFilterByAnnotation.html @@ -0,0 +1,95 @@ + + + +Filter Columns by Annotation + + + +

+ Filter Columns by Annotation +

+

Jalview allows the columns of an alignment to be filtered using + any annotation rows added to that alignment.

+ From "Select" menu + "Select by Annotation..." to bring + up the Select by Annotation window. The filter options vary depending + on the type of annotation selected. If an annotation that has a numeric + values is selected, the threshold filter option is activated as seen in the + figure on the right below. +
+
+ +
+ +
+
+ +
+
 
+ +
    +
  • Select which annotation to base the filtering on using the + top-most selection box.
  • + +
  • Search Filter +
      +
    • When a text is entered in the textfield on the search + filter section, the "Display Label" and "Description" + checkboxes becomes selectable.
    • +
    • On selecting any of the checkboxes, a regular expresion + search (RegEx) is executed on the specified field of the current + annotation row selected, and the matching columns will be highlighted + in the alignment.
    • +
    +
  • Structure Filter +
      +
    • Alignment columns can also be filtered by the type of + secondary structure present in a choosen annotation row.
    • +
    • This can be achieved by ticking the type of structure you + wish to filter by under the structures filter section.
    • +
    +
  • Threshold Filter +
      +
    • This filter is only activated for annotation which contain + numeric values
    • +
    • Select whether to Filter the alignment above or below an + adjustable threshold with the selection box within the threshold + filter section.
    • +
    • Change the threshold value with the slider, or enter the + exact value in the text box.
    • +
    +
  • Actions +
      +
    • The "Select" and "Hide" radio buttons + determines the action that will be carried out on the matching + columns in the alignment during the filtering process.
    • +
    • The default option is "Select" and this simply + enables column selection on the matching alignment column.
    • +
    • While the "Hide" option enables the matching columns to + be hidden automatically during the filtering process.
    • +
    • The "Ok" button applies the filter when clicked.
    • +
    • And finally, The "Cancel" button restores the alignment to its previous state before the filtering when clicked. +
  • +
+ + + diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 5c1de0b..aafb445 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1177,7 +1177,7 @@ label.normalise_logo = Normalise Logo label.no_colour_selection_in_scheme = Please, make a colour selection before to apply colour scheme label.no_colour_selection_warn = Error saving colour scheme label.select_by_annotation = Select By Annotation -action.select_by_annotation = Select by annotation... +action.select_by_annotation = Select by Annotation... label.threshold_filter = Threshold Filter action.hide = Hide action.select = Select diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java index 496d4a4..e25ff8f 100644 --- a/src/jalview/appletgui/AnnotationColumnChooser.java +++ b/src/jalview/appletgui/AnnotationColumnChooser.java @@ -30,7 +30,9 @@ import java.awt.event.TextListener; import java.util.Iterator; import java.util.Vector; -import net.miginfocom.swing.MigLayout; +import javax.swing.JPanel; + +//import net.miginfocom.swing.MigLayout; public class AnnotationColumnChooser extends AnnotationRowFilter implements ActionListener, AdjustmentListener, ItemListener, MouseListener @@ -55,6 +57,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements private BorderLayout borderLayout1 = new BorderLayout(); + private BorderLayout gBorderLayout = new BorderLayout(); + + private BorderLayout ngBorderLayout = new BorderLayout(); + private Choice threshold = new Choice(); private StructureFilterPanel gStructureFilterPanel; @@ -187,15 +193,15 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements thresholdPanel.setBackground(Color.white); thresholdPanel.setFont(JvSwingUtils.getLabelFont()); - thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]")); + // thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]")); actionPanel.setBackground(Color.white); actionPanel.setFont(JvSwingUtils.getLabelFont()); - graphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]")); + graphFilterView.setLayout(gBorderLayout); graphFilterView.setBackground(Color.white); - noGraphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]")); + noGraphFilterView.setLayout(ngBorderLayout); noGraphFilterView.setBackground(Color.white); annotationComboBoxPanel.setBackground(Color.white); @@ -209,21 +215,29 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements ngStructureFilterPanel = new StructureFilterPanel(this); thresholdPanel.setTitle("Threshold Filter"); - thresholdPanel.add(getThreshold(), "grow"); - thresholdPanel.add(thresholdValue, "grow, wrap"); - thresholdPanel.add(slider, "grow, span, wrap"); + thresholdPanel.add(getThreshold()); + thresholdPanel.add(slider); + thresholdPanel.add(thresholdValue); actionPanel.add(ok); actionPanel.add(cancel); - graphFilterView.add(gSearchPanel, "grow, span, wrap"); - graphFilterView.add(gStructureFilterPanel, "grow, span, wrap"); - graphFilterView.add(thresholdPanel, "grow, span, wrap"); - graphFilterView.add(gFurtherActionPanel); + JPanel staticPanel = new JPanel(); + staticPanel.setLayout(new BorderLayout()); + staticPanel.setBackground(Color.white); + + staticPanel.add(gSearchPanel, java.awt.BorderLayout.NORTH); + staticPanel.add(gStructureFilterPanel, java.awt.BorderLayout.SOUTH); + + graphFilterView.add(staticPanel, java.awt.BorderLayout.NORTH); + graphFilterView.add(thresholdPanel, java.awt.BorderLayout.CENTER); + graphFilterView.add(gFurtherActionPanel, java.awt.BorderLayout.SOUTH); - noGraphFilterView.add(ngSearchPanel, "grow, span, wrap"); - noGraphFilterView.add(ngStructureFilterPanel, "grow, span, wrap"); - noGraphFilterView.add(ngFurtherActionPanel); + noGraphFilterView.add(ngSearchPanel, java.awt.BorderLayout.PAGE_START); + noGraphFilterView.add(ngStructureFilterPanel, + java.awt.BorderLayout.CENTER); + noGraphFilterView.add(ngFurtherActionPanel, + java.awt.BorderLayout.CENTER); annotationComboBoxPanel.add(getAnnotations()); switchableViewsPanel.add(noGraphFilterView,