GraphicsBuilder.color
with Java3DBuilder.color
, meaning that it now accepts [r,g,b,a] as properties besides [red,blue,green,alpha]. But the news don't stop there, other commonly used properties as width, height and radius (among others) have aliases too, once the next version is released the documentation will include the relevant aliases.The default aliases will make your code shorter, the aliases mechanism will let you register any alias you may desire. Thanks to the facilities provided by FactoryBuilderSupport, GraphicsBuilder's shortcut version has improved a bit over SwingXBuilder's because it allows you to register shortcuts using the node's name and not the node's classname.
Here is a simple example of a rectangle with dimensions [width:100,height:100], a border of width 2 and color black, and a gradient with two stops. First the regular version, then the aliased version
Oh, and
color()
has also an alias: rgba()
.Keep on Groovying!