Ignore:
Timestamp:
05/19/17 11:31:29 (7 years ago)
Author:
pharms
Message:
  • refactored GUI model so that hierarchical event target structures can also be used and created by plugins not being strictly for GUIs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java

    r1084 r2146  
    2020import java.util.Map; 
    2121 
     22import de.ugoe.cs.autoquest.eventcore.EventTargetModelException; 
     23import de.ugoe.cs.autoquest.eventcore.IEventTargetFactory; 
    2224import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementFactory; 
    2325import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel; 
    24 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 
    25 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementFactory; 
    2626 
    2727/** 
     
    3030 * </p> 
    3131 * <p> 
    32  * The GUIElementTree represents the hierarchical structure of the GUI elements "as it is" currently during 
    33  * a session. It may change during the session due to creation and destruction of GUI elements. The parameter 
    34  * T represents the id type of the GUI elements that are handled internally. 
     32 * The GUIElementTree represents the hierarchical structure of the GUI elements "as it is" 
     33 * currently during a session. It may change during the session due to creation and destruction 
     34 * of GUI elements. The parameter T represents the id type of the GUI elements that are handled 
     35 * internally. 
    3536 * </p> 
    3637 *  
     
    8485     * </p> 
    8586     */ 
    86     private IGUIElementFactory guiElementFactory = GUIElementFactory.getInstance(); 
    87  
    88   
     87    private IEventTargetFactory guiElementFactory = GUIElementFactory.getInstance(); 
    8988 
    9089    /** 
     
    127126     *            the GUI element specification 
    128127     *             
    129      * @throws GUIModelException if the GUI element can not be added to the underlying GUI model 
     128     * @throws EventTargetModelException if the GUI element can not be added to the underlying GUI model 
    130129     */ 
    131130    public void add(T guiElementID, 
    132131                    T parentID, 
    133132                    IGUIElementSpec guiElementSpec) 
    134         throws GUIModelException 
     133        throws EventTargetModelException 
    135134    { 
    136135        IGUIElement guiElement = guiElements.get(guiElementID); 
     
    161160            } 
    162161 
    163             guiElement = guiModel.integratePath(guiElementPath, guiElementFactory); 
     162            guiElement = (IGUIElement) guiModel.integratePath(guiElementPath, guiElementFactory); 
    164163            guiElements.put(guiElementID, guiElement); 
    165164        } 
Note: See TracChangeset for help on using the changeset viewer.