Changeset 154 for trunk/src/org/expeditee/actions/Misc.java
- Timestamp:
- 07/22/08 10:05:32 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Misc.java
r140 r154 103 103 String errorMessage = "Error deleting " + deletedFrame; 104 104 try { 105 if (FrameIO.DeleteFrame(toDelete)) { 105 String deletedFrameName = FrameIO.DeleteFrame(toDelete); 106 if (deletedFrameName != null) { 107 DisplayIO.Back(); 108 //Remove any links on the previous frame to the one being deleted 106 109 Frame current = DisplayIO.getCurrentFrame(); 107 110 for (Item i : current.getItems()) … … 111 114 i.setLink(null); 112 115 } 113 DisplayIO.Back();114 FrameGraphics.Repaint();115 MessageBay.displayMessage(deletedFrame + " deleted");116 MessageBay.displayMessage(deletedFrame + " renamed " 117 + deletedFrameName); 118 //FrameGraphics.Repaint(); 116 119 return; 117 120 } … … 302 305 303 306 public static void getUnicodeCharacters(int start, int finish) { 304 if (start < 0 && finish < 0){307 if (start < 0 && finish < 0) { 305 308 throw new RuntimeException("Parameters must be non negative"); 306 309 } 307 // Swap the start and finish if they are inthe wrong order308 if (start > finish){310 // Swap the start and finish if they are inthe wrong order 311 if (start > finish) { 309 312 start += finish; 310 finish = start -finish;313 finish = start - finish; 311 314 start = start - finish; 312 315 } 313 316 StringBuilder charList = new StringBuilder(); 314 317 int count = 0; 315 charList.append(String.format("Unicode block 0x%x - 0x%x", start, finish)); 318 charList.append(String.format("Unicode block 0x%x - 0x%x", start, 319 finish)); 316 320 System.out.println(); 317 //charList.append("Unicode block: ").append(String.format(format, args)) 318 for (char i = (char)start; i < (char)finish; i++) { 321 // charList.append("Unicode block: ").append(String.format(format, 322 // args)) 323 for (char i = (char) start; i < (char) finish; i++) { 319 324 if (Character.isDefined(i)) { 320 if (count++ % 64 == 0)325 if (count++ % 64 == 0) 321 326 charList.append(Text.LINE_SEPARATOR); 322 327 charList.append(Character.valueOf(i)); … … 325 330 attachTextToCursor(charList.toString()); 326 331 } 327 332 328 333 /** 329 334 * Gets a single block of Unicode characters. 330 * @param start the start of the block 335 * 336 * @param start 337 * the start of the block 331 338 */ 332 339 public static void getUnicodeCharacters(int start) { 333 getUnicodeCharacters(start, start + 256);334 } 335 340 getUnicodeCharacters(start, start + 256); 341 } 342 336 343 public static void getMathSymbols() { 337 getUnicodeCharacters('\u2200', '\u2300');344 getUnicodeCharacters('\u2200', '\u2300'); 338 345 } 339 346 … … 442 449 String frameName = ImageFrame(loaded, format, path); 443 450 if (frameName != null) 444 MessageBay.displayMessage("Frame successfully saved to " 445 + path +frameName);451 MessageBay.displayMessage("Frame successfully saved to " + path 452 + frameName); 446 453 else 447 454 MessageBay.errorMessage("Could not find image writer for " … … 471 478 // TODO is there a built in method which will do this faster? 472 479 473 MessageBay.displayMessage("Copying file " + existingFile 474 + " to " +newFileName + "...");480 MessageBay.displayMessage("Copying file " + existingFile + " to " 481 + newFileName + "..."); 475 482 FrameIO.copyFile(existingFile, newFileName); 476 483 MessageBay.displayMessage("File copied successfully");
Note:
See TracChangeset
for help on using the changeset viewer.