KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > SwingWTUtils


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    Log is at the end of this file now since it had gotten rather large.
11
12 */

13
14
15 package swingwtx.swing;
16
17 import org.eclipse.swt.SWT;
18 import org.eclipse.swt.widgets.*;
19
20 import java.io.*;
21 import java.net.*;
22 import java.util.*;
23
24 /**
25  * Utilities required for SwingWT. Handles management
26  * of SWT display, SwingWT event pump and some handy stuff
27  * for calculating renderered text size, determining
28  * platform, etc.
29  *
30  * @author Robin Rawson-Tetley
31  */

32 public abstract class SwingWTUtils {
33
34     private static boolean isDebug = true;
35     public static boolean showInternalSWTExceptions = true;
36     
37     private final static String JavaDoc VERSION = "0.83 (070504)";
38     private final static String JavaDoc COPYRIGHT = "This is SwingWT (http://swingwt.sourceforge.net)\n" +
39                                             "Version: " + VERSION + "\n" +
40                                             "Copyright(c)2003-2004, R.Rawson-Tetley and other contributors.\n\n" +
41                                             "This library is distributed in the hope that it will be useful,\n" +
42                                             "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +
43                                             "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" +
44                                             "Lesser General Public Licence for more details.";
45     
46     private static Display display = null;
47     
48     /** Whether we have a dispatch thread going */
49     private static boolean eventsDispatching = false;
50     /** Who owns the event dispatcher */
51     private static Object JavaDoc eventsDispatchOwner = null;
52     /** Have we set a shutdown hook to remove temp files? */
53     private static boolean setDeleteTempOnShutdown = false;
54     /** List of temporary files created in this session */
55     private static Vector tempFileList = new Vector();
56     /** Dispatch thread retarding for performance */
57     private static boolean retardEventDispatch = false;
58     private static int retardationms = 2000;
59     /** Window reference count. If it reaches 0 then we end the dispatch thread */
60     private static int windowReferenceCount = 0;
61     
62     private static String JavaDoc tempDirectory = System.getProperty("user.home") + File.separator + "tmp" + File.separator + "swingwt";
63     
64     public static String JavaDoc getVersion() { return VERSION; }
65     
66     public static synchronized void incrementWindowReferences() {
67         windowReferenceCount++;
68     }
69     
70     public static synchronized void decrementWindowReferences() {
71         windowReferenceCount--;
72         if (windowReferenceCount == 0) stopEventDispatchRunning();
73     }
74     
75     public static void setShowSwingWTInfoOnStartup(boolean b) {
76         isDebug = b;
77     }
78     
79     /** Determines whether the event dispatch thread is retarded for extra performance */
80     public static synchronized void setRetardDispatchThread(boolean b) {
81         retardEventDispatch = b;
82     }
83     /** Determines whether the event dispatch thread is retarded for extra performance */
84     public static synchronized void setRetardDispatchThread(boolean b, int ms) {
85         retardEventDispatch = b;
86         retardationms = ms;
87     }
88     
89     /**
90      * If your code is an Eclipse plugin (ie. Something outside
91      * of SwingWT and your program has started using SWT components
92      * in the current VM and an event dispatcher is already going),
93      * Call this routine with (true) to have SwingWT use the other
94      * program's event dispatcher (rather than it's own thread).
95      */

96     public synchronized static void setEclipsePlugin(boolean b) {
97         if (b) {
98             eventsDispatching = true;
99         display = Display.getDefault();
100     }
101     else {
102             eventsDispatching = false;
103     }
104     }
105     
106     /**
107      * Checks whether the event dispatch thread is running, and starts it
108      * if it isn't.
109      */

110     public synchronized static void checkEventDispatcher() {
111         if (!eventsDispatching) {
112             
113             eventsDispatching = true;
114             
115             // Make sure there is a VM hook to dump the temp directory when we're finished
116
// and do any necessary cleaning up
117
checkShutdownHook();
118             
119             // Event dispatch thread itself
120
new Thread JavaDoc() {
121                 public void run() {
122                     
123                     // Make sure display is set
124
display = Display.getDefault();
125                     
126                     // Debug info
127
if (isDebug)
128                         System.out.println(COPYRIGHT);
129                     
130                     while (eventsDispatching) {
131                         try {
132                             if (!display.readAndDispatch()) {
133                                 // Send this thread to sleep to allow other
134
// processes a go :)
135
display.sleep();
136                             }
137                             // If thread retardation is on, sleep
138
if (SwingWTUtils.isRetardDispatchThread()) {
139                                 try {
140                                     Thread.sleep(SwingWTUtils.getRetardationInterval());
141                                 }
142                                 catch (InterruptedException JavaDoc e) {}
143                             }
144                         }
145                         // By catching all exceptions and errors here, we
146
// can prevent the app going down for small event
147
// related problems. User code can still catch where
148
// necessary.
149
catch (org.eclipse.swt.SWTException e) {
150                             if (showInternalSWTExceptions)
151                                 e.printStackTrace();
152                         }
153                         catch (Error JavaDoc e) {
154                             e.printStackTrace();
155                         }
156                         catch (Exception JavaDoc e) {
157                             e.printStackTrace();
158                         }
159                     }
160                 }
161             }.start();
162         }
163     }
164     
165     /** @return true if the dispatch thread is currently retarded */
166     public static boolean isRetardDispatchThread() { return retardEventDispatch; }
167     /** @return The dispatch thread retardation in milliseconds */
168     public static int getRetardationInterval() { return retardationms; }
169     
170     public static synchronized Display getDisplay() {
171         
172         // Make sure event dispatch is running (since this
173
// creates the display).
174
checkEventDispatcher();
175         
176         // Wait for the display to be set
177
while (display == null) {
178             try {
179                 Thread.sleep(50);
180             }
181             catch (InterruptedException JavaDoc e) {}
182         }
183         
184         return display;
185     }
186     
187     /** Checks to see if this users temp directory is there
188      * and creates it if it isn't.
189      * @throws IOException if the directory couldn't be created.
190      */

191     private static void checkForTempDirectory() throws IOException {
192         File f = new File(tempDirectory);
193         if (!f.exists())
194             f.mkdirs();
195     }
196     
197     /** Determines if an SWT peer is available for use
198      */

199     public static boolean isSWTControlAvailable(org.eclipse.swt.widgets.Control c) {
200         if (c == null) return false;
201         if (c.isDisposed()) return false;
202         return true;
203     }
204     
205     /** Determines if an SWT menu peer is available for use
206      */

207     public static boolean isSWTMenuControlAvailable(org.eclipse.swt.widgets.MenuItem c) {
208         if (c == null) return false;
209         if (c.isDisposed()) return false;
210         return true;
211     }
212     
213     public synchronized static boolean isEventDispatchRunning() {
214         return eventsDispatching;
215     }
216     
217     /**
218      * Stops the event dispatch thread running (if it isn't running.
219      * does nothing).
220      */

221     public static synchronized void stopEventDispatchRunning() {
222         eventsDispatching = false;
223     }
224     
225     /**
226      * Given a byte array of content, writes it to a temporary file and then
227      * returns the path to it as a URL
228      * @param contents The content of the file
229      * @param type The file extension to use
230      * @throws IOException if an error occurs
231      */

232     public static URL stringToTempFile(byte[] contents, String JavaDoc type) throws IOException {
233         
234         // Make sure we have a temp directory
235
checkForTempDirectory();
236         
237         // Generate a random file name and keep doing it until we get a unique one
238
File f = null;
239         String JavaDoc fName = null;
240         do {
241             fName = tempDirectory + File.separator +
242                 ((int) (Math.random() * 10000000)) + "." + type;
243             f = new File(fName);
244         } while (f.exists());
245         
246         System.out.println("TEMP: Creating temp file " + fName);
247         FileOutputStream out = new FileOutputStream(f);
248         out.write(contents);
249         out.close();
250         
251         // Remember this file for later deletion
252
tempFileList.add(fName);
253         
254         return new URL("file://" + fName);
255     }
256     
257     public static void clearTempDirectory() {
258         // Abandon if we created no files in this session
259
if (tempFileList.size() == 0) return;
260         Iterator i = tempFileList.iterator();
261         while (i.hasNext()) {
262             try {
263                 File f = new File((String JavaDoc) i.next());
264                 f.delete();
265             }
266             catch (Exception JavaDoc e) { e.printStackTrace(); }
267         }
268     }
269     
270     public static void checkShutdownHook() {
271         if (!setDeleteTempOnShutdown) {
272             Runtime.getRuntime().addShutdownHook( new Thread JavaDoc() {
273                 public void run() {
274                     
275                     clearTempDirectory();
276                     
277                     // Unfortunately, we use some finalizer based
278
// cleanup for manually created Color/Font/Graphics (only way really)
279
// so we want to make sure they run before closing so we don't
280
// lose OS resources. Might as well do a garbage collection too :-)
281

282                     // This is a real "damned if you do, damned if you don't" situation -
283
// the problem is that we have to use finalizers to kill the native
284
// resources because we know they should run at some point when the
285
// object is finished with. In practice, the best you can hope for
286
// is "on shutdown, but maybe before". The other option would be to
287
// manage the damn things myself, but by keeping a list, I ensure
288
// the objects won't be collected until I destroy them, and I have
289
// no way of knowing whether they are being used in on-screen
290
// components - I can guarantee it at shutdown however, but ideally
291
// I want them to run before that! So I'm stuck with fucking
292
// finalizers. Best thing to do is call System.runFinalization()
293
// yourself in your app when you've finished with awt.Color/Graphics/Font
294
// (or, each of those AWT mapped objects has a dispose() method to
295
// kill off the native resource).
296

297                     // Another option could have been the use of WeakReferences, however
298
// this would be very difficult to code, and not all VMs support them
299
// (we care more about free VMs than Sun's)
300
System.runFinalization();
301                     System.gc();
302                     
303                 }
304             });
305             setDeleteTempOnShutdown = true;
306         }
307     }
308     
309     private static boolean checkedOS = false;
310     private static boolean isWin = false;
311     /** Returns true if this is a windows platform */
312     public static boolean isWindows() {
313         if (!checkedOS)
314             isWin = System.getProperty("os.name").toLowerCase().indexOf("windows") != -1;
315         return isWin;
316     }
317     
318     /**
319      * Saves an image to a JPEG. Not sure where to put this
320      * since the only support Java has for this, is in a hidden
321      * com.sun.jpeg.JPEGEncoder class which is not part of the
322      * formal interface.
323      * Anyway, I'm sticking it here.
324      */

325     public static void saveImageToJPG(swingwt.awt.Image image, OutputStream stream) {
326         org.eclipse.swt.graphics.ImageLoader il = new org.eclipse.swt.graphics.ImageLoader();
327         il.data = new org.eclipse.swt.graphics.ImageData[] { image.image.getImageData() };
328         il.save(stream, org.eclipse.swt.SWT.IMAGE_JPEG);
329         il = null;
330     }
331     
332     /**
333      * Saves an image to a GIF. Not sure where to put this
334      * since the only support Java has for this, is in a hidden
335      * com.sun.gif.GIFEncoder class which is not part of the
336      * formal interface.
337      * Anyway, I'm sticking it here.
338      */

339     public static void saveImageToGIF(swingwt.awt.Image image, OutputStream stream) {
340         org.eclipse.swt.graphics.ImageLoader il = new org.eclipse.swt.graphics.ImageLoader();
341         il.data = new org.eclipse.swt.graphics.ImageData[] { image.image.getImageData() };
342         il.save(stream, org.eclipse.swt.SWT.IMAGE_GIF);
343         il = null;
344     }
345     
346         /**
347      * Saves an image to a JPEG. Not sure where to put this
348      * since the only support Java has for this, is in a hidden
349      * com.sun.png.PNGEncoder class which is not part of the
350      * formal interface.
351      * Anyway, I'm sticking it here.
352      */

353     public static void saveImageToPNG(swingwt.awt.Image image, OutputStream stream) {
354         org.eclipse.swt.graphics.ImageLoader il = new org.eclipse.swt.graphics.ImageLoader();
355         il.data = new org.eclipse.swt.graphics.ImageData[] { image.image.getImageData() };
356         il.save(stream, org.eclipse.swt.SWT.IMAGE_PNG);
357         il = null;
358     }
359     
360     /** Used as a return val from renderStringWidth routines */
361     private static int intretval = 0;
362     /**
363      * Given a piece of text, this routine will evaluate how many pixels wide it will
364      * be when renderered in the default system font. This is used by JTable and
365      * JList to determine the column widths
366      */

367     public static int getRenderStringWidth(final String JavaDoc text) {
368         SwingUtilities.invokeSync( new Runnable JavaDoc() {
369             public void run() {
370                 org.eclipse.swt.graphics.GC gc = null;
371                 org.eclipse.swt.graphics.Image im = null;
372                 if (getDisplay().getActiveShell() == null) {
373                     im = new org.eclipse.swt.graphics.Image(getDisplay(), getDisplay().getBounds());
374                     gc = new org.eclipse.swt.graphics.GC(im);
375                 }
376                 else
377                     gc = new org.eclipse.swt.graphics.GC(getDisplay().getActiveShell());
378
379                 // We need to calculate differently for Windows platforms. Isn't it always the
380
// way? This is because Windows shows the 3 dots - even if the text just fits! So we
381
// have to make it even larger. What a piece of shit Windows is
382
org.eclipse.swt.graphics.Point p = null;
383                 if (isWindows())
384                     p = gc.stringExtent(text + "WWW");
385                 else
386                     p = gc.stringExtent(text + "W");
387                 int width = p.x;
388                 gc.dispose();
389                 gc = null;
390                 if (im != null) im.dispose();
391                 im = null;
392                 intretval = width;
393             }
394         });
395         return intretval;
396     }
397     
398    /**
399      * Given a piece of text, this routine will evaluate how many pixels high it will
400      * be when renderered in the default system font. This is used by JPanel to
401      * determine the extra height needed on the insets for laying out purposes
402      */

403     public static int getRenderStringHeight(final String JavaDoc text) {
404         SwingUtilities.invokeSync( new Runnable JavaDoc() {
405             public void run() {
406                 org.eclipse.swt.graphics.GC gc = null;
407                 org.eclipse.swt.graphics.Image im = null;
408                 if (getDisplay().getActiveShell() == null) {
409                     im = new org.eclipse.swt.graphics.Image(getDisplay(), getDisplay().getBounds());
410                     gc = new org.eclipse.swt.graphics.GC(im);
411                 }
412                 else
413                     gc = new org.eclipse.swt.graphics.GC(getDisplay().getActiveShell());
414
415                 org.eclipse.swt.graphics.Point p = gc.stringExtent(text + "W");
416                 int height = p.y;
417                 gc.dispose();
418                 gc = null;
419                 if (im != null) im.dispose();
420                 im = null;
421                 intretval = height;
422             }
423         });
424         return intretval;
425     }
426     
427     /**
428      * Because GCJ/GIJ Classpath doesn't support StringBuffer.indexOf, we have
429      * to have a replacement that uses Strings instead.
430      * @param buffer The StringBuffer to find in
431      * @param string The String to find
432      * @return The index of the string or -1 if it wasn't found
433      */

434     public static int getStringBufferIndexOf(StringBuffer JavaDoc buffer, String JavaDoc string) {
435         return buffer.toString().indexOf(string);
436     }
437     /**
438      * Because GCJ/GIJ Classpath doesn't support StringBuffer.indexOf, we have
439      * to have a replacement that uses Strings instead.
440      * @param buffer The StringBuffer to find in
441      * @param string The String to find
442      * @param fromIndex The char index to search from
443      * @return The index of the string or -1 if it wasn't found
444      */

445     public static int getStringBufferIndexOf(StringBuffer JavaDoc buffer, String JavaDoc string, int fromIndex) {
446         return buffer.toString().indexOf(string, fromIndex);
447     }
448     
449     /**
450      * Renders a Swing Icon onto an SWT image. Used by SwingWT to
451      * render all images onto components.
452      *
453      * @author Robin Rawson-Tetley
454      *
455      * @param component the SwingWT component this icon is being rendered for
456      * @param icon The icon to render
457      * @return An SWT image to assign to the component
458      */

459     public static org.eclipse.swt.graphics.Image getSWTImageFromSwingIcon(swingwt.awt.Component c, swingwtx.swing.Icon icon) {
460         
461         if (icon == null) return null;
462         
463         // Is it an ImageIcon? If so, we can cheat since it already
464
// has an SWT image
465
if (icon instanceof ImageIcon)
466             return ((ImageIcon) icon).getImage().image;
467         
468         // Otherwise, we need to render the icon onto an image -
469

470         // create the image and drawing context
471
org.eclipse.swt.graphics.Image img = new org.eclipse.swt.graphics.Image(getDisplay(), icon.getIconWidth(), icon.getIconHeight());
472         org.eclipse.swt.graphics.GC gc = new org.eclipse.swt.graphics.GC(img);
473         swingwt.awt.SWTGraphics2DRenderer g = new swingwt.awt.SWTGraphics2DRenderer(gc, false);
474         
475         // Tell the icon to paint itself
476
icon.paintIcon(c, g, 0, 0);
477         
478         // Destroy the graphics context
479
g.dispose();
480         
481         // return the renderered image
482
return img;
483         
484     }
485     
486     /** Translates the alignment part of the Swing constants */
487     public static int translateSwingAlignmentConstant(int constant) {
488         int ret = 0;
489         switch (constant) {
490             case (SwingConstants.CENTER): ret = SWT.CENTER; break;
491             case (SwingConstants.TOP): ret = SWT.TOP; break;
492             case (SwingConstants.LEFT): ret = SWT.LEFT; break;
493             case (SwingConstants.BOTTOM): ret = SWT.BOTTOM; break;
494             case (SwingConstants.RIGHT): ret = SWT.RIGHT; break;
495             case (SwingConstants.LEADING): ret = SWT.LEFT; break;
496             case (SwingConstants.TRAILING): ret = SWT.RIGHT; break;
497         }
498         return ret;
499     }
500     
501     /** Translates the orientation part of the Swing constants */
502     public static int translateSwingOrientationConstant(int constant) {
503         int ret = 0;
504         switch (constant) {
505             case (SwingConstants.HORIZONTAL): ret = SWT.HORIZONTAL; break;
506             case (SwingConstants.VERTICAL): ret = SWT.VERTICAL; break;
507         }
508         return ret;
509     }
510     
511     /*** Removes HTML tags from a string
512      * @param s The string to remove HTML tags from
513      */

514     public static String JavaDoc removeHTML(String JavaDoc s) {
515
516     // If we have an opener and no closer, then
517
// it ain't HTML and we shouldn't break it
518
int opener = s.indexOf("<");
519     int closer = s.indexOf(">");
520     if (opener != -1 && closer == -1)
521         return s;
522         
523         int i = s.indexOf("<");
524         while (i != -1) {
525             // Find end pos
526
int e = s.indexOf(">", i);
527             if (e == -1) e = s.length();
528             // Strip from the string
529
s = s.substring(0, i) +
530                 ( e < s.length() ? s.substring(e + 1, s.length())
531                                  : "" );
532             // Find again
533
i = s.indexOf("<");
534         }
535         
536         // Replace known sequences with characters
537
s = replace(s, "&nbsp;", " ");
538         s = replace(s, "&nbsp", " ");
539         s = replace(s, "&amp;", " ");
540         s = replace(s, "&lt;", "<");
541         s = replace(s, "&gt;", ">");
542         
543         // Compress whitespace
544
s = s.trim();
545         StringBuffer JavaDoc o = new StringBuffer JavaDoc();
546         boolean lastWasSpace = false;
547         for (i = 0; i < s.length(); i++) {
548             if (s.substring(i, i + 1).equals(" ")) {
549                 if (!lastWasSpace) {
550                     lastWasSpace = true;
551                     o.append(" ");
552                 }
553             }
554             else {
555                 o.append(s.substring(i, i + 1));
556                 lastWasSpace = false;
557             }
558         }
559         s = o.toString();
560
561         return s;
562     }
563     
564     
565     /** Looks in findin for all occurrences of find and replaces them with replacewith
566      * @param findin The string to find occurrences in
567      * @param find The string to find
568      * @param replacewith The string to replace found occurrences with
569      * @return A string with all occurrences of find replaced.
570      */

571     public static String JavaDoc replace(String JavaDoc findin, String JavaDoc find, String JavaDoc replacewith) {
572         
573         StringBuffer JavaDoc sb = new StringBuffer JavaDoc(findin);
574         int i = 0;
575         try {
576             while (i <= sb.length() - find.length()) {
577                 if (sb.substring(i, i + find.length()).equalsIgnoreCase(find)) {
578                     sb.replace(i, i + find.length(), replacewith);
579                 }
580                 i++;
581             }
582         }
583         catch (StringIndexOutOfBoundsException JavaDoc e) {
584             // We hit the end of the string - do nothing and carry on
585
}
586             
587         return sb.toString();
588     }
589     
590 }
591
592 /**
593     $Log: SwingWTUtils.java,v $
594     Revision 1.62 2004/05/07 12:11:18 bobintetley
595     Default layout fixes and correct behaviour for null layout
596
597     Revision 1.61 2004/05/06 12:35:22 bobintetley
598     Parity with Swing constants for Binary Compatibility + fixes to JDesktopPane
599
600     Revision 1.60 2004/05/05 13:24:32 bobintetley
601     Bugfixes and Laurent's patch for binary compatibility on Container.add()
602
603     Revision 1.59 2004/05/04 09:49:00 bobintetley
604     removeHTML fix to not misidentify HTML
605
606     Revision 1.58 2004/05/04 09:31:43 bobintetley
607     PlainDocument/View support and implementation. Build script supports java/javax
608     packages - fix to build script to use nested args in bootclasspath (single path broke on my Ant 1.6.1/Linux)
609
610     Revision 1.57 2004/04/30 21:54:21 bobintetley
611     Moved log to the end of commonly changed files
612
613    Revision 1.56 2004/04/30 21:38:04 bobintetley
614    Fixes for layout interactions with GridBagLayout
615
616    Revision 1.55 2004/04/30 13:54:00 bobintetley
617    Fixes to getRenderStringHeight() to return the height, rather than width
618
619    Revision 1.54 2004/04/30 13:20:43 bobintetley
620    Fix to unrealised peer preferred sizes, forwarding window events to
621    content panes and fix for mouse drag events.
622
623    Revision 1.53 2004/04/27 13:50:18 bobintetley
624    Build script fixes
625
626    Revision 1.52 2004/04/23 10:24:53 bobintetley
627    Version update and note on non-refreshed tables
628
629    Revision 1.51 2004/04/21 10:44:50 bobintetley
630    Code cleanup and native build script fix
631
632    Revision 1.50 2004/04/19 14:18:42 bobintetley
633    SWT Exception suppression
634
635    Revision 1.49 2004/04/19 12:49:37 bobintetley
636    JTaskTray implementation (and demo), along with Frame repaint fix
637
638    Revision 1.48 2004/04/18 15:11:00 bobintetley
639    Updated todo items and version
640
641    Revision 1.47 2004/04/16 14:38:47 bobintetley
642    Table and Tree cell editor support
643
644    Revision 1.46 2004/04/15 11:24:33 bobintetley
645    (Dan Naab) ComponentUI, UIDefaults/UIManager and Accessibility support.
646    (Antonio Weber) TableColumnModelListener implementation and support
647
648    Revision 1.45 2004/04/06 12:30:53 bobintetley
649    JTable thread safety, ListSelectionModel implementation for JList/JTable
650
651    Revision 1.44 2004/03/31 08:41:19 bobintetley
652    Fixes to whitespace stripper for better looking HTML->Text
653
654    Revision 1.43 2004/03/30 10:42:46 bobintetley
655    Many minor bug fixes, event improvements by Dan Naab. Full swing.Icon support
656
657    Revision 1.42 2004/03/26 12:04:42 bobintetley
658    Fixed bug in TreeModel that caused events not to fire down to JTree
659
660    Revision 1.41 2004/03/23 15:22:06 bobintetley
661    SystemColor/Dialog fix and SwingWTUtils.setEclipsePlugin(true) implementation
662
663    Revision 1.40 2004/03/22 15:10:22 bobintetley
664    JRootPane and JLayeredPane implementation
665
666    Revision 1.39 2004/03/19 15:39:00 bobintetley
667    Updated version
668
669    Revision 1.38 2004/03/18 14:42:11 bobintetley
670    Fix to Window hierarchy to match Swing, and fix to allow MDI apps
671       to work under SWT 2.x
672
673    Revision 1.37 2004/03/16 22:17:18 bobintetley
674    Fixes for JDK 1.3
675
676    Revision 1.36 2004/03/12 11:27:26 bobintetley
677    Memory leak fixes
678
679    Revision 1.35 2004/03/12 11:05:24 bobintetley
680    Fixed memory leak in container destruction
681
682    Revision 1.34 2004/03/04 15:32:28 bobintetley
683    JInternalFrame methods now modify their peers after creation
684
685    Revision 1.33 2004/03/03 13:49:36 bobintetley
686    Updating of README, FAQ and VERSION
687
688    Revision 1.32 2004/03/03 09:13:12 bobintetley
689    JList threading fixed and top level error handling
690
691    Revision 1.31 2004/03/02 08:48:35 bobintetley
692    Version update
693
694    Revision 1.30 2004/03/01 15:58:47 bobintetley
695    Various little bug fixes
696
697    Revision 1.29 2004/02/27 16:16:15 bobintetley
698    Threading fixes
699
700    Revision 1.28 2004/02/23 11:15:54 bobintetley
701    Fixes to popup
702
703    Revision 1.27 2004/02/22 08:38:20 bobintetley
704    Fixed scrollbar interaction with JTextArea
705
706    Revision 1.26 2004/02/20 14:00:18 bobintetley
707    Updated version
708
709    Revision 1.25 2004/02/20 13:57:01 bobintetley
710    JLookupPopup - A high speed alternative to JComboBox
711
712    Revision 1.24 2004/02/20 10:22:07 bobintetley
713    GCJ/GIJ compatible replacement for StringBuffer.indexOf()
714
715    Revision 1.23 2004/02/19 09:58:44 bobintetley
716    Various small bug fixes and JTextArea should be much faster/lighter
717
718    Revision 1.22 2004/01/27 09:05:12 bobintetley
719    ListModel and List Selection implemented. ScrollPane fix so all components
720       scrollable
721
722    Revision 1.21 2004/01/26 12:02:49 bobintetley
723    JPanel titled border support
724
725    Revision 1.20 2004/01/26 10:57:45 bobintetley
726    HTML handling (throws it away - SWT can't do anything with it)
727
728    Revision 1.19 2004/01/23 08:05:51 bobintetley
729    JComboBox fixes and better Action implementation
730
731    Revision 1.18 2004/01/20 09:17:15 bobintetley
732    Menu class overhaul for compatibility, Action support and thread safety
733
734    Revision 1.17 2004/01/16 09:35:47 bobintetley
735    Full event dispatch thread support!
736
737    Revision 1.16 2004/01/15 09:55:13 bobintetley
738    Fixed multiple display create problem (thanks Sachin)
739
740    Revision 1.15 2004/01/07 11:32:52 bobintetley
741    Fix to calculation under Windows for rendering widths
742
743    Revision 1.14 2004/01/07 09:26:25 bobintetley
744    Render widths now work correctly
745
746    Revision 1.13 2004/01/06 15:56:51 bobintetley
747    Render width now works without an active shell
748
749    Revision 1.12 2004/01/06 15:38:30 bobintetley
750    Adjusted render width calculations. Fixed horrible button border under Win32
751
752    Revision 1.11 2004/01/06 15:31:02 bobintetley
753    New render width function for accurate auto-sizing
754
755    Revision 1.10 2004/01/06 10:29:21 bobintetley
756    Dispatch thread retardation code
757
758    Revision 1.9 2003/12/22 14:46:23 bobintetley
759    Oops, forgot to make them static :-)
760
761    Revision 1.8 2003/12/22 14:44:31 bobintetley
762    Image encode/save support
763
764    Revision 1.7 2003/12/17 15:24:33 bobintetley
765    Threading fixes
766
767    Revision 1.6 2003/12/16 13:14:33 bobintetley
768    Use of SwingWTUtils.isSWTControlAvailable instead of null test
769
770    Revision 1.5 2003/12/16 09:19:02 bobintetley
771    Various small fixes to match Swing more closely
772
773    Revision 1.4 2003/12/14 09:13:38 bobintetley
774    Added CVS log to source headers
775
776 */

777
Popular Tags