X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=examples%2Fgroovy%2FselectColumnsByFeatureAndGroup.groovy;h=aaa34058419712d87d4667b3607450d01c2f3703;hb=8aec33b990bf770a40dd41b1e5175f1aaf200021;hp=0b479bfb68bdc4b0840bed43876ac806df31406d;hpb=e7fe72efc50689e00ac40bb33bdb5c8a78eeaecb;p=jalview.git diff --git a/examples/groovy/selectColumnsByFeatureAndGroup.groovy b/examples/groovy/selectColumnsByFeatureAndGroup.groovy index 0b479bf..aaa3405 100644 --- a/examples/groovy/selectColumnsByFeatureAndGroup.groovy +++ b/examples/groovy/selectColumnsByFeatureAndGroup.groovy @@ -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 + }