document = canvas.raster.document;
// If the document does not have link so ...
if(document.linkTargets.count == 0) return;
// Otherwise we need to fire focusout for the
// current link target
SVGGroupElem node = (SVGGroupElem)document.linkTargets.data[document.linkIndex];
if(node != null)
{
event = new SVGEvent(SVGEvent.EVENT_FOCUSOUT, node);
canvas.postEvent(event);
}
// Remove links from the linkTargets
document.linkTargets.count = document.linkIndex = 0;
break;
case SVGEvent.EVENT_FOCUSIN:
node = (SVGGroupElem)theEvent.data;
if( node!= null)
{
node.showBounds = true;
event = new SVGEvent(SVGEvent.EVENT_UPDATE,node.getDevBounds(canvas.raster));
canvas.postEvent(event);
}
break;
case SVGEvent.EVENT_FOCUSNEXT:
document = canvas.raster.document;
// If the document does not have link so ...
if(document.linkTargets.count == 0) return;
if((document.linkIndex + 1)== document.linkTargets.count) return;
// hide the old link
node = (SVGGroupElem)document.linkTargets.data[document.linkIndex];
if(node != null)
{
event = new SVGEvent(SVGEvent.EVENT_FOCUSOUT, node);
canvas.postEvent(event);
}
document.linkIndex++;
// show the new link
node = (SVGGroupElem)document.linkTargets.data[document.linkIndex];
if(node != null)
{
event = new SVGEvent(SVGEvent.EVENT_FOCUSIN, node);
canvas.postEvent(event);
}
break;
case SVGEvent.EVENT_FOCUSOUT:
node = (SVGGroupElem)theEvent.data;
if( node!= null)
{
node.showBounds = false;
event = new SVGEvent(SVGEvent.EVENT_UPDATE,node.getDevBounds(canvas.raster));
canvas.postEvent(event);
}
break;
case SVGEvent.EVENT_FOCUSPRESSED: