Class ArrayCanvas

  • All Implemented Interfaces:
    IsJSType

    @JsType(isNative=true,
            name="Array",
            namespace="<global>")
    public final class ArrayCanvas
    extends Array
    Array object which maps the java script object.
    A simple wrapper around a homogeneous native array of object (HTMLCanvasElement) values.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • fromOrNull

        @JsOverlay
        public static ArrayCanvas fromOrNull​(Canvas... items)
        This method creates new array instance with a variable number of HTMLCanvasElement arguments.
        Parameters:
        items - HTMLCanvasElement items to create new array
        Returns:
        new array instance of canvas or null if argument is null or length to 0
      • fromOrEmpty

        @JsOverlay
        public static ArrayCanvas fromOrEmpty​(Canvas... items)
        This method creates new array instance with a variable number of HTMLCanvasElement arguments.
        Parameters:
        items - HTMLCanvasElement items to create new array
        Returns:
        new array instance of canvas or an empty array if argument is null or length to 0
      • fromOrNull

        @JsOverlay
        public static ArrayCanvas fromOrNull​(List<Canvas> items)
        Creates a java script array of canvas starting from list of canvas.
        Parameters:
        items - list of canvas to load in the new java script array.
        Returns:
        new array instance of canvas or null if argument is null or empty
      • fromOrEmpty

        @JsOverlay
        public static ArrayCanvas fromOrEmpty​(List<Canvas> items)
        Creates a java script array of canvas starting from list of canvas.
        Parameters:
        items - list of canvas to load in the new java script array.
        Returns:
        new array instance of canvas or an empty array if argument is null or empty
      • get

        @JsOverlay
        public Canvas get​(int index)
        Gets the value at a given index. If no value exists at the given index, a type-conversion error will occur in Development Mode and unpredictable behavior may occur in Production Mode. If the numeric value returned is non-integral, it will cause a warning in Development Mode, and may affect the results of mathematical expressions.
        Parameters:
        index - the index to be retrieved
        Returns:
        the value at the given index