Beispiel #1
0
  @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);
  }
Beispiel #2
0
 @Override
 public void dispose() {
   super.dispose();
   listener.dispose();
 }
Beispiel #3
0
 @Override
 public void disableOn(final IDisplaySurface surface) {
   super.disableOn(surface);
   surface.removeMouseListener(listener);
 }
Beispiel #4
0
 @Override
 protected void setPositionAndSize(final IDisplayLayerBox box, final IGraphics g) {
   super.setPositionAndSize(box, g);
 }