toolbar
ToolbarBuilder – Use the builder pattern to create toolbars
Recently I discovered Jeremys uber-ButtonUI’s. He provides UI classes to mimic Mac OS Button looks (and more) including segmented Buttons. The UI’s are nice, but while playing around with, I thought a builder approach would fit to easily create toolbars of buttons and components. Basically the problem is that segmentation configuration depends on Button order (
), so changing the order of elements within a toolbar now also involves updating the segmentation configuration. Jeremy provides a nice installUI method that helps adding the appropriate button UIs, but I thought this could be improved further and I wanted to play with the builder pattern and find a way to make it extensible without copy/pasting the whole builder.