Changeset 1495 for trunk/autoquest-ui-swt/src/main/java
- Timestamp:
- 04/11/14 11:22:26 (11 years ago)
- Location:
- trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/MainWindow.java
r1237 r1495 53 53 protected TabItem modelsTab; 54 54 protected TabItem guiModelsTab; 55 protected TabItem usabilityTab; 55 56 protected TabItem dataTab; 56 57 protected ConsoleTabComposite consoleTabComposite; … … 58 59 protected ModelsTabComposite modelsTabComposite; 59 60 protected GuiModelTabComposite guiModelTabComposite; 61 protected UsabilityTabComposite usabilityTabComposite; 60 62 protected DataTabComposite dataTabComposite; 61 63 … … 221 223 guiModelTabComposite.updateModelList(); 222 224 } 225 else if (e.item == usabilityTab) { 226 usabilityTabComposite.updateResultList(); 227 } 223 228 else if (e.item == dataTab) { 224 229 dataTabComposite.updateDataList(); … … 252 257 guiModelsTab.setControl(guiModelTabComposite); 253 258 259 usabilityTab = new TabItem(tabFolder, SWT.NONE); 260 usabilityTab.setText("Usability Evaluation Results"); 261 262 usabilityTabComposite = new UsabilityTabComposite(tabFolder, SWT.NO_BACKGROUND); 263 usabilityTab.setControl(usabilityTabComposite); 264 254 265 dataTab = new TabItem(tabFolder, SWT.NONE); 255 266 dataTab.setText("Data"); -
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java
r1424 r1495 91 91 92 92 /** the tree of involved GUI elements of a specific task on the right bottom */ 93 private Tree involved GUIElementsTree;93 private Tree involvedTargetsTree; 94 94 95 95 /** the table containing the parents tasks of a displayed task */ … … 363 363 }); 364 364 365 involved GUIElementsTree =366 VisualizationUtils.create GUIElementsTree(detailsBottomSashForm, "involved GUI elements");365 involvedTargetsTree = 366 VisualizationUtils.createTargetsTree(detailsBottomSashForm, "involved GUI elements"); 367 367 368 368 detailsBottomSashForm.setWeights(new int[] { 2, 3 }); … … 502 502 taskDetailsTree.removeAll(); 503 503 executionVariantsTree.removeAll(); 504 involved GUIElementsTree.removeAll();504 involvedTargetsTree.removeAll(); 505 505 parentTasks.removeAll(); 506 506 } … … 549 549 VisualizationUtils.updateColumnWidths(parentTasks); 550 550 551 VisualizationUtils.addInvolvedTargets(involved GUIElementsTree, task);551 VisualizationUtils.addInvolvedTargets(involvedTargetsTree, task); 552 552 } 553 553 -
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/VisualizationUtils.java
r1424 r1495 23 23 import org.eclipse.swt.events.MenuEvent; 24 24 import org.eclipse.swt.events.SelectionAdapter; 25 import org.eclipse.swt.events.SelectionEvent; 25 26 import org.eclipse.swt.layout.GridData; 26 27 import org.eclipse.swt.widgets.Composite; … … 53 54 class VisualizationUtils { 54 55 55 56 56 /** 57 57 * … … 156 156 * 157 157 */ 158 static Tree create GUIElementsTree(Composite parent, String name) {159 Tree tree = new Tree(parent, SWT.BORDER | SWT. SINGLE);158 static Tree createTargetsTree(Composite parent, String name) { 159 Tree tree = new Tree(parent, SWT.BORDER | SWT.MULTI); 160 160 tree.setHeaderVisible(true); 161 161 … … 307 307 * 308 308 */ 309 static void addInvolvedTargetsHighlighting(final Tree tasks, final Tree involvedTargetsTree) { 310 tasks.addSelectionListener(new SelectionAdapter() { 311 @Override 312 public void widgetSelected(SelectionEvent e) { 313 TreeItem[] selectedItems = tasks.getSelection(); 314 if ((selectedItems.length == 1) && 315 (selectedItems[0].getData() instanceof ITask)) 316 { 317 highlightInvolvedTargets 318 ((ITask) selectedItems[0].getData(), involvedTargetsTree); 319 } 320 } 321 }); 322 323 } 324 325 /** 326 * 327 */ 328 static void highlightInvolvedTargets(ITask task, Tree involvedTargetsTree) { 329 List<IEventTarget> targets = new ArrayList<IEventTarget>(); 330 getInvolvedTargets(task, targets); 331 332 List<TreeItem> itemsToSelect = new LinkedList<TreeItem>(); 333 List<TreeItem> candidateItems = new LinkedList<TreeItem>(); 334 335 for (TreeItem item : involvedTargetsTree.getItems()) { 336 candidateItems.add(item); 337 } 338 339 while (candidateItems.size() > 0) { 340 TreeItem candidate = candidateItems.remove(0); 341 342 if (targets.contains(candidate.getData())) { 343 itemsToSelect.add(candidate); 344 } 345 346 for (TreeItem child : candidate.getItems()) { 347 candidateItems.add(child); 348 } 349 } 350 351 involvedTargetsTree.setSelection 352 (itemsToSelect.toArray(new TreeItem[itemsToSelect.size()])); 353 } 354 355 /** 356 * 357 */ 309 358 static void addExpansionListener(Tree tree, Listener listener) { 310 359 Listener[] listeners = tree.getListeners(SWT.Expand);
Note: See TracChangeset
for help on using the changeset viewer.