Changeset 1275
- Timestamp:
- 07/26/13 08:29:32 (11 years ago)
- Location:
- trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/GuiModelTabComposite.java
r927 r1275 30 30 /** 31 31 * <p> 32 * TODO comment32 * listing GUI models contained in the data store 33 33 * </p> 34 34 * 35 * @version $Revision: $ $Date: Aug 28, 2012$ 36 * @author 2012, last modified by $Author: sherbold$ 35 * @author 2012, Steffen Herbold, Patrick Harms 37 36 */ 38 37 public class GuiModelTabComposite extends Composite { … … 42 41 /** 43 42 * Create the composite. 44 *45 * @param parent46 * @param style47 43 */ 48 44 public GuiModelTabComposite(Composite parent, int style) { … … 51 47 } 52 48 49 /** 50 * <p> 51 * fills the list of available GUI models and provides buttons for their detailed visualization 52 * </p> 53 */ 53 54 private void createContents() { 54 55 setLayout(new GridLayout(5, false)); … … 61 62 @Override 62 63 public void widgetSelected(SelectionEvent e) { 63 // TODO64 64 String[] selectedStrings = guiModelList.getSelection(); 65 65 if (selectedStrings.length == 0) { … … 92 92 } 93 93 94 /** 95 * Disable the check that prevents subclassing of SWT components 96 */ 94 97 @Override 95 98 protected void checkSubclass() { … … 97 100 } 98 101 102 /** 103 * <p> 104 * convenience method for updating the list of available GUI models 105 * </p> 106 */ 99 107 public void updateModelList() { 100 108 guiModelList.removeAll(); -
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/SWTHelpers.java
r1094 r1275 23 23 24 24 /** 25 * TODO comment 25 * <p> 26 * class containing convenience methods for the SWT UI 27 * </p> 26 28 * 27 29 * @author Steffen Herbold, Patrick Harms … … 30 32 31 33 /** 32 * 34 * deletes the objects selected in the provided list from the data store 33 35 */ 34 36 public static boolean deleteSelectedFromStorage(final List list) { … … 47 49 48 50 /** 49 * 51 * alerts, that no object is selected but a selection is required 50 52 */ 51 53 public static void noSelectionError(final Shell shell) { … … 58 60 59 61 /** 60 * 62 * alerts, that too many objects are selected but a selection of only one is required 61 63 */ 62 64 public static void moreThanOneSelectedError(final Shell shell) { -
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java
r1262 r1275 50 50 /** 51 51 * <p> 52 * TODO comment52 * a dialog to inspect the tasks and task instances of a task model 53 53 * </p> 54 54 * … … 57 57 public class ShowTaskTreeDialog extends Dialog { 58 58 59 /** */59 /** the main shell */ 60 60 protected Shell shell; 61 61 62 /** */62 /** the tree of task instances on the left */ 63 63 private Tree instanceTree; 64 64 65 /** */65 /** the tree of tasks (model) on the right*/ 66 66 private Tree modelTree; 67 67 68 /** */68 /** the displayed task model */ 69 69 protected ITaskModel taskModel; 70 70 71 71 /** 72 * 72 * creates the dialog 73 73 */ 74 74 public ShowTaskTreeDialog(Shell parent, int style, ITaskModel taskModel, String taskTreeName) { … … 79 79 80 80 /** 81 * 81 * displays the dialog 82 82 */ 83 83 public void open() { … … 94 94 95 95 /** 96 * 96 * creates the two views, one on the task instances on the left, on on the task models on the 97 * right. Also adds a selection adapter to the task instances so that for a selected task 98 * instance always the respective model is presented. 97 99 */ 98 100 private void createContents() { … … 154 156 155 157 /** 156 * 158 * convenience method for creating the display of the instances 157 159 */ 158 160 private void buildInstanceTree() { … … 169 171 170 172 /** 171 * 173 * convenience method for creating the display of the instances 172 174 */ 173 175 private void buildInstanceTree(TreeItem currentParent, ITaskInstanceList taskInstanceList) { … … 182 184 183 185 /** 184 * 186 * convenience method for creating the display of the task model 185 187 */ 186 188 private void buildModelTree(ITaskModel taskModel) { … … 213 215 214 216 /** 215 * 217 * convenience method for creating the display of the task model 216 218 */ 217 219 private void buildModelTree(ITaskInstance taskInstance) { … … 227 229 228 230 /** 229 * 231 * reduces the list of tasks in a model so that it only contains root nodes and that it is 232 * sorted starting with the most complex task first 230 233 */ 231 234 private List<ITask> createSortedTaskList(Collection<ITask> tasks) { … … 241 244 @Override 242 245 public int compare(ITask task1, ITask task2) { 243 return depth(task 1) - depth(task2);246 return depth(task2) - depth(task1); 244 247 } 245 248 … … 263 266 264 267 /** 265 * 268 * convenience method for removed all non root tasks of the provided list 266 269 */ 267 270 private void removeChildren(ITask task, Set<ITask> result) { … … 269 272 for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) { 270 273 result.remove(child); 271 //removeChildren(child, result);272 274 } 273 275 } 274 276 else if (task instanceof IMarkingTemporalRelationship) { 275 277 result.remove(((IMarkingTemporalRelationship) task).getMarkedTask()); 276 //removeChildren(((IMarkingTemporalRelationship) task).getMarkedTask(), result); 277 } 278 } 279 280 /** 281 * 278 } 279 } 280 281 /** 282 * expands all nodes in the tree 282 283 */ 283 284 private void expandAll(Tree tree, boolean expanded) { … … 288 289 289 290 /** 290 * 291 * expands all nodes in the tree 291 292 */ 292 293 private void expandAll(TreeItem item, boolean expanded, int maxChildrenToExpand) { … … 305 306 306 307 /** 307 * 308 * ensures, that the children of a specific node are loaded 308 309 */ 309 310 private void ensureChildren(TreeItem parent) { … … 333 334 334 335 /** 335 * 336 * convenience method to create a tree item for a task 336 337 */ 337 338 private void createTreeItemFor(ITask task, TreeItem parent) {
Note: See TracChangeset
for help on using the changeset viewer.