Cool Utility Classes For SwingX

If you liked the user interface of Artemis, you might probably want to be able to produce the same result at no cost. I have good news for you then because I have just added a set of cool classes to SwingX that will help you generate nice-looking graphical effects.

The new classes are available in three packages:

  • org.jdesktop.swingx.geom
    • Morphing2D: Morphes a Java2D shape into another (written by Jim Graham from Sun Microsystems)
    • Star2D: A star shape that can be used to create Web 2.0-like badges and icons
  • org.jdesktop.swingx.graphics
    • BlendComposite: A set of 30+ blending modes for Java2D painting (as found in Photoshop or The GIMP)
    • ColorUtilities: A set of utility methods to manipulate colors
    • GraphicsUtilities: A set of utility methods to create and load compatible images and create thumbnails
    • ReflectionRenderer: Generates reflections from pictures
    • ShadowRenderer: Generates shadows from pictures
  • org.jdesktop.swingx.image
    • AbstractFilter: A basic implementation of BufferedImageOp to easily create new image filters
    • ColorTintFilter: This filters applies a color to an image to tint it
    • FastBlurFilter: A box blur filter
    • StackBlurFilter: This filter approximates the result of a gaussian blur by applying several FastBlurFilter to an image

All these classes come from the SwingLabs incubator. Some of them have been available for quite a while now (ShadowRenderer used to be called ShadowFactory) but have been vastly improved. I have written the javadoc of all those classes but I have also created demos for the most important features. The demos source code is available in the incubator, in the fx/ sub-project but I have some WebStart versions for you!

Blending

Webstart now!

Blending Composites

Blur

Webstart now!

Blur

Morphing

Webstart now!

Morphing

Reflections

Webstart now!

Reflections

Shadows

Webstart now!

Drop Shadows

Go grab the latest source code from SwingX's CVS and tell me what you think of those tools!

4 Responses to “Cool Utility Classes For SwingX”

  1. Nico says:

    These are awesome! Thanks a lot for writing these classes!

  2. mathias says:

    Hi man,
    I think the package org.jdesktop.swingx.graphics is quite as good as photoshop. I would like to use one blendingmode: “color” with 0.5f opacity.
    But where can I donwload the package?

    I tried to get it from http://jdnc-incubator.dev.java.net/ and jdesktop.org, but without any success.

    Please tell me if this archive is for free and where I can get it from.

    Thanks in advance.
    mathias4u@arcor.de
    Germany

  3. Wererabit says:

    hi

    where can I get the src for these file?

    thanx

  4. Romain Guy says:

    The link is in the blog entry :)