Changeset 699


Ignore:
Timestamp:
08/29/12 16:12:50 (12 years ago)
Author:
pharms
Message:
  • moved text input detection from task tree generation to dedicated command to be run on sequences
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/TextInputStatisticsRule.java

    r655 r699  
    77import java.util.Map; 
    88 
     9import de.ugoe.cs.quest.eventcore.gui.TextInput; 
    910import de.ugoe.cs.quest.eventcore.guimodel.ITextArea; 
    1011import de.ugoe.cs.quest.eventcore.guimodel.ITextField; 
     12import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask; 
    1113import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree; 
    1214import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 
    13 import de.ugoe.cs.quest.tasktrees.treeifc.ITextInputEventTask; 
    1415 
    1516/** 
     
    216217     */ 
    217218    private void calculateStatistics(ITaskTreeNode node, TextInputStatistics statistics) { 
    218         if (node instanceof ITextInputEventTask) { 
    219             calculateStatistics((ITextInputEventTask) node, statistics); 
     219        if ((node instanceof IEventTask) && 
     220            (((IEventTask) node).getEventType() instanceof TextInput)) 
     221        { 
     222            calculateStatistics((IEventTask) node, statistics); 
    220223        } 
    221224        else { 
     
    237240     * @param statistics 
    238241     */ 
    239     private void calculateStatistics(ITextInputEventTask node, TextInputStatistics statistics) { 
    240         String[] fragments = determineTextFragments(node.getEnteredText()); 
     242    private void calculateStatistics(IEventTask node, TextInputStatistics statistics) { 
     243        String[] fragments = 
     244            determineTextFragments(((TextInput) node.getEventType()).getEnteredText()); 
    241245 
    242246        if (node.getEventTarget() instanceof ITextField) { 
     
    322326         *  
    323327         */ 
    324         public void addTextFieldInput(ITextInputEventTask node, String[] fragments) { 
     328        public void addTextFieldInput(IEventTask node, String[] fragments) { 
    325329            textFieldInputs.add(new Object[] { node, fragments }); 
    326330        } 
     
    333337         *  
    334338         */ 
    335         public void addTextAreaInput(ITextInputEventTask node, String[] fragments) { 
     339        public void addTextAreaInput(IEventTask node, String[] fragments) { 
    336340            textAreaInputs.add(new Object[] { node, fragments }); 
    337341        } 
Note: See TracChangeset for help on using the changeset viewer.