public void mouseMoved(MouseEvent e) {}\r
\r
public void selectSeqs(int start, int end) {\r
- if (end < start) {\r
+ if (end < start)\r
+ {\r
int tmp = start;\r
start = end;\r
end = tmp;\r
int y = e.getY();\r
int seq = av.getIndex(y);\r
\r
-\r
-\r
-\r
if (seq < lastid)\r
selectSeqs(lastid - 1, seq);\r
else if (seq > lastid)\r
int y = e.getY();\r
int seq = av.getIndex(y);\r
\r
+ selectedSequenceGroup = av.getRubberbandGroup();\r
+ if (selectedSequenceGroup == null)\r
+ {\r
+ selectedSequenceGroup = new SequenceGroup();\r
+ av.setRubberbandGroup(selectedSequenceGroup);\r
+ }\r
\r
- if( javax.swing.SwingUtilities.isRightMouseButton(e))\r
- {\r
- jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu( av , alignPanel.seqPanel);\r
- pop.show(this, e.getX(), y);\r
-\r
-\r
- /* String id = av.getAlignment().getSequenceAt(seq).getName();\r
- String s = (String)JOptionPane.showInternalInputDialog(\r
- this,\r
- "Edit sequence name",\r
- "Edit sequence name",\r
- JOptionPane.PLAIN_MESSAGE,\r
- null,\r
- null,\r
- id);\r
-\r
- if(s!=null)\r
- {\r
- av.getAlignment().getSequenceAt(seq).setName(s);\r
- alignPanel.RefreshPanels();\r
- }*/\r
-\r
- }\r
- else\r
- {\r
+ selectedSequenceGroup.setStartRes(0);\r
+ selectedSequenceGroup.setEndRes(av.getAlignment().getWidth() - 1);\r
\r
- selectedSequenceGroup = av.getRubberbandGroup();\r
- if(selectedSequenceGroup==null)\r
- {\r
- selectedSequenceGroup = new SequenceGroup();\r
- av.setRubberbandGroup(selectedSequenceGroup);\r
- }\r
+ if (seq != -1)\r
+ selectSeqs(seq, seq);\r
\r
- selectedSequenceGroup.setStartRes(0);\r
- selectedSequenceGroup.setEndRes( av.getAlignment().getWidth()-1 );\r
+ lastid = seq;\r
\r
- // selectedSequenceGroup = av.alignment.findGroup(seq);\r
+ if( javax.swing.SwingUtilities.isRightMouseButton(e))\r
+ {\r
+ jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu(alignPanel, av.getAlignment().getSequenceAt(seq) );\r
+ pop.show(this, e.getX(), y);\r
+ }\r
\r
- if (seq != -1)\r
- selectSeqs(seq,seq);\r
\r
- lastid = seq;\r
- }\r
return;\r
}\r
\r