Package ej.mwt.util

Class OutlineHelper


  • public class OutlineHelper
    extends Object
    Provides utility methods to apply outlines and backgrounds.
    • Constructor Detail

      • OutlineHelper

        public OutlineHelper()
    • Method Detail

      • applyOutlines

        public static void applyOutlines​(Outlineable outlineable,
                                         Style style)
        Applies all the outlines of the given style on the given object.

        The given object must include the outlines of the widget. It is modified to the content bounds/size of the widget.

        Parameters:
        outlineable - the outlineable.
        style - the style to apply.
        See Also:
        Outline.apply(Outlineable)
      • applyOutlinesAndBackground

        public static void applyOutlinesAndBackground​(GraphicsContext g,
                                                      Size size,
                                                      Style style)
        Applies the different outlines and the background on the given graphics context and the given size.

        The given size must include the outlines of the widget. It is modified to the content size of the widget.

        The application order is: margin, background, border, padding.

        Parameters:
        g - the graphics context to modify.
        size - the size.
        style - the style to apply.
        See Also:
        Outline.apply(GraphicsContext, Size), Background.apply(GraphicsContext, int, int)