Class WidgetChild

  • All Implemented Interfaces:
    Node

    public class WidgetChild
    extends NodeWrapper
    • Constructor Detail

      • WidgetChild

        public WidgetChild​(java.lang.Object reference)
        Note: This shouldn't be used by API users, it's an internal constructor.
    • 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 java.lang.String getTooltip()
        Gets the tooltip of the WidgetChild
        Returns:
        String value of the tooltip
      • 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 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 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
      • setText

        public void setText​(java.lang.String text)
      • 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 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)
        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​(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 java.lang.String getLeftClickAction()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getReference

        public org.dreambot.internal.injector.interfaces.RSWidget getReference()
        Overrides:
        getReference in class NodeWrapper
      • 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)