Field
Show
Ignore:
Timestamp:
08/05/2008 07:44:31 PM (5 months ago)
Author:
hyposurface@hyposurface-corporations-mac-pro.local
branch:
default
Message:

various fixes to classloader based on work in Boston

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • development/java/field/core/windowing/T_TransWindow.java

    r72 r145  
    5656                                NSArray windows = application.windows(); 
    5757                                NSWindow window = null; 
    58                                 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 
     58                                for (Enumeration e = windows.objectEnumerator(); e 
     59                                                .hasMoreElements();) { 
    5960                                        NSWindow w = (NSWindow) e.nextElement(); 
    6061                                        if (w.title().equals(title)) { 
     
    6566 
    6667                                if (window != null) { 
    67                                         window.setBackgroundColor(NSColor.colorWithCalibratedWhite(0, 1.0f)); 
     68                                        window.setBackgroundColor(NSColor.colorWithCalibratedWhite( 
     69                                                        0, 1.0f)); 
    6870 
    6971                                        Float o = opacityForWindow.get(title); 
     
    7678 
    7779                                if (t == 3) { 
    78                                         frame.setBounds(frame.getBounds().x, frame.getBounds().y, frame.getBounds().width + 1, frame.getBounds().height); 
     80                                        frame.setBounds(frame.getBounds().x, frame.getBounds().y, 
     81                                                        frame.getBounds().width + 1, 
     82                                                        frame.getBounds().height); 
    7983                                } 
    8084                                if (t == 4) { 
    81                                         frame.setBounds(frame.getBounds().x, frame.getBounds().y, frame.getBounds().width - 1, frame.getBounds().height); 
     85                                        frame.setBounds(frame.getBounds().x, frame.getBounds().y, 
     86                                                        frame.getBounds().width - 1, 
     87                                                        frame.getBounds().height); 
    8288                                } 
    8389                                t++; 
     
    8793 
    8894        static public void notDraggable(Frame frame) { 
    89                 String title = frame.getTitle(); 
    90  
    91                 NSApplication application = NSApplication.sharedApplication(); 
    92                 NSArray windows = application.windows(); 
    93                 NSWindow window = null; 
    94                 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 
    95                         NSWindow w = (NSWindow) e.nextElement(); 
    96                         if (w.title().equals(title)) { 
    97                                 window = w; 
    98                                 break; 
    99                         } 
    100                 } 
    101  
    102                 if (window != null) { 
    103                         System.out.println(" set window as not draggable "); 
    104                         final NSWindow fwindow = window; 
    105                         Launcher.getLauncher().registerUpdateable(new iUpdateable(){ 
    106  
    107                                 public void update() { 
    108                                         fwindow.setMovableByWindowBackground(false); 
    109                                 }}); 
     95                if (true) 
     96                        return; 
     97 
     98                try { 
     99                        String title = frame.getTitle(); 
     100 
     101                        NSApplication application = NSApplication.sharedApplication(); 
     102                        NSArray windows = application.windows(); 
     103                        NSWindow window = null; 
     104                        for (Enumeration e = windows.objectEnumerator(); e 
     105                                        .hasMoreElements();) { 
     106                                NSWindow w = (NSWindow) e.nextElement(); 
     107                                if (w.title().equals(title)) { 
     108                                        window = w; 
     109                                        break; 
     110                                } 
     111                        } 
     112 
     113                        if (window != null) { 
     114                                System.out.println(" set window as not draggable "); 
     115                                final NSWindow fwindow = window; 
     116                                Launcher.getLauncher().registerUpdateable(new iUpdateable() { 
     117 
     118                                        public void update() { 
     119                                                fwindow.setMovableByWindowBackground(false); 
     120                                        } 
     121                                }); 
     122                        } 
     123                } catch (Exception t) { 
     124                        t.printStackTrace(); 
    110125                } 
    111126        } 
     
    124139                                NSArray windows = application.windows(); 
    125140                                NSWindow window = null; 
    126                                 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 
     141                                for (Enumeration e = windows.objectEnumerator(); e 
     142                                                .hasMoreElements();) { 
    127143                                        NSWindow w = (NSWindow) e.nextElement(); 
    128144                                        if (w.title().equals(title)) { 
     
    138154 
    139155                                if (t == 3) { 
    140                                         frame.setBounds(frame.getBounds().x, frame.getBounds().y, frame.getBounds().width + 1, frame.getBounds().height); 
     156                                        frame.setBounds(frame.getBounds().x, frame.getBounds().y, 
     157                                                        frame.getBounds().width + 1, 
     158                                                        frame.getBounds().height); 
    141159                                } 
    142160                                if (t == 4) { 
    143                                         frame.setBounds(frame.getBounds().x, frame.getBounds().y, frame.getBounds().width - 1, frame.getBounds().height); 
     161                                        frame.setBounds(frame.getBounds().x, frame.getBounds().y, 
     162                                                        frame.getBounds().width - 1, 
     163                                                        frame.getBounds().height); 
    144164                                } 
    145165                                t++; 
     
    158178                                NSArray windows = application.windows(); 
    159179                                NSWindow window = null; 
    160                                 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 
     180                                for (Enumeration e = windows.objectEnumerator(); e 
     181                                                .hasMoreElements();) { 
    161182                                        NSWindow w = (NSWindow) e.nextElement(); 
    162183                                        if (w.title().equals(title)) { 
     
    190211                                float oalpha2 = oalpha == null ? 0 : oalpha; 
    191212 
    192                                 opacityForWindow.put(frame.getTitle(), Math.min(oalpha2, alpha)); 
     213                                opacityForWindow 
     214                                                .put(frame.getTitle(), Math.min(oalpha2, alpha)); 
    193215 
    194216                                if (t > 10) { 
     
    217239                                float oalpha2 = oalpha == null ? 0 : oalpha; 
    218240 
    219                                 opacityForWindow.put(frame.getTitle(), Math.min(alpha, oalpha2)); 
     241                                opacityForWindow 
     242                                                .put(frame.getTitle(), Math.min(alpha, oalpha2)); 
    220243                                if (alpha == 0) { 
    221244                                        frame.setVisible(false); 
     
    243266                                float oalpha2 = oalpha == null ? 0 : oalpha; 
    244267 
    245                                 opacityForWindow.put(frame.getTitle(), alpha = Math.max(alpha, oalpha2)); 
     268                                opacityForWindow.put(frame.getTitle(), alpha = Math.max(alpha, 
     269                                                oalpha2)); 
    246270                                if (t > speed) 
    247271                                        Launcher.getLauncher().deregisterUpdateable(this);