Package rsb.wrappers
Class RSWidget
java.lang.Object
rsb.methods.MethodProvider
rsb.wrappers.RSWidget
- All Implemented Interfaces:
Clickable,Clickable07
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods -
Constructor Summary
ConstructorsConstructorDescriptionRSWidget(MethodContext ctx, int parentId, int id) RSWidget(MethodContext ctx, net.runelite.api.widgets.Widget widget) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAction(String phrase) Checks the actions of the child for a given substringbooleancontainsText(String phrase) Checks the text of this component for a given substringbooleanPerforms the given action on this RSInterfaceChild if it is showing (valid).booleanPerforms the given action on this RSInterfaceChild if it is showing (valid).booleandoClick()Left-clicks this component.booleandoClick(boolean leftClick) Clicks this component.booleandoHover()Moves the mouse over this component (with normally distributed randomness) if it is not already.booleanintGets the absolute x position of the child, calculated from the beginning of the game screenintGets the absolute y position of the child, calculated from the beginning of the game screenString[]Gets the actions of this component.getArea()Gets the area of this componentintGets the text color of this componentintGets the border thickness of this componentReturns the center point of this interfaceintGets the child index of this widgetgetComponent(int idx) Gets the child component at a given indexRSWidget[]The child components (bank items etc) of this component.getDynamicComponent(int idx) intGets the FontID of this componentintGets the group index of this widgetintGets the height of this componentintintgetId()Gets the id of this componentintgetIndex()Gets the index of this componentintGets the item ID of this componentGets the absolute position of the childintGets the model ID of this componentgetName()Gets the name of this componentGets the parent widgetintGets the parent id of this component.intintintGets the relative x position of the child, calculated from the beginning of the interfaceintGets the relative y position of the child, calculated from the beginning of the interfaceintintGets the selected action name of this componentintGets the sprite ID of this componentintGets the stack size of this componentgetText()Gets the text of this componentintgetType()Gets the type of this componentint[][]Gets the value index array of this componentintgetWidgetItem(int idx) intgetWidth()Gets the width of this componentinthashCode()booleanbooleanbooleanbooleanReturns whether the text is shadowedbooleanisValid()boolean
-
Constructor Details
-
RSWidget
-
RSWidget
-
-
Method Details
-
isValid
public boolean isValid() -
isVisible
public boolean isVisible() -
isSelfVisible
public boolean isSelfVisible() -
doAction
Performs the given action on this RSInterfaceChild if it is showing (valid). -
doAction
Performs the given action on this RSInterfaceChild if it is showing (valid). -
doClick
public boolean doClick()Left-clicks this component. -
doClick
public boolean doClick(boolean leftClick) Clicks this component. -
doHover
public boolean doHover()Moves the mouse over this component (with normally distributed randomness) if it is not already. -
getAbsoluteX
public int getAbsoluteX()Gets the absolute x position of the child, calculated from the beginning of the game screen- Returns:
- the absolute x or -1 if null
-
getAbsoluteY
public int getAbsoluteY()Gets the absolute y position of the child, calculated from the beginning of the game screen- Returns:
- the absolute y position or -1 if null
-
getArea
Gets the area of this component- Returns:
- the area or new Rectangle(-1, -1, -1, -1) if null
-
getComponents
The child components (bank items etc) of this component.- Returns:
- The components or RSWidget[0] if null
-
getWidgetItems
-
getWidgetItem
-
getDynamicComponent
-
getComponent
Gets the child component at a given index- Parameters:
idx- The child index- Returns:
- The child component, or null
-
getBorderThickness
public int getBorderThickness()Gets the border thickness of this component- Returns:
- the border thickness or -1 if null
-
getId
public int getId()Gets the id of this component- Returns:
- The id of this component, or -1 if component == null
-
getIndex
public int getIndex()Gets the index of this component- Returns:
- The index of this component, or -1 if component == null
-
getStackSize
public int getStackSize()Gets the stack size of this component- Returns:
- The stack size of this component, or -1 if component == null
-
getName
Gets the name of this component- Returns:
- The name of this component, or "" if component == null
-
getHeight
public int getHeight()Gets the height of this component- Returns:
- the height of this component or -1 if null
-
getSpriteId
public int getSpriteId()Gets the sprite ID of this component- Returns:
- the sprite ID or -1 if null
-
getItemId
public int getItemId()Gets the item ID of this component- Returns:
- the item ID or -1 if null
-
getModelId
public int getModelId()Gets the model ID of this component- Returns:
- the model ID or -1 if null
-
getParentId
public int getParentId()Gets the parent id of this component. It will first look at the internal parentID, if that's -1 then it will search the RSInterfaceNC to find its parent.- Returns:
- the parentID or -1 if none
-
getParent
Gets the parent widget- Returns:
- the parent widget for this RSWidget object
-
getGroupIndex
public int getGroupIndex()Gets the group index of this widget- Returns:
- the group index
-
getChildIndex
public int getChildIndex()Gets the child index of this widget- Returns:
- the child index
-
getLocation
Gets the absolute position of the child- Returns:
- the absolute position or new Point(-1, -1) if null
-
getCenter
Returns the center point of this interface- Returns:
- The center point of this interface
-
getRelativeX
public int getRelativeX()Gets the relative x position of the child, calculated from the beginning of the interface- Returns:
- the relative x position or -1 if null
-
getRelativeY
public int getRelativeY()Gets the relative y position of the child, calculated from the beginning of the interface- Returns:
- the relative y position -1 if null
-
getVerticalScrollPosition
public int getVerticalScrollPosition() -
getHorizontalScrollPosition
public int getHorizontalScrollPosition() -
getScrollableContentHeight
public int getScrollableContentHeight() -
getScrollableContentWidth
public int getScrollableContentWidth() -
getRealHeight
public int getRealHeight() -
getRealWidth
public int getRealWidth() -
isInScrollableArea
public boolean isInScrollableArea() -
getSelectedActionName
Gets the selected action name of this component- Returns:
- the selected action name or "" if null
-
getText
Gets the text of this component- Returns:
- the text or "" if null
-
getBackgroundColor
public int getBackgroundColor()Gets the text color of this component- Returns:
- the text color or -1 if null
-
getFontID
public int getFontID()Gets the FontID of this component- Returns:
- the fontID or -1 if null
-
isTextShadowed
public boolean isTextShadowed()Returns whether the text is shadowed- Returns:
- true unless font isn't shadowed or component is null
-
getType
public int getType()Gets the type of this component- Returns:
- the type or -1 if null
-
containsAction
Checks the actions of the child for a given substring- Parameters:
phrase- The phrase to check for- Returns:
trueif found
-
getActions
Gets the actions of this component.- Returns:
- the actions or an empty array if null
-
containsText
Checks the text of this component for a given substring- Parameters:
phrase- The phrase to check for- Returns:
trueif the text contained the phrase- See Also:
-
getValueIndexArray
public int[][] getValueIndexArray()Gets the value index array of this component- Returns:
- the value index array or new int[0][0] if null
-
getWidth
public int getWidth()Gets the width of this component- Returns:
- the width of the component or -1 if null
-
getBounds
-
equals
-
hashCode
public int hashCode() -
isClickable
public boolean isClickable()- Specified by:
isClickablein interfaceClickable07
-