Class FlexibleRectangularMulticoloredBorder

  • All Implemented Interfaces:
    Outline

    public class FlexibleRectangularMulticoloredBorder
    extends FlexibleOutline
    Represents and draw a rectangular border with different thicknesses and colors.

    Each edge color can be customized.

    The thicknesses are stored as a char for heap optimization and therefore cannot exceed 65535.

    • Constructor Detail

      • FlexibleRectangularMulticoloredBorder

        public FlexibleRectangularMulticoloredBorder​(int top,
                                                     int colorTop,
                                                     int right,
                                                     int colorRight,
                                                     int bottom,
                                                     int colorBottom,
                                                     int left,
                                                     int colorLeft)
        Creates a flexible rectangular border specifying its edges thickness and color.

        The given thickness values are clamped between 0 and Character.MAX_VALUE.

        Parameters:
        top - the top thickness.
        colorTop - the top color.
        right - the right thickness.
        colorRight - the right color.
        bottom - the bottom thickness.
        colorBottom - the bottom color.
        left - the left thickness.
        colorLeft - the left color.
    • Method Detail

      • getColorTop

        public int getColorTop()
        Gets the top color.
        Returns:
        the top color.
      • getColorBottom

        public int getColorBottom()
        Gets the bottom color.
        Returns:
        the bottom color.
      • getColorLeft

        public int getColorLeft()
        Gets the left color.
        Returns:
        the left color.
      • getColorRight

        public int getColorRight()
        Gets the right color.
        Returns:
        the right color.
      • apply

        public void apply​(ej.microui.display.GraphicsContext g,
                          Size size)
        Description copied from interface: Outline
        Applies the outline on a graphics context.
        Specified by:
        apply in interface Outline
        Overrides:
        apply in class FlexibleOutline
        Parameters:
        g - the graphics context.
        size - the size to apply on.