Class WidgetChild
- java.lang.Object
-
- org.dreambot.api.wrappers.cache.nodes.NodeWrapper
-
- org.dreambot.api.wrappers.widgets.WidgetChild
-
- All Implemented Interfaces:
Node
public class WidgetChild extends NodeWrapper
-
-
Constructor Summary
Constructors Constructor Description WidgetChild(java.lang.Object reference)Note: This shouldn't be used by API users, it's an internal constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsMouse()Deprecated.not usedbooleanequals(java.lang.Object o)@Nullable java.lang.String[]getActions()Gets the Actions of a WidgetChildintgetActionType()Gets the action type of a WidgetChildintgetBorderThickness()Deprecated.not usefulintgetBoundsIndex()Gets the bounds index of a WidgetChild@Nullable WidgetChildgetChild(int id)Gets a specific WidgetChild of the WidgetChildintgetChildId()Gets the second level (child) ID of this WidgetChild@NonNull java.util.List<Item>getChildItems()Gets a List of Items from the WidgetChild's children@Nullable WidgetChild @NonNull []getChildren()Gets the Children of aWidgetChildintgetChildrenCount()intgetChildSequenceId()Deprecated.not usefulintgetChildTextureID()Deprecated.not usefulint[]getContentIds()Gets the Content IDs of a WidgetChildint[]getContentIDs()Deprecated.seegetContentIds()int[]getContentStackSizes()gets the Content stack sizes of a WidgetChildintgetContentType()intgetDisabledMediaID()Gets the Disabled Media ID of the WidgetChildintgetDisabledMediaType()Gets the Disabled Media Type of the WidgetChildintgetDragDeadTime()intgetEnabledMediaID()Gets the Enabled Media ID of the WidgetChildintgetEnabledMediaType()Gets the Enabled Media Type of the WidgetChildintgetGrandChildId()Gets the 3rd level (grandchild) ID of the WidgetChildintgetHeight()Gets the height of a WidgetChildintgetID()Deprecated.seegetChildId()intgetIndex()Deprecated.@NonNull ItemgetItem()Gets the Item held in the WidgetChildintgetItemId()Gets the Item ID of the WidgetChild@NonNull java.util.List<Item>getItems()Get a List of Items held in the WidgetChildintgetItemStack()Gets the item stack size of the WidgetChild@Nullable java.lang.StringgetLeftClickAction()intgetLoopCycle()Gets the Loop Cycle of the WidgetChildintgetModelRotationX()intgetModelRotationY()intgetModelRotationZ()java.lang.StringgetName()intgetParentID()Deprecated.seegetWidgetId()intgetRawId()Gets the Raw ID of the WidgetChild Used with bitwise conversions to find parent ID and child IDintgetRealID()Deprecated.seegetRawId()intgetRealParentID()Gets the Real Parent ID of the WidgetChild@NonNull java.awt.RectanglegetRectangle()Gets the Rectangle of the WidgetChildorg.dreambot.internal.injector.interfaces.RSWidgetgetReference()intgetRelativeX()Gets the Relative X location of the WidgetChildintgetRelativeY()Gets the Relative Y location of a WidgetChildintgetScrollMax()Gets the scroll max value of the WidgetChildintgetScrollX()Gets the scrolled X position of the WidgetChildintgetScrollY()Gets the scrolled Y position of theWidgetChild@Nullable java.lang.StringgetSelectedAction()Gets the selected action of the widget.intgetSequenceId()Gets the Sprite ID of the WidgetChildintgetSequenceIndex()Gets the Sprite ID of the WidgetChildintgetShadowColor()Deprecated.not useful@Nullable WidgetChildgetSibling(int offset)This returns the sibling, another WidgetChild with the same parent and grand parent if applicable, offset by the provided offset@Nullable java.lang.StringgetSpell()Gets the Spell of the WidgetChild.intgetSpriteAngle()intgetSubActionIndex(java.lang.String action)java.lang.String[][]getSubActions()@NonNull java.lang.StringgetText()Gets the Text of a WidgetChildintgetTextColor()Gets the text color of the WidgetChildintgetTextureId()Gets the Texture ID of the WidgetChild@Nullable java.lang.StringgetTooltip()Gets the tooltip of the WidgetChildintgetType()gets the type value of the WidgetChildintgetWidgetId()Gets the top level ID of the widgetintgetWidth()Gets the Width of the WidgetChildintgetX()Gets the X value of the location of the WidgetChildintgetY()Gets the Y value of the location of the WidgetChildbooleanhasAction(@NonNull java.lang.String action)Checks to see if any of this widget's actions contains (case-insensitive) the given actionbooleanhasActionExact(@NonNull java.lang.String action)Checks to see if this widget has the full given actioninthashCode()booleanhasListener()booleanhasScript()booleanhasSubAction(java.lang.String action)booleaninteract()Clicks the WidgetChildbooleaninteract(@NonNull Filter<java.lang.String> filter)Interacts with a WidgetChild with the first matching actionbooleaninteract(@Nullable java.lang.String action)Interacts with a WidgetChild with a specified actionbooleanisGrandChild()Checks if the WidgetChild is a grandchildbooleanisHidden()Checks if the WidgetChild is hiddenbooleanisVisible()Checks if the WidgetChild is visiblevoidsetContainsMouse(boolean contains)Deprecated.not usedvoidsetContentIds(int[] ids)voidsetContentIDs(int[] ids)Deprecated.voidsetContentStackSizes(int[] sizes)voidsetDragDeadTime(int time)voidsetHasListener(boolean has)voidsetHasScript(boolean has)Deprecated.not usefulvoidsetIndex(int index)voidsetItemId(int id)voidsetItemStack(int stack)voidsetText(java.lang.String text)java.lang.StringtoString()voidupdateReference(java.lang.Object reference)This shouldn't be used by API users, it's an internal method.-
Methods inherited from class org.dreambot.api.wrappers.cache.nodes.NodeWrapper
getNext, getPrevious, getUID
-
-
-
-
Method Detail
-
updateReference
public void updateReference(java.lang.Object reference)
This shouldn't be used by API users, it's an internal method.
-
getModelRotationX
public int getModelRotationX()
-
getModelRotationY
public int getModelRotationY()
-
getModelRotationZ
public int getModelRotationZ()
-
getSpriteAngle
public int getSpriteAngle()
-
getSequenceId
public int getSequenceId()
Gets the Sprite ID of the WidgetChild- Returns:
- int value of the sprite ID
-
getSequenceIndex
public int getSequenceIndex()
Gets the Sprite ID of the WidgetChild- Returns:
- int value of the sprite ID
-
getChildSequenceId
@Deprecated public int getChildSequenceId()
Deprecated.not usefulGets the Sprite ID of the WidgetChild- Returns:
- int value of the sprite ID
-
getTooltip
public @Nullable java.lang.String getTooltip()
Gets the tooltip of the WidgetChild- Returns:
- String value of the tooltip
-
getSpell
public @Nullable java.lang.String getSpell()
Gets the Spell of the WidgetChild.- Returns:
- String value of the Spell
-
getShadowColor
@Deprecated public int getShadowColor()
Deprecated.not usefulGets the shadow color of the WidgetChild- Returns:
- int value of the Shadow Color
-
getSelectedAction
public @Nullable java.lang.String getSelectedAction()
Gets the selected action of the widget.- Returns:
- String value of the selected action
-
getScrollMax
public int getScrollMax()
Gets the scroll max value of the WidgetChild- Returns:
- int value of the scroll max
-
getChildTextureID
@Deprecated public int getChildTextureID()
Deprecated.not usefulGets the Child Texture ID of the WidgetChild- Returns:
- int value of the child texture ID
-
getEnabledMediaType
public int getEnabledMediaType()
Gets the Enabled Media Type of the WidgetChild- Returns:
- int value of the enabled media type
-
getSibling
public @Nullable WidgetChild getSibling(int offset)
This returns the sibling, another WidgetChild with the same parent and grand parent if applicable, offset by the provided offset- Parameters:
offset- How far away, positive or negative, from this WidgetChild- Returns:
- WidgetChild sibling if it exists, null otherwise
-
getEnabledMediaID
public int getEnabledMediaID()
Gets the Enabled Media ID of the WidgetChild- Returns:
- int value of the enabled media id
-
getDisabledMediaID
public int getDisabledMediaID()
Gets the Disabled Media ID of the WidgetChild- Returns:
- int value of the disabled media id
-
getDisabledMediaType
public int getDisabledMediaType()
Gets the Disabled Media Type of the WidgetChild- Returns:
- int value of the disabled media type
-
getLoopCycle
public int getLoopCycle()
Gets the Loop Cycle of the WidgetChild- Returns:
- Loop Cycle of WidgetChild
-
getScrollX
public int getScrollX()
Gets the scrolled X position of the WidgetChild- Returns:
- Scroll X position ofWidgetChild
-
getScrollY
public int getScrollY()
Gets the scrolled Y position of theWidgetChild- Returns:
- Scroll Y position of the WidgetChild
-
getTextColor
public int getTextColor()
Gets the text color of the WidgetChild- Returns:
- Text color of the WidgetChild
-
getActions
public @Nullable java.lang.String[] getActions()
Gets the Actions of a WidgetChild- Returns:
- Array of actions of WidgetChild
-
getActionType
public int getActionType()
Gets the action type of a WidgetChild- Returns:
- Action type of WidgetChild
-
getBorderThickness
@Deprecated public int getBorderThickness()
Deprecated.not usefulGets the border thickness of a WidgetChild- Returns:
- Border thickness of WidgetChild
-
getBoundsIndex
public int getBoundsIndex()
Gets the bounds index of a WidgetChild- Returns:
- Bounds index of WidgetChild
-
getChildren
public @Nullable WidgetChild @NonNull [] getChildren()
Gets the Children of aWidgetChild- Returns:
- Array of WidgetChild
-
getChildrenCount
public int getChildrenCount()
-
getChild
public @Nullable WidgetChild getChild(int id)
Gets a specific WidgetChild of the WidgetChild- Parameters:
id- Id of the WidgetChild to grab- Returns:
- WidgetChild with specified ID or null
-
getText
public @NonNull java.lang.String getText()
Gets the Text of a WidgetChild- Returns:
- Text of a WidgetChild
-
setText
public void setText(java.lang.String text)
-
getName
public java.lang.String getName()
-
getContentIds
public int[] getContentIds()
Gets the Content IDs of a WidgetChild- Returns:
- Array of ints making up the Content IDs of a WidgetChild
-
getContentIDs
@Deprecated public int[] getContentIDs()
Deprecated.seegetContentIds()
-
setContentIds
public void setContentIds(int[] ids)
-
setContentIDs
@Deprecated public void setContentIDs(int[] ids)
Deprecated.
-
getContentStackSizes
public int[] getContentStackSizes()
gets the Content stack sizes of a WidgetChild- Returns:
- array of ints making up the content stack sizes of a WidgetChild
-
setContentStackSizes
public void setContentStackSizes(int[] sizes)
-
getRealID
@Deprecated public int getRealID()
Deprecated.seegetRawId()Gets the Real ID of aWidgetChild- Returns:
- real ID of a WidgetChild
-
getRawId
public int getRawId()
Gets the Raw ID of the WidgetChild Used with bitwise conversions to find parent ID and child ID- Returns:
- raw ID of this WidgetChild
-
getID
@Deprecated public int getID()
Deprecated.seegetChildId()Gets the ID of a WidgetChild- Returns:
- the ID of the WidgetChild
-
getChildId
public int getChildId()
Gets the second level (child) ID of this WidgetChild- Returns:
- The Child ID of the WidgetChild
-
getHeight
public int getHeight()
Gets the height of a WidgetChild- Returns:
- height of WidgetChild
-
getType
public int getType()
gets the type value of the WidgetChild- Returns:
- Integer value of the type of the WidgetChild
-
getWidth
public int getWidth()
Gets the Width of the WidgetChild- Returns:
- Width of the WidgetChild
-
getTextureId
public int getTextureId()
Gets the Texture ID of the WidgetChild- Returns:
- Texture ID of the WidgetChild
-
getX
public int getX()
Gets the X value of the location of the WidgetChild- Returns:
- X value of the location of the WidgetChild
-
getY
public int getY()
Gets the Y value of the location of the WidgetChild- Returns:
- Y value of the location of the WidgetChild
-
getIndex
@Deprecated public int getIndex()
Deprecated.gets the Index of the WidgetChild(can be used to find ID of a grandchild WidgetChild)- Returns:
- Index of the WidgetChild
-
getGrandChildId
public int getGrandChildId()
Gets the 3rd level (grandchild) ID of the WidgetChild- Returns:
- 3rd level ID of the WidgetChild, -1 if it is not a grandchild widget.
-
setIndex
public void setIndex(int index)
-
getParentID
@Deprecated public int getParentID()
Deprecated.seegetWidgetId()Gets the parent ID of a WidgetChild- Returns:
- parent ID of the WidgetChild
-
getWidgetId
public int getWidgetId()
Gets the top level ID of the widget- Returns:
- top level ID of the widget (parent ID)
-
getRealParentID
public int getRealParentID()
Gets the Real Parent ID of the WidgetChild- Returns:
- Real Parent ID of the WidgetChild
-
getRelativeY
public int getRelativeY()
Gets the Relative Y location of a WidgetChild- Returns:
- Relative Y location of a WidgetChild
-
getRelativeX
public int getRelativeX()
Gets the Relative X location of the WidgetChild- Returns:
- Relative X location of the WidgetChild
-
isHidden
public boolean isHidden()
Checks if the WidgetChild is hidden- Returns:
- True if WidgetChild is hidden, else false
-
isVisible
public boolean isVisible()
Checks if the WidgetChild is visible- Returns:
- True if visible, else False
-
getItemId
public int getItemId()
Gets the Item ID of the WidgetChild- Returns:
- Item ID of the WidgetChild
-
setItemId
public void setItemId(int id)
-
getItemStack
public int getItemStack()
Gets the item stack size of the WidgetChild- Returns:
- Item stack size of the WidgetChild
-
setItemStack
public void setItemStack(int stack)
-
getRectangle
public @NonNull java.awt.Rectangle getRectangle()
Gets the Rectangle of the WidgetChild- Returns:
- Rectangle of the WidgetChild
-
getChildItems
public @NonNull java.util.List<Item> getChildItems()
Gets a List of Items from the WidgetChild's children- Returns:
- List of Items from WidgetChild children
-
getItem
public @NonNull Item getItem()
Gets the Item held in the WidgetChild- Returns:
- Item inside of the WidgetChild
-
getItems
public @NonNull java.util.List<Item> getItems()
Get a List of Items held in the WidgetChild- Returns:
- List of Items held in the WidgetChild
-
interact
public boolean interact()
Clicks the WidgetChild- Returns:
- True if click was successful, else False
-
interact
public boolean interact(@Nullable java.lang.String action)
Interacts with a WidgetChild with a specified action- Parameters:
action- Action to interact with- Returns:
- True if interaction successful, else False
-
interact
public boolean interact(@NonNull Filter<java.lang.String> filter)
Interacts with a WidgetChild with the first matching action- Parameters:
filter- Action filter- Returns:
- True if interaction successful, else False
-
isGrandChild
public boolean isGrandChild()
Checks if the WidgetChild is a grandchild- Returns:
- True if grandchild, else false
-
hasAction
public boolean hasAction(@NonNull java.lang.String action)
Checks to see if any of this widget's actions contains (case-insensitive) the given action- Parameters:
action- Action to check for in this widget- Returns:
- True if any of this widget's actions contains the given action (case-insensitive) else False
-
hasActionExact
public boolean hasActionExact(@NonNull java.lang.String action)
Checks to see if this widget has the full given action- Parameters:
action- Action to check for in the widget- Returns:
- True if any action in this widget equalsIgnoreCase the action given, else false
-
getLeftClickAction
public @Nullable java.lang.String getLeftClickAction()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getReference
public org.dreambot.internal.injector.interfaces.RSWidget getReference()
- Overrides:
getReferencein classNodeWrapper
-
getContentType
public int getContentType()
-
containsMouse
@Deprecated public boolean containsMouse()
Deprecated.not used- Returns:
-
setContainsMouse
@Deprecated public void setContainsMouse(boolean contains)
Deprecated.not used- Parameters:
contains-
-
getDragDeadTime
public int getDragDeadTime()
-
setDragDeadTime
public void setDragDeadTime(int time)
-
hasListener
public boolean hasListener()
-
setHasListener
public void setHasListener(boolean has)
-
hasScript
public boolean hasScript()
-
setHasScript
@Deprecated public void setHasScript(boolean has)
Deprecated.not useful- Parameters:
has-
-
getSubActions
public java.lang.String[][] getSubActions()
-
hasSubAction
public boolean hasSubAction(java.lang.String action)
-
getSubActionIndex
public int getSubActionIndex(java.lang.String action)
-
-