* DOCUMENT ME!
*
* @author $author$
- * @version $Revision$
+ * @version $Revision: 1.130 $
*/
public class SeqPanel extends JPanel implements MouseListener,
MouseMotionListener, MouseWheelListener, SequenceListener,
addMouseMotionListener(this);
addMouseListener(this);
addMouseWheelListener(this);
- ssm = StructureSelectionManager.getStructureSelectionManager();
+ ssm = StructureSelectionManager.getStructureSelectionManager(Desktop.instance);
ssm.addStructureViewerListener(this);
ssm.addSelectionListener(this);
}
.getType()))
{
tmpString = features[i].getDescription();
- int startTag = tmpString.toUpperCase().indexOf("<HTML>");
+ String tmp2up=tmpString.toUpperCase();
+ int startTag = tmp2up.indexOf("<HTML>");
if (startTag > -1)
{
tmpString = tmpString.substring(startTag + 6);
+ tmp2up = tmp2up.substring(startTag+6);
}
- int endTag = tmpString.toUpperCase().indexOf("</BODY>");
+ int endTag = tmp2up.indexOf("</BODY>");
if (endTag > -1)
{
tmpString = tmpString.substring(0, endTag);
+ tmp2up = tmp2up.substring(0, endTag);
}
- endTag = tmpString.toUpperCase().indexOf("</HTML>");
+ endTag = tmp2up.indexOf("</HTML>");
if (endTag > -1)
{
tmpString = tmpString.substring(0, endTag);
// shared between viewports.
if (av == source
|| !av.followSelection
+ || (av.isSelectionGroupChanged(false) || av.isColSelChanged(false))
|| (source instanceof AlignViewport && ((AlignViewport) source)
.getSequenceSetId().equals(av.getSequenceSetId())))
{
// rules are: colsel is copied if there is a real intersection between
// sequence selection
boolean repaint = false, copycolsel = true;
- if (av.selectionGroup == null || !av.isSelectionGroupChanged())
+ // if (!av.isSelectionGroupChanged(false))
{
SequenceGroup sgroup = null;
if (seqsel != null && seqsel.getSize()>0)
sgroup = seqsel.intersect(av.alignment,
(av.hasHiddenRows) ? av.hiddenRepSequences : null);
if ((sgroup == null || sgroup.getSize() == 0)
- && (colsel == null || colsel.size() == 0))
+ || (colsel == null || colsel.size() == 0))
{
// don't copy columns if the region didn't intersect.
copycolsel = false;
{
av.setSelectionGroup(null);
}
- repaint = av.isSelectionGroupChanged();
+ av.isSelectionGroupChanged(true);
+ repaint = true;
}
- if (copycolsel && (av.colSel == null || !av.isColSelChanged()))
+ if (copycolsel)
{
// the current selection is unset or from a previous message
// so import the new colsel.
if (av.colSel != null)
{
av.colSel.clear();
+ repaint=true;
}
}
else
av.colSel.setElementsFrom(colsel);
}
}
- repaint |= av.isColSelChanged();
+ av.isColSelChanged(true);
+ repaint = true;
}
if (copycolsel && av.hasHiddenColumns
&& (av.colSel == null || av.colSel.getHiddenColumns() == null))