Changeset 958 for trunk/autoquest-core-events/src/main/java/de/ugoe
- Timestamp:
- 10/30/12 14:00:22 (12 years ago)
- Location:
- trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/Event.java
r927 r958 16 16 17 17 import java.io.Serializable; 18 import java.util.HashMap; 18 19 import java.util.LinkedList; 19 20 import java.util.List; 21 import java.util.Map; 20 22 21 23 /** … … 30 32 * Can be used to declare that events belong to a specific platform without subclassing. 31 33 */ 32 public class Event implements Serializable {34 public final class Event implements Serializable { 33 35 34 36 /** … … 57 59 * </p> 58 60 */ 59 pr otectedIEventType type;61 private IEventType type; 60 62 61 63 /** 62 64 * </p> Target of the event. 63 65 */ 64 protected IEventTarget target = null; 66 private IEventTarget target = null; 67 68 /** 69 * <p> 70 * Map with further parameters of the event, which are not belonging to the type or target. 71 * </p> 72 */ 73 private Map<String, String> parameters = new HashMap<String, String>(); 65 74 66 75 /** … … 71 80 * </p> 72 81 */ 73 pr otectedList<IReplayable> replay = new LinkedList<IReplayable>();82 private List<IReplayable> replay = new LinkedList<IReplayable>(); 74 83 75 84 /** … … 235 244 /** 236 245 * <p> 237 * Adds a {@link List} istof {@link IReplayable} to the replay sequence.246 * Adds a {@link List} of {@link IReplayable} to the replay sequence. 238 247 * </p> 239 248 * … … 249 258 replay.addAll(generatedReplaySeq); 250 259 } 260 261 /** 262 * <p> 263 * Adds a parameter to the event or sets it to a new value. The key must not be null. If a 264 * parameter with the specified key already exists, its value is replaced with the new one. 265 * If the value is null, the parameter with the specified key is removed, if it exists. 266 * </p> 267 * 268 * @param key the key of the parameter 269 * @param value the value of the parameter 270 * 271 * @throws IllegalArgumentException 272 * if the provided key is null 273 */ 274 public void setParameter(String key, String value) { 275 if (key == null) { 276 throw new IllegalArgumentException("key must not be null"); 277 } 278 279 if (value == null) { 280 parameters.remove(key); 281 } 282 else { 283 parameters.put(key, value); 284 } 285 } 286 287 /** 288 * <p> 289 * Returns the event parameter with the specified key if it exists or null if not. The key 290 * must not be null. 291 * </p> 292 * 293 * @param key the key of the parameter to be returned 294 * 295 * @return the value of the parameter with the specified key or null if there is no parameter 296 * with that key 297 * 298 * @throws IllegalArgumentException 299 * if the provided key is null 300 */ 301 public String getParameter(String key) { 302 if (key == null) { 303 throw new IllegalArgumentException("key must not be null"); 304 } 305 306 return parameters.get(key); 307 } 251 308 252 309 /** -
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/gui/MouseClickCondenser.java
r957 r958 29 29 * provided sequence and identifies any match of the named event sequence pattern. This match is 30 30 * condensed to the mouse click event. 31 * </p>32 * <p>33 * This class does not create events of proper type if the events are not of type {@link Event}34 * but derived from it.35 31 * </p> 36 32 * TODO correctly identify drag and drop
Note: See TracChangeset
for help on using the changeset viewer.