1 package text.event; 2 3 import java.awt.event.MouseEvent ; 4 5 public class ClickEvent 6 { 7 protected boolean consumed = false; 8 9 10 public void consume() 11 { 12 consumed = true; 13 } 14 15 16 public boolean isConsumed() 17 { 18 return consumed; 19 } 20 21 public boolean isAcknowledged() 22 { 23 return ack; 24 } 25 26 public void acknowledge() 27 { 28 ack = true; 29 } 30 31 protected boolean ack; 32 protected String context; 33 protected String word; 34 protected MouseEvent event; 35 36 public MouseEvent getEvent() 37 { 38 return event; 39 } 40 41 public ClickEvent(String _word, String _context, MouseEvent _event) 42 { 43 context = _context; 44 word = _word; 45 event = _event; 46 } 47 48 49 public String getClickedText() 50 { 51 return word; 52 } 53 54 55 public String getContext() 56 { 57 return context; 58 } 59 } 60 | Popular Tags |