- Timestamp:
- 08/05/2008 07:44:31 PM (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
development/java/field/core/windowing/T_TransWindow.java
r72 r145 56 56 NSArray windows = application.windows(); 57 57 NSWindow window = null; 58 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 58 for (Enumeration e = windows.objectEnumerator(); e 59 .hasMoreElements();) { 59 60 NSWindow w = (NSWindow) e.nextElement(); 60 61 if (w.title().equals(title)) { … … 65 66 66 67 if (window != null) { 67 window.setBackgroundColor(NSColor.colorWithCalibratedWhite(0, 1.0f)); 68 window.setBackgroundColor(NSColor.colorWithCalibratedWhite( 69 0, 1.0f)); 68 70 69 71 Float o = opacityForWindow.get(title); … … 76 78 77 79 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); 79 83 } 80 84 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); 82 88 } 83 89 t++; … … 87 93 88 94 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(); 110 125 } 111 126 } … … 124 139 NSArray windows = application.windows(); 125 140 NSWindow window = null; 126 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 141 for (Enumeration e = windows.objectEnumerator(); e 142 .hasMoreElements();) { 127 143 NSWindow w = (NSWindow) e.nextElement(); 128 144 if (w.title().equals(title)) { … … 138 154 139 155 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); 141 159 } 142 160 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); 144 164 } 145 165 t++; … … 158 178 NSArray windows = application.windows(); 159 179 NSWindow window = null; 160 for (Enumeration e = windows.objectEnumerator(); e.hasMoreElements();) { 180 for (Enumeration e = windows.objectEnumerator(); e 181 .hasMoreElements();) { 161 182 NSWindow w = (NSWindow) e.nextElement(); 162 183 if (w.title().equals(title)) { … … 190 211 float oalpha2 = oalpha == null ? 0 : oalpha; 191 212 192 opacityForWindow.put(frame.getTitle(), Math.min(oalpha2, alpha)); 213 opacityForWindow 214 .put(frame.getTitle(), Math.min(oalpha2, alpha)); 193 215 194 216 if (t > 10) { … … 217 239 float oalpha2 = oalpha == null ? 0 : oalpha; 218 240 219 opacityForWindow.put(frame.getTitle(), Math.min(alpha, oalpha2)); 241 opacityForWindow 242 .put(frame.getTitle(), Math.min(alpha, oalpha2)); 220 243 if (alpha == 0) { 221 244 frame.setVisible(false); … … 243 266 float oalpha2 = oalpha == null ? 0 : oalpha; 244 267 245 opacityForWindow.put(frame.getTitle(), alpha = Math.max(alpha, oalpha2)); 268 opacityForWindow.put(frame.getTitle(), alpha = Math.max(alpha, 269 oalpha2)); 246 270 if (t > speed) 247 271 Launcher.getLauncher().deregisterUpdateable(this);