Class Overlay

    • Constructor Detail

      • Overlay

        protected Overlay()
      • Overlay

        protected Overlay​(@Nullable
                          Plugin plugin)
    • Method Detail

      • getName

        public String getName()
        Overlay name, used for saving the overlay, needs to be unique
        Returns:
        overlay name
      • drawAfterInterface

        protected void drawAfterInterface​(int interfaceId)
        Configure to draw this overlay after the given interface is drawn. Except in rare circumstances, you probably also want to setLayer(OverlayLayer) to OverlayLayer.MANUAL to avoid the overlay being drawn a 2nd time during the default OverlayLayer.UNDER_WIDGETS pass.
        Parameters:
        interfaceId - The interface id
        See Also:
        WidgetID
      • onMouseOver

        public void onMouseOver()
      • onDrag

        public boolean onDrag​(Overlay other)
        Called when an overlay is dragged onto this, if dragTargetable is true. Return true to consume the mouse event and prevent the other overlay from being moved
        Parameters:
        other - the overlay being dragged
        Returns:
      • getParentBounds

        @Nullable
        public Rectangle getParentBounds()
        Get the parent bounds for overlay dragging. The overlay will not be allowed to be moved outside of the parent bounds.
        Returns:
      • revalidate

        public void revalidate()
      • getPlugin

        @Nullable
        public Plugin getPlugin()
      • getPreferredLocation

        public Point getPreferredLocation()
      • getPreferredSize

        public Dimension getPreferredSize()
      • isResizable

        public boolean isResizable()
      • getMinimumSize

        public int getMinimumSize()
      • isResettable

        public boolean isResettable()
      • isDragTargetable

        public boolean isDragTargetable()
        Whether this overlay can be dragged onto other overlays & have other overlays dragged onto it.
      • isMovable

        public boolean isMovable()
        Whether this overlay can be moved with alt
      • isSnappable

        public boolean isSnappable()
        Whether this overlay can be moved to a snap corner and have its preferredPosition changed
      • setPreferredPosition

        public void setPreferredPosition​(OverlayPosition preferredPosition)
      • setBounds

        public void setBounds​(Rectangle bounds)
      • setResizable

        public void setResizable​(boolean resizable)
      • setMinimumSize

        public void setMinimumSize​(int minimumSize)
      • setResettable

        public void setResettable​(boolean resettable)
      • setDragTargetable

        protected void setDragTargetable​(boolean dragTargetable)
        Whether this overlay can be dragged onto other overlays & have other overlays dragged onto it.
      • setMovable

        protected void setMovable​(boolean movable)
        Whether this overlay can be moved with alt
      • setSnappable

        protected void setSnappable​(boolean snappable)
        Whether this overlay can be moved to a snap corner and have its preferredPosition changed