Ignore:
Timestamp:
09/03/12 12:05:42 (12 years ago)
Author:
sherbold
Message:
  • TextInput? events can now be configured to support a specific type of equality: Lexical, Syntactical, and Semantical
  • the command detextTestInputEvents now allows the definition of the equality of the generated TextInput? events (see above)
File:
1 edited

Legend:

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

    r709 r751  
    1111import de.ugoe.cs.quest.eventcore.gui.KeyPressed; 
    1212import de.ugoe.cs.quest.eventcore.gui.KeyReleased; 
     13import de.ugoe.cs.quest.eventcore.gui.TextInput.TextEquality; 
    1314import de.ugoe.cs.quest.eventcore.guimodel.ITextArea; 
    1415import de.ugoe.cs.quest.eventcore.guimodel.ITextField; 
     
    3435    /** the keys pressed in parallel */ 
    3536    List<VirtualKey> pressedKeys = new ArrayList<VirtualKey>(); 
     37     
     38    private final TextEquality textEqualityType; 
     39     
     40    public TextInputDetector() { 
     41        this(TextEquality.LEXICAL); 
     42    } 
     43     
     44    public TextInputDetector(TextEquality textEqualityType) { 
     45        this.textEqualityType = textEqualityType; 
     46    } 
    3647 
    3748    /** 
     
    156167         
    157168        if ((enteredText != null) && (!"".equals(enteredText))) { 
    158             TextInput textInput = new TextInput(enteredText, textInputEvents); 
     169            TextInput textInput = new TextInput(enteredText, textInputEvents, textEqualityType); 
    159170            return new Event(textInput, eventTarget); 
    160171        } 
Note: See TracChangeset for help on using the changeset viewer.