Interface Widget

    • Method Detail

      • addMouseLeftClickListener

        void addMouseLeftClickListener​(be.yildizgames.module.window.input.MouseLeftClickListener listener)
        Add a new MouseClickListener on this widget.
        Parameters:
        listener - Listener to add.
      • addMouseRightClickListener

        void addMouseRightClickListener​(be.yildizgames.module.window.input.MouseRightClickListener listener)
      • addMouseDoubleLeftClickListener

        void addMouseDoubleLeftClickListener​(be.yildizgames.module.window.input.MouseDoubleLeftClickListener listener)
        Add a new MouseDoubleClickListener on this widget.
        Parameters:
        listener - Listener to add.
      • addMouseReleaseListener

        void addMouseReleaseListener​(be.yildizgames.module.window.input.MouseReleaseListener listener)
        Add a new MouseReleaseClickListener on this widget.
        Parameters:
        listener - Listener to add.
      • removeAllClickListeners

        void removeAllClickListeners()
        Clear the list of all click listeners.
      • addKeyboardListener

        void addKeyboardListener​(be.yildizgames.module.window.input.KeyboardListener listener)
        Add a new KeyboardListener on this widget and set the widget focusable.
        Parameters:
        listener - Listener to add.
      • addMouseMoveListener

        void addMouseMoveListener​(be.yildizgames.module.window.input.MouseMoveListener listener)
        Add a new MouseMoveListener on this widget.
        Parameters:
        listener - Listener to add.
      • addMouseWheelListener

        void addMouseWheelListener​(be.yildizgames.module.window.input.MouseWheelListener listener)
        Add a new MouseWheelListener on this widget.
        Parameters:
        listener - Listener to add.
      • addMouseDragListener

        void addMouseDragListener​(be.yildizgames.module.window.input.MouseDragListener listener)
        Add a new MouseDragListener on this widget.
        Parameters:
        listener - Listener to add.
      • addOnMouseOverListener

        void addOnMouseOverListener​(OnMouseOverListener listener)
        Add a new OnMouseOverListener on this widget.
        Parameters:
        listener - Listener to add.
      • contains

        boolean contains​(be.yildizgames.module.window.input.MousePosition position)
        Check if a point in contained in this container.
        Parameters:
        position - Point coordinates.
        Returns:
        true if the point is contained in this container, false otherwise.
      • contains

        boolean contains​(int x,
                         int y)
      • addEmptyZone

        void addEmptyZone​(be.yildizgames.common.geometry.Rectangle zone)
        Add a zone to ignore when checking if the container contains the mouse, if the mouse position is inside this zone, it will be considered as outside of the container.
        Parameters:
        zone - Empty zone.
      • align

        void align​(Element.Alignment alignment)
        Align the widget
        Parameters:
        alignment - New alignment value.
      • getAbsoluteLeft

        int getAbsoluteLeft()
        Give the absolute left position instead of relative from parent.
        Returns:
        The parent left position + the widget left position.
      • getAbsoluteTop

        int getAbsoluteTop()
        Give the absolute top position instead of relative from parent.
        Returns:
        The parent top position + the widget top position.
      • playAnimation

        void playAnimation​(String animation)
      • stopAnimation

        void stopAnimation​(String name)
      • focus

        void focus​(boolean b)
      • isFocusable

        boolean isFocusable()
      • highlight

        void highlight​(boolean b)