- Timestamp:
- 01/27/12 14:44:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/SequencesDialog.java
r287 r364 116 116 if( SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 117 117 sequences = (Collection<java.util.List<Event<?>>>) dataObject; 118 int seqDigits = 4; // TODO calculate seqDigits dynamically118 int seqDigits = Integer.toString(sequences.size()).length(); 119 119 int counter = 1; 120 120 for( java.util.List<Event<?>> sequence : sequences ) { 121 String seqName = "#"+ Integer.toString(counter, seqDigits)+": "+sequence.size();121 String seqName = "#"+String.format("%0"+seqDigits+"d", counter)+": "+sequence.size(); 122 122 sequenceList.add(seqName); 123 123 counter++; … … 144 144 } 145 145 } else { 146 // TODO this should not happen - needs to be handled anyways 146 MessageBox messageBox = new MessageBox(shell, SWT.ERROR); 147 messageBox.setMessage("Internal error. Sequences object not of expected type!"); 148 messageBox.setText("Error"); 149 messageBox.open(); 147 150 } 148 151 }
Note: See TracChangeset
for help on using the changeset viewer.