I'm implementing a custom Look & Feel using Synth for my application - basically providing custom versions of SynthStyle, SynthPainter and SynthStyleFactory.
I am not using any XML, i.e. everything is done through the Java API. In general this is working just fine.
The best way to set appropriate insets is however proving a little tricky. I can see various options:
- Override getInsets for SynthStyle to return specific insets for each Region
- Apply a border to components using SynthStyle.installDefaults
- Set all insets to (0,0,0,0) and compensate in the painting methods
- Create new ComponentUI delegates
What would be the best approach and why?