@Override public void firstLaunchOn(final IDisplaySurface surface) { super.firstLaunchOn(surface); final IExpression eventType = definition.getFacet(IKeyword.NAME); final IExpression actionName = definition.getFacet(IKeyword.ACTION); IScope scope = surface.getDisplayScope(); String currentMouseEvent = Cast.asString(scope, eventType.value(scope)); String currentAction = Cast.asString(scope, actionName.value(scope)); listener = new EventListener(surface, currentMouseEvent, currentAction); surface.addMouseListener(listener); }
@Override public void enableOn(final IDisplaySurface surface) { surface.addMouseListener(listener); }