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 RectanglegetCanvasBounds()Get the area where the widget item is drawn on the canvas, accounting for dragRectanglegetCanvasBounds(boolean dragging)Get the area where the widget item is drawn on the canvasPointgetCanvasLocation()Gets the upper-left coordinate of where the widget is being drawn on the canvas, accounting for drag.RectanglegetDraggingCanvasBounds()The canvas bounds for the widget, if it is being dragged.intgetId()The ID of the item represented.intgetQuantity()The quantity of the represented item.WidgetgetWidget()The widget which contains this item.StringtoString()
-
-
-
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.
-
-