To be consistent, the same thing needs to be done with BorderImage and Border. So rather than BackgroundInsets, I will move Margins from com.sun.javafx.scene.layout to javafx.scene.layout, tweak the API to be like that of BorderWidths and use Margins instead of insets.
On Nov 4, 2013, at 2:40 PM, Stephen F Northover <[email protected]> wrote: > Hi David, > > Looks good. Please update the JIRA with what you intend to do. People are > welcome to follow along there if they have any ideas for a different API / > approach. > > Steve > > On 2013-11-04 2:22 PM, David Grieve wrote: >> https://javafx-jira.kenai.com/browse/RT-26277 relates to the use of >> percentage values in -fx-background-insets. BackgroundFill (in >> javafx.scene.layout) uses Insets, which does not allow for a percentage >> value. >> >> My proposal here is to simply copy the BorderWidths implementation to a >> BackgroundInsets class, with appropriate renaming along the way, and use it >> in place of Insets in BackgroundFill. The impact on the BackgroundFill API >> is: >> >> - public final Insets getInsets() >> + public final BackgroundInsets getBackgroundInsets() >> >> Since BackgroundFill is new in 8.0, backward compatibility is not a concern. >> >> >> >> >> >
