Class BaseBoxItem

  • All Implemented Interfaces:
    IsArea
    Direct Known Subclasses:
    BaseBoxNodeItem, ChartAreaNode

    public abstract class BaseBoxItem
    extends NativeObjectContainer
    implements IsArea
    Base object which maps the CHART.JS chart items which represents a box.
    This is a wrapper of the CHART.JS item with all needed info.
    Implements all get methods to change java script object properties.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getTop

        public final double getTop()
        Returns the top of chart area.
        Specified by:
        getTop in interface IsArea
        Returns:
        the top of chart area.
      • getRight

        public final double getRight()
        Returns the right of chart area.
        Specified by:
        getRight in interface IsArea
        Returns:
        the right of chart area.
      • getBottom

        public final double getBottom()
        Returns the bottom of chart area.
        Specified by:
        getBottom in interface IsArea
        Returns:
        the bottom of chart area.
      • getLeft

        public final double getLeft()
        Returns the left of chart area.
        Specified by:
        getLeft in interface IsArea
        Returns:
        the left of chart area.
      • getWidth

        public final double getWidth()
        Returns the width in pixel.
        Specified by:
        getWidth in interface IsArea
        Returns:
        the width in pixel.
      • getHeight

        public final double getHeight()
        Returns the height in pixel.
        Specified by:
        getHeight in interface IsArea
        Returns:
        the height in pixel.
      • isInside

        public boolean isInside​(NativeAbstractMouseEvent event)
        Returns true if the chart event is inside of this box, otherwise false.
        Parameters:
        event - event to check if inside the box
        Returns:
        true if the chart event is inside of this box, otherwise false
      • isInside

        public default boolean isInside​(NativeBaseEvent event)
        Returns true if the chart event is inside of a chart element, otherwise false.
        Parameters:
        event - event to check if inside of a chart element.
        Returns:
        true if the chart event is inside a chart element, otherwise false
      • isInside

        public default boolean isInside​(HasNativeEvent container)
        Returns true if the chart event is inside of this box, otherwise false.
        Parameters:
        container - event container to check if inside the box
        Returns:
        true if the chart event is inside of this box, otherwise false