Ignore:
Timestamp:
09/06/12 16:47:00 (12 years ago)
Author:
sherbold
Message:
  • code documentation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseClickCondenser.java

    r721 r786  
    1 // Module    : $RCSfile: MouseClickCondenser.java,v $ 
    2 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 31.08.2012 $ 
    3 // Project   : quest-core-events 
    4 // Creation  : 2012 by pharms 
    5 // Copyright : Patrick Harms, 2012 
     1 
    62package de.ugoe.cs.quest.eventcore.gui; 
    73 
     
    1410/** 
    1511 * <p> 
    16  * This class condenses mouse clicks, i.e. it reduces a sequence of mouse button down, 
    17  * mouse button up and mouse click with the same button on the same event target to a single 
    18  * mouse click with that button on that target. The mouse button down and mouse button up events 
    19  * are discarded. For this, it iterates the provided sequence and identifies any match of the named 
    20  * event sequence pattern. This match is condensed to the mouse click event. 
     12 * This class condenses mouse clicks, i.e. it reduces a sequence of mouse button down, mouse button 
     13 * up and mouse click with the same button on the same event target to a single mouse click with 
     14 * that button on that target. The mouse button down and mouse button up events are discarded. For 
     15 * this, it iterates the provided sequence and identifies any match of the named event sequence 
     16 * pattern. This match is condensed to the mouse click event. 
    2117 * </p> 
    2218 *  
    23  * @version $Revision: $ $Date: 31.08.2012$ 
    24  * @author 2012, last modified by $Author: pharms$ 
     19 * @version 1.0 
     20 * @author Patrick Harms 
    2521 */ 
    2622public class MouseClickCondenser { 
     
    2925     * <p> 
    3026     * This method performs the work described in the description of the class. A new list is 
    31      * instantiated and returned. This list is filled with the events provided by the sequence 
    32      * being the parameter of the method except for mouse button down and mouse button up events 
    33      * which are followed by a mouse click event with the same button on the same target. 
     27     * instantiated and returned. This list is filled with the events provided by the sequence being 
     28     * the parameter of the method except for mouse button down and mouse button up events which are 
     29     * followed by a mouse click event with the same button on the same target. 
    3430     * </p> 
    3531     *  
    36      * @param sequence the event sequence to condense the mouse clicks in 
     32     * @param sequence 
     33     *            the event sequence to condense the mouse clicks in 
    3734     *  
    3835     * @return the resulting sequence, in which mouse clicks are condensed to single mouse click 
     
    4138    public List<Event> condenseMouseClicks(List<Event> sequence) { 
    4239        List<Event> resultingSequence = new LinkedList<Event>(); 
    43          
     40 
    4441        int index = 0; 
    4542        while (index < sequence.size()) // -2 because we don't need to go to the end 
Note: See TracChangeset for help on using the changeset viewer.