AlignViewport av;\r
AlignmentPanel ap;\r
Frame frame;\r
- SuperGroup searchGroup;\r
\r
SearchResults searchResults;\r
\r
\r
public void createNewGroup_actionPerformed()\r
{\r
- Color[] newColors = new Color[24];\r
- for (int i = 0; i < 24; i++)\r
- {\r
- newColors[i] = new Color(60, 160, 115);\r
- }\r
-\r
- jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(\r
- newColors);\r
- String searchString = textfield.getText();\r
-\r
- searchGroup = new SuperGroup(searchString, ucs, true, true, false);\r
\r
for (int i = 0; i < searchResults.getSize(); i ++ )\r
{\r
- // its possible edits may have occurred since search was performed\r
- // account for this here\r
-\r
- SequenceI seq = searchResults.getResultSequence(i);\r
- int startRes = seq.findIndex(searchResults.getResultStart(i)) - 1;\r
- int endRes = seq.findIndex(searchResults.getResultEnd(i)) - 1;\r
+ SequenceI seq = searchResults.getResultSequence(i);\r
\r
- SequenceGroup sg = new SequenceGroup(searchString, ucs, true, true, false,\r
- startRes, endRes);\r
- sg.addSequence(seq, false);\r
- av.alignment.addGroup(sg);\r
- searchGroup.addGroup(sg);\r
+ SequenceFeature sf = new SequenceFeature(textfield.getText(),\r
+ "Search Results", null,\r
+ searchResults.getResultStart(i),\r
+ searchResults.getResultEnd(i));\r
\r
+ ap.seqPanel.seqCanvas.getFeatureRenderer().addNewFeature(\r
+ textfield.getText(), new Color(60,160,115));\r
+ seq.addSequenceFeature(sf);\r
}\r
\r
- ap.av.alignment.addSuperGroup(searchGroup);\r
+ ap.alignFrame.sequenceFeatures.setState(true);\r
+ av.showSequenceFeatures(true);\r
ap.highlightSearchResults(null);\r
}\r
\r
gridLayout1.setVgap(2);\r
createNewGroup.setEnabled(false);\r
createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));\r
- createNewGroup.setLabel("Create new group");\r
+ createNewGroup.setLabel("New Feature");\r
createNewGroup.addActionListener(this);\r
jPanel1.add(findNext, null);\r
jPanel1.add(findAll, null);\r