Changeset 750 for trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt
- Timestamp:
- 09/03/12 10:57:43 (12 years ago)
- Location:
- trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/EditSequenceDialog.java
r659 r750 24 24 protected Shell shell; 25 25 private Table table; 26 private TableColumn tblclmnEventIndex; 26 27 private TableColumn tblclmnEventType; 27 28 private TableColumn tblclmnEventTarget; … … 71 72 table.setHeaderVisible(true); 72 73 table.setLinesVisible(true); 74 75 tblclmnEventIndex = new TableColumn(table, SWT.NONE); 76 tblclmnEventIndex.setAlignment(20); 77 73 78 74 79 tblclmnEventType = new TableColumn(table, SWT.NONE); … … 166 171 private void updateTableContents() { 167 172 table.removeAll(); 173 int index = 1; 168 174 for (Event event : sequence) { 169 175 TableItem tableItem = new TableItem(table, SWT.NONE); … … 178 184 } 179 185 tableItem.setText(new String[] 180 { event.getType().toString(), target });186 { ""+(index++), event.getType().toString(), target }); 181 187 } 182 188 for (int i = 0; i < table.getColumnCount(); i++) { … … 186 192 187 193 private void openInsertDialog(int position) { 188 InsertAssertionDialog insertDialog = new InsertAssertionDialog(shell, SWT.NONE, guiModel); 189 Event event = insertDialog.open(); 190 if (event != null) { 191 sequence.add(position, event); 192 updateTableContents(); 194 if (guiModel == null) { 195 MessageBox messageBox = new MessageBox(shell, SWT.ERROR); 196 messageBox.setMessage("Operation not supported!\nOnly works for GUI sequences."); 197 messageBox.setText("Error"); 198 messageBox.open(); 199 } else { 200 InsertAssertionDialog insertDialog = new InsertAssertionDialog(shell, SWT.NONE, guiModel); 201 Event event = insertDialog.open(); 202 if (event != null) { 203 sequence.add(position, event); 204 updateTableContents(); 205 } 193 206 } 194 207 } -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/SequencesDialog.java
r667 r750 133 133 guiModel = (GUIModel) targetObject; 134 134 } 135 if (guiModel == null) {136 MessageBox messageBox = new MessageBox(shell, SWT.ERROR);137 messageBox.setMessage("Operation not supported!\nOnly works for GUI sequences.");138 messageBox.setText("Error");139 messageBox.open();140 }141 135 } 142 136 else {
Note: See TracChangeset
for help on using the changeset viewer.