Package org.dreambot.api.methods.widget
Class Widgets
- java.lang.Object
-
- org.dreambot.api.methods.widget.Widgets
-
public class Widgets extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Widgets()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
closeAll()
This will attempt to close out of any interfaces that might be opened that are on the game screenstatic java.util.List<Widget>
getAllWidgets()
Gets all the interfacesstatic WidgetChild
getChildWidget(int parent, int child)
Gets widget child based on the ids.static WidgetChild
getMatchingWidget(Filter<WidgetChild> filter)
Returns the first widget matching the filter, terminating as soon as one is found.static Widget
getWidget(int id)
Gets top level parent widget based on the idstatic WidgetChild
getWidgetChild(int... ids)
Gets widget child based on the given idsstatic java.util.List<WidgetChild>
getWidgetChildrenContainingText(java.lang.String text)
Gets a list of the WidgetChildren containing a particular search string Try to avoid using this method if you can (ie.static java.util.List<Widget>
getWidgets()
Deprecated.static java.util.List<WidgetChild>
getWidgets(Filter<WidgetChild> filter)
Gets a List of widget children that match the filter providedstatic Widgets
getWidgetsInstance()
Deprecated.static boolean
isOpen()
This checks if any non-default interfaces are open that block the game screen (even partially)
-
-
-
Method Detail
-
getWidgetsInstance
@Deprecated public static Widgets getWidgetsInstance()
Deprecated.
-
getWidgets
@Deprecated public static java.util.List<Widget> getWidgets()
Deprecated.SeegetAllWidgets()
-
getAllWidgets
public static java.util.List<Widget> getAllWidgets()
Gets all the interfacesThis method has a lot of overhead, so call it as little as possible.
- Returns:
- offset list of the openTab interfaces.
-
getWidget
public static Widget getWidget(int id)
Gets top level parent widget based on the id- Parameters:
id
- of the widget to find- Returns:
- the widget matching the id
-
getChildWidget
public static WidgetChild getChildWidget(int parent, int child)
Gets widget child based on the ids.- Parameters:
parent
- the id of the parent widget.child
- the id of the child widget.- Returns:
- the widget child matching the id
-
getWidgetChild
public static WidgetChild getWidgetChild(int... ids)
Gets widget child based on the given ids- Parameters:
ids
- ids to check, parent being first, child second, etc- Returns:
- Widget child matching the ids or null
-
getWidgetChildrenContainingText
public static java.util.List<WidgetChild> getWidgetChildrenContainingText(java.lang.String text)
Gets a list of the WidgetChildren containing a particular search string Try to avoid using this method if you can (ie. if you know the Widget parent ID, search manually) This method will search all children- Parameters:
text
- text to search for. Case sensitive- Returns:
- list of widget children with message containing search text
-
getMatchingWidget
public static WidgetChild getMatchingWidget(Filter<WidgetChild> filter)
Returns the first widget matching the filter, terminating as soon as one is found. Useful for minimizing resource usage.- Parameters:
filter
- Filter to pass widget children through- Returns:
- The first widget child if found, otherwise null
-
getWidgets
public static java.util.List<WidgetChild> getWidgets(Filter<WidgetChild> filter)
Gets a List of widget children that match the filter provided- Parameters:
filter
- Filter to pass widget children through- Returns:
- List of Widget children that pass the filter provided
-
isOpen
public static boolean isOpen()
This checks if any non-default interfaces are open that block the game screen (even partially)- Returns:
- true if at least one is found, false otherwise
-
closeAll
public static boolean closeAll()
This will attempt to close out of any interfaces that might be opened that are on the game screen- Returns:
- true if we can't find any open screen blocking interfaces after closing if necessary, false otherwise
-
-