Ignore:
Timestamp:
08/27/12 11:45:09 (12 years ago)
Author:
pharms
Message:
  • adapted implementation to now generate a full GUI model as well as concrete GUI interaction events
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/MessageHandler.java

    r581 r619  
     1 
    12package de.ugoe.cs.quest.plugin.mfc; 
     3 
     4import de.ugoe.cs.quest.plugin.mfc.guimodel.WindowTree; 
    25 
    36/** 
    47 * <p> 
    5  * Base class to define custom message handlers, for messages that shall be 
    6  * handled differently during the parsing of usage logs. It provides dummy 
    7  * implementations for all required methods, such that implementations can only 
    8  * overwrite the parts they actually require and ignore the rest. 
     8 * Base class to define custom message handlers, for messages that shall be handled differently 
     9 * during the parsing of usage logs. It provides dummy implementations for all required methods, 
     10 * such that implementations can only overwrite the parts they actually require and ignore the rest. 
    911 * </p> 
    1012 *  
     
    1416public class MessageHandler { 
    1517 
    16         /** 
    17          * <p> 
    18          * Constructor. Protected to prohibit initialization of the base class 
    19          * itself. 
    20          * </p> 
    21          */ 
    22         protected MessageHandler() { 
    23         } 
     18    /** 
     19     * <p> 
     20     * during parsing, a tree of GUI elements is created and adapted. 
     21     * This is the reference to it. 
     22     * </p> 
     23     */ 
     24    private WindowTree windowTree; 
    2425 
    25         /** 
    26          * <p> 
    27          * Called in the startElement() method of the {@link MFCLogParser} when a 
    28          * msg-node begins. 
    29          * </p> 
    30          */ 
    31         public void onStartElement() { 
    32         } 
     26    /** 
     27     * <p> 
     28     * Constructor. Protected to prohibit initialization of the base class itself. 
     29     * </p> 
     30     *  
     31     * @param windowTree the tree of GUI element specifications to be created and adapted during 
     32     *                   parsing 
     33     */ 
     34    protected MessageHandler(WindowTree windowTree) { 
     35        this.windowTree = windowTree; 
     36    } 
    3337 
    34         /** 
    35          * <p> 
    36          * Called by the {@link MFCLogParser} to handle param-nodes. 
    37          * </p> 
    38          *  
    39          * @param name 
    40          *            name (type) of the parameter 
    41          * @param value 
    42          *            value of the parameter 
    43          */ 
    44         public void onParameter(String name, String value) { 
    45         } 
     38    /** 
     39     * <p> 
     40     * Called in the startElement() method of the {@link MFCLogParser} when a msg-node begins. 
     41     * </p> 
     42     */ 
     43    public void onStartElement() {} 
    4644 
    47         /** 
    48          * <p> 
    49          * Called in the endElement() method of {@link MFCLogParser} when a msg-node 
    50          * ends. 
    51          * </p> 
    52          */ 
    53         public void onEndElement() { 
    54         } 
     45    /** 
     46     * <p> 
     47     * Called by the {@link MFCLogParser} to handle param-nodes. 
     48     * </p> 
     49     *  
     50     * @param name 
     51     *            name (type) of the parameter 
     52     * @param value 
     53     *            value of the parameter 
     54     */ 
     55    public void onParameter(String name, String value) {} 
     56 
     57    /** 
     58     * <p> 
     59     * Called in the endElement() method of {@link MFCLogParser} when a msg-node ends. 
     60     * </p> 
     61     */ 
     62    public void onEndElement() {} 
     63 
     64    /** 
     65     * @return the window tree created and adapted during parsing 
     66     */ 
     67    protected WindowTree getWindowTree() { 
     68        return windowTree; 
     69    } 
     70     
    5571} 
Note: See TracChangeset for help on using the changeset viewer.