1 14 package org.wings.event; 15 16 import org.wings.externalizer.ExternalizedResource; 17 18 import java.awt.*; 19 20 24 public class SRequestEvent extends AWTEvent { 25 26 27 public static final int DELIVER_START = 50000; 28 29 30 public static final int DELIVER_DONE = DELIVER_START + 1; 31 32 33 public static final int DISPATCH_START = DELIVER_START + 2; 34 35 36 public static final int DISPATCH_DONE = DELIVER_START + 3; 37 38 39 public static final int PROCESS_REQUEST = DELIVER_START + 4; 40 41 42 public static final int REQUEST_START = DELIVER_START + 5; 43 44 45 public static final int REQUEST_END = DELIVER_START + 6; 46 47 52 protected ExternalizedResource requestedResource; 53 54 60 public SRequestEvent(Object aSource, int type, ExternalizedResource requestedResource) { 61 super(aSource, type); 62 63 this.requestedResource = requestedResource; 64 } 65 66 67 public int getType() { 68 return getID(); 69 } 70 71 72 public ExternalizedResource getRequestedResource() { 73 return requestedResource; 74 } 75 76 83 public String paramString() { 84 if (getSource() == null) 85 return "no source"; 86 87 String typeStr; 88 89 switch (getID()) { 90 case DISPATCH_START: 91 typeStr = "DISPATCH_START"; 92 break; 93 case DISPATCH_DONE: 94 typeStr = "DISPATCH_DONE"; 95 break; 96 case DELIVER_START: 97 typeStr = "DELIVER_START"; 98 break; 99 case DELIVER_DONE: 100 typeStr = "DELIVER_DONE"; 101 break; 102 default: 103 typeStr = "unknown type"; 104 } 105 return typeStr; 106 } 107 108 public String toString() { 109 return "SRequestEvent[source=" + source + "; " + paramString() + "]"; 110 } 111 } 112 | Popular Tags |