Class InterfaceComponent

    • Method Detail

      • getActions

        public java.util.List<java.lang.String> getActions()
      • getRawActions

        public java.lang.String[] getRawActions()
      • getBorderThickness

        @Deprecated
        public final int getBorderThickness()
        Deprecated.
      • getSpellActionName

        @Nullable
        public final @Nullable java.lang.String getSpellActionName()
      • getChildQuantity

        public final int getChildQuantity()
      • getComponentQuantity

        @Deprecated
        public final int getComponentQuantity()
        Deprecated.
      • getComponent

        @Deprecated
        @Nullable
        public final @Nullable InterfaceComponent getComponent​(int index)
        Deprecated.
      • getChild

        @Nullable
        public abstract @Nullable InterfaceComponent getChild​(int index)
      • getContainedItem

        @Nullable
        public final @Nullable ItemDefinition getContainedItem()
      • getContainedItemId

        public final int getContainedItemId()
      • getSpecializationIndicator

        public final int getSpecializationIndicator()
      • getFontId

        public final int getFontId()
      • getHeight

        public final int getHeight()
      • getIndex

        public final int getIndex()
      • getLayerId

        public int getLayerId()
      • getLayerDepth

        public int getLayerDepth()
      • getName

        public final java.lang.String getName()
        Gets the name of the interface as shown in the menu
        Specified by:
        getName in interface Onymous
      • getProjectedBufferId

        public final int getProjectedBufferId()
      • getContainedItemQuantity

        public abstract int getContainedItemQuantity()
      • getProjectedEntityAnimationId

        public abstract int getProjectedEntityAnimationId()
        Gets the animation being used to animate the projected entity
      • getTooltip

        @RS3Only
        @Nullable
        public @Nullable java.lang.String getTooltip()
        Gets the text in the tooltip that appears after hovering the component for a moment
        Returns:
        null if the component doesn't have a tooltip, otherwise a String
      • getProjectedItem

        @Nullable
        public final @Nullable ItemDefinition getProjectedItem()
        Gets the information about the entity being projected and returns it (if it's an Item)
      • getProjectedNpc

        @Nullable
        public final @Nullable NpcDefinition getProjectedNpc()
        Gets the information about the entity being projected and returns it (if it's a Player)
      • getProjectedPlayer

        @Nullable
        public final @Nullable Player getProjectedPlayer()
        Gets the information about the entity being projected and returns it (if it's a Player)
      • getScrollShift

        @Nullable
        public @Nullable java.awt.Point getScrollShift()
      • getSpriteBorderInset

        public final int getSpriteBorderInset()
      • getSpriteFillColor

        @Nullable
        public final @Nullable java.awt.Color getSpriteFillColor()
      • getSpriteId

        public final int getSpriteId()
      • getSpriteRotation

        public final int getSpriteRotation()
      • getText

        @Nullable
        public final @Nullable java.lang.String getText()
        Gets the text of an InterfaceComponent with type LABEL or TOOLTIP with the "jagtags" (formatting tags) stripped.
        Returns:
        #getRawText() formatted with JagTags.remove()
      • getRawText

        @Nullable
        public final @Nullable java.lang.String getRawText()
        Gets the raw text of an InterfaceComponent with type LABEL or TOOLTIP
        Returns:
        a String if the interface component is one of the specified types and it has text, otherwise null.
      • getTextColor

        public final java.awt.Color getTextColor()
      • getTextureId

        @Deprecated
        public final int getTextureId()
        Deprecated.
      • getWidth

        public final int getWidth()
      • hashCode

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

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

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

        public final boolean isValid()
        Description copied from interface: Validatable
        Verifies whether this entity is valid and still exists, typically on the world-graph
        Specified by:
        isValid in interface Validatable
        Returns:
        true if it's still available, otherwise false
      • isVisible

        public boolean isVisible()
        Description copied from interface: Interactable
        Whether the entity is visible
        Specified by:
        isVisible in interface Interactable
        Returns:
        true if visible, and false if not visible
      • getVisibility

        public double getVisibility()
        Description copied from interface: Interactable
        Returns a rough estimate of how visible this entity is as a percent (0 to 100)
        Specified by:
        getVisibility in interface Interactable
      • getInteractionPoint

        @Nullable
        public final @Nullable InteractablePoint getInteractionPoint​(java.awt.Point origin)
        Description copied from interface: Interactable
        Gets a point within the entity that can be interacted with. Takes into account the direction of movement from the origin point.
        Specified by:
        getInteractionPoint in interface Interactable
      • contains

        public final boolean contains​(java.awt.Point point)
        Description copied from interface: Interactable
        Checks if the projected bounds of this entity contains the Point provided.
        Specified by:
        contains in interface Interactable
        Returns:
      • click

        public final boolean click()
        Description copied from interface: Interactable
        Clicks this entity in an interactable point
        Specified by:
        click in interface Interactable
        Returns:
        true if successfully clicked
      • interact

        public final boolean interact​(java.util.regex.Pattern action,
                                      java.util.regex.Pattern target)
        Description copied from interface: Interactable
        Attempts to match action and target using Matcher.find() and then interacts with the appropriate menu item
        Specified by:
        interact in interface Interactable
        Parameters:
        action - The pattern to match the action with, if null it's ignored
        target - The pattern to match the target with, if null it's ignored
      • interact

        public final boolean interact​(java.lang.String action)
        Specified by:
        interact in interface Interactable
      • interact

        public final boolean interact​(java.util.regex.Pattern action)
        Specified by:
        interact in interface Interactable
      • render

        public final void render​(java.awt.Graphics2D g2d)
        Description copied from interface: Renderable
        Renders this entity onto the given Graphics2D, use is discouraged
        Specified by:
        render in interface Renderable
      • render

        public void render​(javafx.scene.canvas.GraphicsContext gc)
        Description copied from interface: Renderable
        Renders this entity onto the given GraphicsContext
        Specified by:
        render in interface Renderable