Ignore:
Timestamp:
07/22/08 10:05:32 (16 years ago)
Author:
ra33
Message:

Fixing bugs for Rob

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/Misc.java

    r140 r154  
    103103                String errorMessage = "Error deleting " + deletedFrame;
    104104                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
    106109                                Frame current = DisplayIO.getCurrentFrame();
    107110                                for (Item i : current.getItems())
     
    111114                                                i.setLink(null);
    112115                                        }
    113                                 DisplayIO.Back();
    114                                 FrameGraphics.Repaint();
    115                                 MessageBay.displayMessage(deletedFrame + " deleted");
     116                                MessageBay.displayMessage(deletedFrame + " renamed "
     117                                                + deletedFrameName);
     118                                //FrameGraphics.Repaint();
    116119                                return;
    117120                        }
     
    302305
    303306        public static void getUnicodeCharacters(int start, int finish) {
    304                 if(start < 0 && finish < 0){
     307                if (start < 0 && finish < 0) {
    305308                        throw new RuntimeException("Parameters must be non negative");
    306309                }
    307                 //Swap the start and finish if they are inthe wrong order
    308                 if(start > finish){
     310                // Swap the start and finish if they are inthe wrong order
     311                if (start > finish) {
    309312                        start += finish;
    310                         finish = start-finish;
     313                        finish = start - finish;
    311314                        start = start - finish;
    312315                }
    313316                StringBuilder charList = new StringBuilder();
    314317                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));
    316320                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++) {
    319324                        if (Character.isDefined(i)) {
    320                                 if(count++ % 64 == 0)
     325                                if (count++ % 64 == 0)
    321326                                        charList.append(Text.LINE_SEPARATOR);
    322327                                charList.append(Character.valueOf(i));
     
    325330                attachTextToCursor(charList.toString());
    326331        }
    327        
     332
    328333        /**
    329334         * 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
    331338         */
    332339        public static void getUnicodeCharacters(int start) {
    333                 getUnicodeCharacters(start,start + 256);
    334         }
    335        
     340                getUnicodeCharacters(start, start + 256);
     341        }
     342
    336343        public static void getMathSymbols() {
    337                 getUnicodeCharacters('\u2200','\u2300');
     344                getUnicodeCharacters('\u2200', '\u2300');
    338345        }
    339346
     
    442449                        String frameName = ImageFrame(loaded, format, path);
    443450                        if (frameName != null)
    444                                 MessageBay.displayMessage("Frame successfully saved to "
    445                                                 + path + frameName);
     451                                MessageBay.displayMessage("Frame successfully saved to " + path
     452                                                + frameName);
    446453                        else
    447454                                MessageBay.errorMessage("Could not find image writer for "
     
    471478                        // TODO is there a built in method which will do this faster?
    472479
    473                         MessageBay.displayMessage("Copying file " + existingFile
    474                                         + " to " + newFileName + "...");
     480                        MessageBay.displayMessage("Copying file " + existingFile + " to "
     481                                        + newFileName + "...");
    475482                        FrameIO.copyFile(existingFile, newFileName);
    476483                        MessageBay.displayMessage("File copied successfully");
Note: See TracChangeset for help on using the changeset viewer.