Karl has posted 8 posts at DZone. View Full User Profile

JFormDesigner 5: Beans Binding (JSR 295) and BeanInfo Annotations

05.26.2011
| 2056 views |
  • submit to reddit

FormDev Software is pleased to announce the release of JFormDesigner 5,
now with Beans Binding (JSR 295) support, BeanInfo annotations, project specific settings and more.

Product Summary

JFormDesigner is a professional GUI designer for Java Swing user interfaces.
Its outstanding support for JGoodies FormLayout, GroupLayout (Free Design),
TableLayout and GridBagLayout makes it easy to create professional looking forms.
JFormDesigner is available as IDE plug-ins for Eclipse, IntelliJ IDEA and JBuilder and
as stand-alone application. Plug-ins for NetBeans and JDeveloper are under development.

Highlights of JFormDesigner 5

  • Beans Binding (JSR 295) support
  • BeanInfo Annotations
  • Improved Properties view
  • Project specific settings
  • Improved Choose Bean dialog
  • Auto-reload custom component classes
  • and more...

Read about the new features and improvements here:
http://www.formdev.com/jformdesigner/whatsnew/50/

BeanInfo Annotations

The new @BeanInfo and @PropertyDesc annotations make it very easy to specify BeanInfo information directly in the custom component. Its no longer necessary to implement extra BeanInfo classes. This drastically reduces time and code needed to create BeanInfo information.

@BeanInfo(isContainer=true, categories={
    @Category(name="Gradient Properties", properties={"direction", "magnitude"})
})
public class JGradientPanel extends JPanel {
    @PropertyDesc(displayName="direction (to)", preferred=true, enumValues={
        @Enum(name="NORTH", intValue=SwingConstants.NORTH, code="SwingConstants.NORTH"),
        @Enum(name="EAST",  intValue=SwingConstants.EAST,  code="SwingConstants.EAST"),
        @Enum(name="SOUTH", intValue=SwingConstants.SOUTH, code="SwingConstants.SOUTH"),
        @Enum(name="WEST",  intValue=SwingConstants.WEST,  code="SwingConstants.WEST")
    }, imports=SwingConstants.class)
    public int getDirection() {
        return direction;
    }
 
    @PropertyDesc(displayName="magnitude (in %)", preferred=true)
    public int getMagnitude() {
        return magnitude;
    }
}

About FormDev Software

FormDev Software is specialized in creating software development tools for Java GUIs. By creating innovative high quality development tools, we help our customers to increase their productivity. Thousands of customers world wide use our tools.

0
Published at DZone with permission of its author, Karl Tauber.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)