
Re: Visual Padding not implemented on OS X
I've added support to specify the visual padding in three different ways:
1) As a UIDefault property. This allows developers to specify the default visual padding for all components of a specific type. For example, PlatformDefaults now has the following line:
Code:
UIManager.put( "TabbedPane.visualPadding", new int[] {-1, 0, 2, 2} );
2) As a client property on a JComponent. The value may be an int[] or an Insets instance. For example,
Code:
button.putClientProperty( "visualPadding", new Insets(3,3,3,3) );
3) As a component constraint, using the same format as "pad" - e.g. "visualpadding 3 3 3 3" or "vp 3 3 3 3"
That was the easy part. Now I'm trying to figure out how to adjust the layout. Do you have any suggestions on where to take the visual padding into account?
I'm thinking about putting it into Grid.CompWrap.getSize, but that method and class have no current way of knowing if the layout constraints included "novisualpadding" to toggle the behavior.
Do you have any suggestions?
Thanks,
-Tex