Class Overlay

    • Constructor Detail

      • Overlay

        protected Overlay()
      • Overlay

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

      • setPriority

        public void setPriority​(float priority)
      • setPriority

        public void setPriority​(OverlayPriority overlayPriority)
      • getName

        public String getName()
        Overlay name, used for saving the overlay, needs to be unique
        Returns:
        overlay name
      • 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()
      • getPriority

        public float getPriority()
        The overlay priority, which determines the order the overlay renders in relative to other overlays.
      • 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