Package rsb.wrappers

Class RSWidgetItem

java.lang.Object
rsb.methods.MethodProvider
rsb.wrappers.RSWidgetItem

public class RSWidgetItem extends MethodProvider
  • Method Details

    • isValid

      public boolean isValid()
    • doAction

      public boolean doAction(String action)
      Performs the given action on this RSInterfaceChild if it is showing (valid).
      Parameters:
      action - The menu action to click.
      Returns:
      true if the action was clicked; otherwise false.
    • doAction

      public boolean doAction(String action, String option)
      Performs the given action on this RSInterfaceChild if it is showing (valid).
      Parameters:
      action - The menu action to click.
      option - The option of the menu action to click.
      Returns:
      true if the action was clicked; otherwise false.
    • doClick

      public boolean doClick()
      Left-clicks this component.
      Returns:
      true if the component was clicked.
    • doClick

      public boolean doClick(boolean leftClick)
      Clicks this component.
      Parameters:
      leftClick - true to left-click; false to right-click.
      Returns:
      true if the component was clicked.
    • doHover

      public boolean doHover()
      Moves the mouse over this component (with normally distributed randomness) if it is not already.
      Returns:
      true if the mouse was moved; otherwise false.
    • getArea

      public Rectangle getArea()
      Gets the canvas area of the item
      Returns:
      the canvas area
    • getItemId

      public int getItemId()
      Gets the item id of this item
      Returns:
      item id
    • getItemIndex

      public int getItemIndex()
      Gets the item's index in the parent widget
      Returns:
      item index
    • getStackSize

      public int getStackSize()
      Gets the stack size of the item
      Returns:
      the stack size
    • getItemLocation

      public net.runelite.api.Point getItemLocation()