< prev index next >

src/java.desktop/share/classes/java/awt/SentEvent.java

Print this page




  30 
  31 /**
  32  * A wrapping tag for a nested AWTEvent which indicates that the event was
  33  * sent from another AppContext. The destination AppContext should handle the
  34  * event even if it is currently blocked waiting for a SequencedEvent or
  35  * another SentEvent to be handled.
  36  *
  37  * @author David Mendenhall
  38  */
  39 class SentEvent extends AWTEvent implements ActiveEvent {
  40     /*
  41      * serialVersionUID
  42      */
  43     private static final long serialVersionUID = -383615247028828931L;
  44 
  45     static final int ID =
  46         java.awt.event.FocusEvent.FOCUS_LAST + 2;
  47 
  48     boolean dispatched;
  49     private AWTEvent nested;

  50     private AppContext toNotify;
  51 
  52     SentEvent() {
  53         this(null);
  54     }
  55     SentEvent(AWTEvent nested) {
  56         this(nested, null);
  57     }
  58     SentEvent(AWTEvent nested, AppContext toNotify) {
  59         super((nested != null)
  60                   ? nested.getSource()
  61                   : Toolkit.getDefaultToolkit(),
  62               ID);
  63         this.nested = nested;
  64         this.toNotify = toNotify;
  65     }
  66 
  67     public void dispatch() {
  68         try {
  69             if (nested != null) {




  30 
  31 /**
  32  * A wrapping tag for a nested AWTEvent which indicates that the event was
  33  * sent from another AppContext. The destination AppContext should handle the
  34  * event even if it is currently blocked waiting for a SequencedEvent or
  35  * another SentEvent to be handled.
  36  *
  37  * @author David Mendenhall
  38  */
  39 class SentEvent extends AWTEvent implements ActiveEvent {
  40     /*
  41      * serialVersionUID
  42      */
  43     private static final long serialVersionUID = -383615247028828931L;
  44 
  45     static final int ID =
  46         java.awt.event.FocusEvent.FOCUS_LAST + 2;
  47 
  48     boolean dispatched;
  49     private AWTEvent nested;
  50     @SuppressWarnings("serial") // Not statically typed as Serializable
  51     private AppContext toNotify;
  52 
  53     SentEvent() {
  54         this(null);
  55     }
  56     SentEvent(AWTEvent nested) {
  57         this(nested, null);
  58     }
  59     SentEvent(AWTEvent nested, AppContext toNotify) {
  60         super((nested != null)
  61                   ? nested.getSource()
  62                   : Toolkit.getDefaultToolkit(),
  63               ID);
  64         this.nested = nested;
  65         this.toNotify = toNotify;
  66     }
  67 
  68     public void dispatch() {
  69         try {
  70             if (nested != null) {


< prev index next >