if(!canEdit){
return;
}
double selX=((double)e.getX()/_param.scale)-_param.xmargin;
double selY=((double)e.getY()/_param.scale)-_param.ymargin;
ContextualActionProvider p = null;
boolean isLink = false;
for (int i=ShapesContainer.this.size()-1;i>=0; i--) { // outer Vector API
Object o = get(i);
if (! (o instanceof Shape)) continue;
if (((Shape)o).contains(selX,selY)) {
if (o instanceof Linkable) {
String l = ((Linkable)o).getLink();
if ((l!=null) && !l.equals("")) isLink = true;
}
if (! (o instanceof ContextualActionProvider)) continue;
p = (ContextualActionProvider)o;
break;
}
}
if ((lastProviderOver != p) && (lastProviderOver != null)) {
updateCursor();
if (JSynoptic.gui!=null && !JSynoptic.gui.getLockedShapes().contains(lastProviderOver)) {
String[] s = lastProviderOver.getActions(selX,selY,getElementContainer().getSelection(),ContextualActionProvider.MOUSE_OUT_CONTEXT);
if (s!=null) {
for (int i = 0; i<s.length; ++i) {
lastProviderOver.doAction(selX,selY,getElementContainer().getSelection(),s[i], null);
}
}
}
}
if (p!=null) {
if (JSynoptic.gui!=null && JSynoptic.gui.getLockedShapes().contains(p)) {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
} else {
String[] s = p.getActions(selX,selY,getElementContainer().getSelection(),ContextualActionProvider.MOUSE_OVER_CONTEXT);
if (s!=null) {
for (int i = 0; i<s.length; ++i) {
p.doAction(selX,selY,getElementContainer().getSelection(),s[i], null);
}
}
}
}
if (isLink) {