RFR: 8320796: CssMetaData.initStyleables()
Andy Goryachev
angorya at openjdk.org
Mon Nov 27 20:45:22 UTC 2023
On Mon, 27 Nov 2023 18:30:27 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> Provides a public utility method for use by the skins (core and custom) to simplify initialization of styleable properties.
>
>
> + /**
> + * Utility method which combines CssMetaData items in one unmodifiable list with the size equal to the number
> + * of items it holds (i.e. with no unnecessary overhead).
> + *
> + * @param list the css metadata items, usually from the parent, not nullable
> + * @param items the additional items
> + * @return the unmodifiable list containing all of the items
> + *
> + * @since 22
> + */
> + public static List<CssMetaData<? extends Styleable, ?>> initStyleables(
> + List<CssMetaData<? extends Styleable, ?>> list,
> + CssMetaData<? extends Styleable, ?>... items)
On second thought, I don't want to craft another, array-based UnmodifiableRandomAccessList implementation to save one indirection. Keep in mind that ArrayList is also array-based.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1296#issuecomment-1828569796
More information about the openjfx-dev
mailing list