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 Modifier and Type Method Description boolean
containsMouse()
boolean
equals(java.lang.Object o)
@Nullable 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 WidgetChild@Nullable WidgetChild
getChild(int id)
Gets a specific WidgetChild of the 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 aWidgetChildint
getChildrenCount()
int
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
getContentType()
int
getDisabledMediaID()
Gets the Disabled Media ID of the WidgetChildint
getDisabledMediaType()
Gets the Disabled Media Type of the WidgetChildint
getDragDeadTime()
int
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)@NonNull Item
getItem()
Gets the Item held in the WidgetChildint
getItemId()
Gets the Item ID of the WidgetChild@NonNull java.util.List<Item>
getItems()
Get a List of Items held in the WidgetChildint
getItemStack()
Gets the item stack size of the WidgetChild@Nullable java.lang.String
getLeftClickAction()
int
getLoopCycle()
Gets the Loop Cycle of the WidgetChildint
getModelRotationX()
int
getModelRotationY()
int
getModelRotationZ()
java.lang.String
getName()
int
getParentID()
Gets the parent ID of a WidgetChildint
getRealID()
Gets the Real ID of aWidgetChildint
getRealParentID()
Gets the Real Parent ID of the WidgetChild@NonNull java.awt.Rectangle
getRectangle()
Gets the Rectangle of the WidgetChildorg.dreambot.internal.injector.interfaces.RSWidget
getReference()
int
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 scrolled Y position of theWidgetChild@Nullable java.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 WidgetChild@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@Nullable java.lang.String
getSpell()
Gets the Spell of the WidgetChild.int
getSpriteAngle()
@NonNull 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 WidgetChild@Nullable java.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(@NonNull java.lang.String action)
Checks to see if any of this widget's actions contains (case-insensitive) the given actionboolean
hasActionExact(@NonNull java.lang.String action)
Checks to see if this widget has the full given actionint
hashCode()
boolean
hasListener()
boolean
hasScript()
boolean
interact()
Clicks the WidgetChildboolean
interact(@NonNull Filter<java.lang.String> filter)
Interacts with a WidgetChild with the first matching actionboolean
interact(@Nullable java.lang.String action)
Interacts with a WidgetChild with a specified actionboolean
isGrandChild()
Checks if the WidgetChild is a grandchildboolean
isHidden()
Checks if the WidgetChild is hiddenboolean
isVisible()
Checks if the WidgetChild is visiblevoid
setContainsMouse(boolean contains)
void
setContentIDs(int[] ids)
void
setContentStackSizes(int[] sizes)
void
setDragDeadTime(int time)
void
setHasListener(boolean has)
void
setHasScript(boolean has)
void
setIndex(int index)
void
setItemId(int id)
void
setItemStack(int stack)
void
setText(java.lang.String text)
java.lang.String
toString()
void
updateReference(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
public int getChildSequenceId()
Gets 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
public int getShadowColor()
Gets 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
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 @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
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 @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
-
setContentIDs
public void setContentIDs(int[] ids)
-
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
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
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getReference
public org.dreambot.internal.injector.interfaces.RSWidget getReference()
- Overrides:
getReference
in classNodeWrapper
-
getContentType
public int getContentType()
-
containsMouse
public boolean containsMouse()
-
setContainsMouse
public void setContainsMouse(boolean 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
public void setHasScript(boolean has)
-
-