Changeset 658


Ignore:
Timestamp:
08/28/12 09:58:46 (12 years ago)
Author:
sherbold
Message:
  • extended SWT GUI such that GUI models can be displayed and browsed
Location:
trunk
Files:
2 added
3 edited

Legend:

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

    r488 r658  
    1212 
    1313import de.ugoe.cs.quest.SequenceInstanceOf; 
     14import de.ugoe.cs.quest.eventcore.guimodel.GUIModel; 
    1415import de.ugoe.cs.quest.usageprofiles.IStochasticProcess; 
    1516 
     
    212213                return modelNames; 
    213214        } 
     215         
     216        /** 
     217         * <p> 
     218         * Returns the keys of all {@link GUIModel}s contained in the storage. 
     219         * </p> 
     220         * 
     221         * @return keys of all {@link GUIModel}s contained in the storage 
     222         */ 
     223        public Collection<String> getAllGUIModelNames() { 
     224            Collection<String> modelNames = new LinkedList<String>(); 
     225            for(Entry<String, Object> entry : dataObjects.entrySet()) { 
     226                if( entry.getValue() instanceof GUIModel ) { 
     227                    modelNames.add(entry.getKey()); 
     228                } 
     229            } 
     230            return modelNames; 
     231        } 
    214232 
    215233        /** 
  • trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/DataTabComposite.java

    r655 r658  
    110110    public void updateDataList() { 
    111111        dataList.removeAll(); 
    112         for (String sequencesName : GlobalDataContainer.getInstance().getAllKeys()) { 
    113             dataList.add(sequencesName); 
     112        for (String key : GlobalDataContainer.getInstance().getAllKeys()) { 
     113            dataList.add(key + " (" + GlobalDataContainer.getInstance().getData(key).getClass().toString() + ")"); 
    114114        } 
    115115    } 
  • trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/MainWindow.java

    r655 r658  
    3535    protected TabItem sequencesTab; 
    3636    protected TabItem modelsTab; 
     37    protected TabItem guiModelsTab; 
    3738    protected TabItem dataTab; 
    3839    protected ConsoleTabComposite consoleTabComposite; 
    3940    protected SequencesTabComposite sequencesTabComposite; 
    4041    protected ModelsTabComposite modelsTabComposite; 
     42    protected GuiModelTabComposite guiModelTabComposite; 
    4143    protected DataTabComposite dataTabComposite; 
    4244 
     
    198200                    modelsTabComposite.updateModelList(); 
    199201                } 
     202                else if (e.item == guiModelsTab) { 
     203                    guiModelTabComposite.updateModelList(); 
     204                } 
    200205                else if (e.item == dataTab) { 
    201206                    dataTabComposite.updateDataList(); 
     
    222227        modelsTabComposite = new ModelsTabComposite(tabFolder, SWT.NO_BACKGROUND); 
    223228        modelsTab.setControl(modelsTabComposite); 
     229         
     230        guiModelsTab = new TabItem(tabFolder, SWT.NONE); 
     231        guiModelsTab.setText("GUI Models"); 
     232 
     233        guiModelTabComposite = new GuiModelTabComposite(tabFolder, SWT.NO_BACKGROUND); 
     234        guiModelsTab.setControl(guiModelTabComposite); 
    224235 
    225236        dataTab = new TabItem(tabFolder, SWT.NONE); 
Note: See TracChangeset for help on using the changeset viewer.