X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fgroovy%2FselectColumnsByFeatureAndGroup.groovy;h=aaa34058419712d87d4667b3607450d01c2f3703;hb=8aec33b990bf770a40dd41b1e5175f1aaf200021;hp=8597cc1659488fdf77b98288e214bd5b3491f3a4;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/examples/groovy/selectColumnsByFeatureAndGroup.groovy b/examples/groovy/selectColumnsByFeatureAndGroup.groovy index 8597cc1..aaa3405 100644 --- a/examples/groovy/selectColumnsByFeatureAndGroup.groovy +++ b/examples/groovy/selectColumnsByFeatureAndGroup.groovy @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -23,7 +23,7 @@ import jalview.datamodel.*; import jalview.gui.AlignFrame; import jalview.gui.AlignViewport; import java.util.BitSet; -import javax.swing.JOptionPane; +import jalview.gui.JvOptionPane; import groovy.swing.SwingBuilder; def toselect = getFeatureInput(); // change this to select the desired feature type @@ -81,7 +81,7 @@ for (ala in Jalview.getAlignFrames()) { cs.addElement(i); } ala.viewport.setColumnSelection(cs); - ala.alignPanel.paintAlignment(true); + ala.alignPanel.paintAlignment(true, true); ala.statusBar.setText("Marked "+bs.cardinality()+" columns containing features of type "+toselect) } else { ala.statusBar.setText("No features of type "+toselect+" found."); @@ -92,8 +92,8 @@ return "Found a total of ${nfeat} features across ${nseq} sequences in ${nal} al String getFeatureInput(){ def swingBuilder = new SwingBuilder(); - def response = JOptionPane.showInputDialog( - null, 'Select columns by feature by type','Enter type of feature', JOptionPane.OK_OPTION) + def response = JvOptionPane.showInputDialog( + null, 'Select columns by feature by type','Enter type of feature', JvOptionPane.OK_OPTION) return response - } \ No newline at end of file + }