1 31 32 package org.antlr.xjlib.appkit.gview.event; 33 34 import org.antlr.xjlib.appkit.gview.GView; 35 import org.antlr.xjlib.appkit.gview.object.GElement; 36 37 import java.awt.*; 38 import java.awt.event.MouseEvent ; 39 40 public abstract class GAbstractEvent { 41 42 protected GEventManager manager = null; 43 protected GEventDelegate delegate = null; 44 45 protected GView view = null; 46 47 public GAbstractEvent(GView view) { 48 this.view = view; 49 } 50 51 public void setDelegate(GEventDelegate delegate) { 52 this.delegate = delegate; 53 } 54 55 public void setManager(GEventManager manager) { 56 this.manager = manager; 57 } 58 59 public void addExclusiveValue(Object value) { 60 manager.addExclusiveValue(value); 61 } 62 63 public void removeExclusiveValue(Object value) { 64 manager.removeExclusiveValue(value); 65 } 66 67 public boolean hasExclusiveValue(Object value) { 68 return manager.hasExclusiveValue(value); 69 } 70 71 public boolean shouldFocusOnElement(GElement element) { 72 return true; 73 } 74 75 public void mousePressed(MouseEvent e, Point mousePosition) { 76 77 } 78 79 public void mouseReleased(MouseEvent e, Point mousePosition) { 80 81 } 82 83 public void mouseDragged(MouseEvent e, Point mousePosition) { 84 85 } 86 87 public void mouseMoved(MouseEvent e, Point mousePosition) { 88 89 } 90 91 public void draw(Graphics g) { 92 93 } 94 95 } 96 | Popular Tags |