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, int j)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String[]
getActions()
Gets the Actions of a WidgetChildint
getActionType()
Gets the action type of a WidgetChildint
getBorderThickness()
Gets the border thickness of a WidgetChildint
getBoundsIndex()
Gets the bounds index of a WidgetChildWidgetChild
getChild(int id)
Gets a specific WidgetChild of the WidgetChildjava.util.List<Item>
getChildItems()
Gets a List of Items from the WidgetChild's childrenWidgetChild[]
getChildren()
Gets the Children of aWidgetChildint
getChildSequenceId()
Gets the Sprite ID of the WidgetChildint
getChildTextureID()
Gets the Child Texture ID of the WidgetChildint[]
getContentIDs()
Gets the Content IDs of a WidgetChildint[]
getContentStackSizes()
gets the Content stack sizes of a WidgetChildint
getDisabledMediaID()
Gets the Disabled Media ID of the WidgetChildint
getDisabledMediaType()
Gets the Disabled Media Type of the WidgetChildint
getEnabledMediaID()
Gets the Enabled Media ID of the WidgetChildint
getEnabledMediaType()
Gets the Enabled Media Type of the WidgetChildint
getHeight()
Gets the height of a WidgetChildint
getID()
Gets the ID of a WidgetChildint
getIndex()
gets the Index of the WidgetChild(can be used to find ID of a grandchild WidgetChild)Item
getItem()
Gets the Item held in the WidgetChildint
getItemId()
Gets the Item ID of the WidgetChildjava.util.List<Item>
getItems()
Get a List of Items held in the WidgetChildint
getItemStack()
Gets the item stack size of the WidgetChildint
getLoopCycle()
Gets the Loop Cycle of the WidgetChildint
getParentID()
Gets the parent ID of a WidgetChildint
getRealID()
Gets the Real ID of aWidgetChildint
getRealParentID()
Gets the Real Parent ID of the WidgetChildjava.awt.Rectangle
getRectangle()
Gets the Rectangle of the WidgetChildint
getRelativeX()
Gets the Relative X location of the WidgetChildint
getRelativeY()
Gets the Relative Y location of a WidgetChildint
getScrollMax()
Gets the scroll max value of the WidgetChildint
getScrollX()
Gets the scrolled X position of the WidgetChildint
getScrollY()
Gets the scroleld Y position of theWidgetChildjava.lang.String
getSelectedAction()
Gets the selected action of the widget.int
getSequenceId()
Gets the Sprite ID of the WidgetChildint
getSequenceIndex()
Gets the Sprite ID of the WidgetChildint
getShadowColor()
Gets the shadow color of the WidgetChildWidgetChild
getSibling(int offset)
This returns the sibling, another WidgetChild with the same parent and grand parent if applicable, offset by the provided offsetjava.lang.String
getSpell()
Gets the Spell of the WidgetChild.int
getSpriteID()
Deprecated.seegetTextureId()
java.lang.String
getText()
Gets the Text of a WidgetChildint
getTextColor()
Gets the text color of the WidgetChildint
getTextureId()
Gets the Texture ID of the WidgetChildjava.lang.String
getTooltip()
Gets the tooltip of the WidgetChildint
getType()
gets the type value of the WidgetChildint
getWidth()
Gets the Width of the WidgetChildint
getX()
Gets the X value of the location of the WidgetChildint
getY()
Gets the Y value of the location of the WidgetChildboolean
hasAction(java.lang.String action)
boolean
interact()
Clicks the WidgetChildboolean
interact(java.lang.String action)
Interacts with a WidgetChild with a specified actionboolean
interact(Filter<java.lang.String> filter)
Interacts with a WidgetChild with the first matching actionboolean
isGrandChild()
Checks if the WidgetChild is a grandchildboolean
isHidden()
Checks if the WidgetChild is hiddenboolean
isVisible()
Checks if the WidgetChild is visiblevoid
setIndex(int index)
java.lang.String
toString()
void
updateReference(java.lang.Object reference)
-
Methods inherited from class org.dreambot.api.wrappers.cache.nodes.NodeWrapper
getNext, getPrevious, getReference, getUID
-
-
-
-
Method Detail
-
updateReference
public void updateReference(java.lang.Object reference)
-
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
public int getChildSequenceId()
Gets the Sprite ID of the WidgetChild- Returns:
- int value of the sprite ID
-
getTooltip
public java.lang.String getTooltip()
Gets the tooltip of the WidgetChild- Returns:
- String value of the tooltip
-
getSpriteID
@Deprecated public int getSpriteID()
Deprecated.seegetTextureId()
Gets the Sprite ID of the WidgetChild- Returns:
- int value of the sprite ID
-
getSpell
public java.lang.String getSpell()
Gets the Spell of the WidgetChild.- Returns:
- String value of the Spell
-
getShadowColor
public int getShadowColor()
Gets the shadow color of the WidgetChild- Returns:
- int value of the Shadow Color
-
getSelectedAction
public 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
public int getChildTextureID()
Gets 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 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 scroleld 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 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
public int getBorderThickness()
Gets 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 WidgetChild[] getChildren()
Gets the Children of aWidgetChild- Returns:
- Array of WidgetChild
-
getChild
public 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 java.lang.String getText()
Gets the Text of a WidgetChild- Returns:
- Text of a WidgetChild
-
getContentIDs
public int[] getContentIDs()
Gets the Content IDs of a WidgetChild- Returns:
- Array of ints making up the Content IDs of a WidgetChild
-
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
-
getRealID
public int getRealID()
Gets the Real ID of aWidgetChild- Returns:
- real ID of a WidgetChild
-
getID
public int getID()
Gets the ID of a WidgetChild- Returns:
- the 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
public int getIndex()
gets the Index of the WidgetChild(can be used to find ID of a grandchild WidgetChild)- Returns:
- Index of the WidgetChild
-
setIndex
public void setIndex(int index)
-
getParentID
public int getParentID()
Gets the parent ID of a WidgetChild- Returns:
- parent ID of the WidgetChild
-
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
-
getItemStack
public int getItemStack()
Gets the item stack size of the WidgetChild- Returns:
- Item stack size of the WidgetChild
-
getRectangle
public java.awt.Rectangle getRectangle()
Gets the Rectangle of the WidgetChild- Returns:
- Rectangle of the WidgetChild
-
getChildItems
public java.util.List<Item> getChildItems()
Gets a List of Items from the WidgetChild's children- Returns:
- List of Items from WidgetChild children
-
getItem
public Item getItem()
Gets the Item held in the WidgetChild- Returns:
- Item inside of the WidgetChild
-
getItems
public 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(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(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(java.lang.String action)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-