- Timestamp:
- 08/17/12 11:38:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/SWTHelpers.java
r526 r570 1 1 2 package de.ugoe.cs.quest.ui.swt; 2 3 … … 9 10 10 11 public class SWTHelpers { 11 12 public static boolean deleteSelectedFromStorage(final List list) { 13 String[] selectedStrings = list.getSelection(); 14 if( selectedStrings.length==0 ) { 15 return false; 16 } else { 17 for( String selected : selectedStrings) { 18 String command = "deleteObject " + selected; 19 CommandExecuter.getInstance().exec(command); 20 } 21 return true; 22 } 23 } 24 25 public static void noSelectionError(final Shell shell) { 26 MessageBox messageBox = new MessageBox(shell, SWT.ERROR); 27 messageBox.setMessage("No objects selected!"); 28 messageBox.setText("Error"); 29 messageBox.open(); 30 } 12 13 public static boolean deleteSelectedFromStorage(final List list) { 14 String[] selectedStrings = list.getSelection(); 15 if (selectedStrings.length == 0) { 16 return false; 17 } 18 else { 19 for (String selected : selectedStrings) { 20 String command = "deleteObject " + selected; 21 CommandExecuter.getInstance().exec(command); 22 } 23 return true; 24 } 25 } 26 27 public static void noSelectionError(final Shell shell) { 28 MessageBox messageBox = new MessageBox(shell, SWT.ERROR); 29 messageBox.setMessage("No objects selected!"); 30 messageBox.setText("Error"); 31 messageBox.open(); 32 } 31 33 32 34 }
Note: See TracChangeset
for help on using the changeset viewer.