Package net.runelite.api.widgets
Class WidgetItem
- java.lang.Object
-
- net.runelite.api.widgets.WidgetItem
-
-
Constructor Summary
Constructors Constructor Description WidgetItem(int id, int quantity, Rectangle canvasBounds, Widget widget, Rectangle draggingCanvasBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rectangle
getCanvasBounds()
Get the area where the widget item is drawn on the canvas, accounting for dragRectangle
getCanvasBounds(boolean dragging)
Get the area where the widget item is drawn on the canvasPoint
getCanvasLocation()
Gets the upper-left coordinate of where the widget is being drawn on the canvas, accounting for drag.Rectangle
getDraggingCanvasBounds()
The canvas bounds for the widget, if it is being dragged.int
getId()
The ID of the item represented.int
getQuantity()
The quantity of the represented item.Widget
getWidget()
The widget which contains this item.String
toString()
-
-
-
Method Detail
-
getCanvasBounds
public Rectangle getCanvasBounds()
Get the area where the widget item is drawn on the canvas, accounting for drag- Returns:
-
getCanvasBounds
public Rectangle getCanvasBounds(boolean dragging)
Get the area where the widget item is drawn on the canvas- Parameters:
dragging
- whether the returned area should account for widget drag- Returns:
-
getCanvasLocation
public Point getCanvasLocation()
Gets the upper-left coordinate of where the widget is being drawn on the canvas, accounting for drag.- Returns:
- the upper-left coordinate of where this widget is drawn
-
getId
public int getId()
The ID of the item represented.- See Also:
ItemID
-
getQuantity
public int getQuantity()
The quantity of the represented item.
-
getWidget
public Widget getWidget()
The widget which contains this item.
-
getDraggingCanvasBounds
@Nullable public Rectangle getDraggingCanvasBounds()
The canvas bounds for the widget, if it is being dragged.
-
-