README 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. EXPERIMENTAL SWT CODE FOR JFREECHART
  2. ------------------------------------
  3. 07 November 2006
  4. SWT is the Java Standard Widget Toolkit [1], an open source (released under the
  5. Eclipse Public License) and portable library to create user interfaces. The
  6. SWT interfaces will use native widget on any operating system it supports.
  7. This code provide support for using the JFreeChart library directly into
  8. SWT Composites. Note that there is the alternative to use the SWT_AWT class
  9. but it will run only with SUN JRE and Java 1.5 (and it is not native, so
  10. potentially much slower).
  11. To compile this code, you will need to link it against the swt.jar of the
  12. target os. Indeed while the API is totally cross platform, the implementation
  13. is platform dependent since it calls on native widget if available (much
  14. faster) and only rely on a Java implementation if it is not. An ant script:
  15. build-swt.xml is provided to help you build the code. This file contains two
  16. compile targets to build the following jar:
  17. * swtgraphics2d.jar - The generic classes not JFreeChart specific.
  18. * jfreechart-1.0.x-swt.jar - The specific JFreeChart SWT classes.
  19. To get a successful build id pretty straightforward, download the SWT library
  20. from eclipse.org [1]. Unpack the archive in the JFreeChart tree as libswt.
  21. If you need to build for multiple OS, put all the SWT in there. For instance
  22. (with SWT version 3.2):
  23. libswt
  24. |
  25. `--swt-linux-gtk-x86
  26. | |
  27. | `--swt.jar
  28. | `--libswt-gtk-3232.so
  29. | `-- etc...
  30. `--swt-win32-win32-x86
  31. |
  32. `--swt.jar
  33. `--swt-win32-3232.dll
  34. Then you need to edit the build-swt.xml script and change line 14 to what is
  35. needed. Of course all of the paths are relative. You can change it to whatever
  36. you like provided the path in the xml file is correct. Then just run:
  37. ant -buildfile build-swt.xml
  38. [1] http://www.eclipse.org/swt/