Class GUIQuery

java.lang.Object
com.blackrook.gui.GUIQuery
All Implemented Interfaces:
Iterable<GUIObject>

public final class GUIQuery extends Object implements Iterable<GUIObject>
The results of a scene query.
Author:
Matthew Tropiano
  • Method Summary

    Modifier and Type
    Method
    Description
    addName(String... names)
    Adds a name (or several) to the objects in this query.
    animate(long cumulativeDelay, long duration, GUIAnimation... animations)
    Enqueues an animation on this GUI Object, linear transition, and with a cumulative delay added to each object.
    animate(long cumulativeDelay, long duration, GUIEasingType transition, GUIAnimation... animations)
    Enqueues an animation on this GUI Object, and with a cumulative delay added to each object.
    animate(long duration, GUIAnimation... animations)
    Enqueues an animation on this GUI Object, linear transition.
    animate(long duration, GUIEasingType transition, GUIAnimation... animations)
    Enqueues an animation on this GUI Object.
    animate(GUIAnimation... animations)
    Enqueues an animation on this GUI Object, no duration.
    Aborts the animation on this object, abandoning it mid-animation.
    animateDelay(long duration)
    Enqueues a delay between animations on this GUI Object.
    Finishes the animation on this object all the way to the end.
    bindAction(GUIAction action, String... types)
    Binds an action of a particular type to the objects inside this query.
    Calls an action on the objects inside the query.
    Copies this query, returning a new query with the same objects.
    get(int index)
    Gets an object in this query wrapped in a query.
    Gets the object absolute bounds on the first object in this query result.
    float
    Gets the alpha color component of the first object in this query result.
    Gets a new query result containing objects that are currently animating.
    float
    Gets the blue color component of the first object in this query result.
    Gets the object bounds on the first object in this query result.
    getByAttrib(Object layoutAttribute)
    Gets a new query result of all objects in the query with a specific layout attribute.
    getByName(String... names)
    Gets all GUI Objects that match all of the names provided in this query.
    Gets all GUI Objects with a matching name regex pattern in this query.
    getByType(Class<?> clazz)
    Gets a new query result of all objects in the query with the same class.
    Gets all children of all of the objects in this query.
    Gets the color on the first object in this query result.
    Gets all descendants of all of the objects in this query.
    Creates a new query result that is the objects in this query minus the ones present in another.
    Gets each even-indexed object in this query as a new query.
    Gets every n-th object in this query as a new query.
    Returns the first object in this query wrapped in a query.
    float
    Gets the green color component of the first object in this query result.
    getHavingToggleState(boolean state)
    Gets a new query result containing objects with a matching toggle state.
    Creates a new query result that is the intersection of two queries (both objects must exist in this query and the other to be included).
    Returns the last object in this query wrapped in a query.
    getObject(int index)
    Gets an GUIObject in this query.
    Gets each odd-indexed object in this query as a new query.
    getOffsetAndModulo(int offset, int modulo)
    Gets every object at the index pattern specified in this query as a new query.
    float
    Gets the opacity on the first object in this query result.
    Gets all parents of all of the objects in this query.
    getRandom(Random random)
    Gets a new query result that is a random sub-selection of objects in this query.
    getRandomAmount(Random random, int objects)
    Gets a new query result that is a random sub-selection of a specific amount of objects in this query.
    getRandomSample(Random random, float chance)
    Gets a new query result that is a random sub-selection of objects in this query, weighted by a chance to select each one.
    float
    Gets the red color component of the first object in this query result.
    Gets all siblings of all of the objects in this query.
    getSubQuery(int startIndex, int endIndex)
    Gets a sublist of this query result as another query.
    Gets the text on the first object in this query result, or null if the object is not a GUILabel type.
    Gets the texture on the first object in this query result.
    Gets the theme on the first object in the query result.
    Gets the current theme key on the first object in the query.
    Creates a new query result that is the union of two queries.
    Gets the value on the first object in this query result, or null if the object is not a GUIValueField type.
    Gets a new query result containing objects that are visible.
    Creates a new query result that is the union of the objects in this query and another, minus the ones present in both.
    boolean
     
    boolean
    Gets if the first object in the result can accept input.
    boolean
    Gets if the toggle state on the first object in this query result is "set," or false if the object is not an GUIToggleable type.
    boolean
    Gets if the first object in the result is visible.
     
    Requests release of focus on all of the objects in the query.
    removeName(String... names)
    Removes a name (or several) from the objects in this query.
    Requests focus on the first object in the query.
    rotate(float rotation)
    Rotates this object by an amount of degrees on all objects in this query result.
    setBounds(float x, float y, float width, float height)
    Sets the object bounds on all objects in this query result.
    setColor(float red, float green, float blue, float alpha)
    Sets the color on all objects in this query result.
    Sets the color on all objects in this query result.
    setDimensions(float width, float height)
    Sets the object width and height on all objects in this query result.
    setEnabled(boolean enabled)
    Sets if the object can accept input on all objects in this query result.
    setOpacity(float opacity)
    Sets the opacity on all objects in this query result.
    setPosition(float x, float y)
    Sets the object position on all objects in this query result.
    setRotationZ(float rotation)
    Sets this object's rotation in degrees on all objects in this query result.
    setState(boolean state)
    Sets the state of all objects in this query result.
    Sets the text of all objects in this query result.
    setTexture(String texture)
    Sets this object's texture on all objects in this query result.
    Sets the theme on all objects in this query result.
    Sets the value on all objects in this query result.
    setVisible(boolean visible)
    Sets if the object is visible on all objects in this query result.
    shuffle(Random random)
    Randomizes the order of the objects in this query.
    int
     
    stretch(float width, float height)
    Changes this object's width/height by an x or y-coordinate amount on all objects in this query result.
    Toggles the state of all objects in this query result.
     
    translate(float x, float y)
    Changes this object's position by an x or y-coordinate amount on all objects in this query result.
    unbindAction(GUIAction action, String... types)
    Unbinds an action of a particular type from the objects inside this query.
    Unbinds all actions of a particular type from the objects inside this query.
    static GUIQuery
    wrap(GUIObject object)
    Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
    static GUIQuery
    wrap(GUIObject... objects)
    Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
    static GUIQuery
    wrap(GUIQuery query)
    Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
    static GUIQuery
    Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Iterable

    forEach, spliterator
  • Method Details

    • size

      public int size()
      Returns:
      the amount of objects in this query.
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if there are no objects in this query, false if one or more.
    • iterator

      public Iterator<GUIObject> iterator()
      Specified by:
      iterator in interface Iterable<GUIObject>
    • wrap

      public static GUIQuery wrap(GUIObject object)
      Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
      Parameters:
      object - the object to include in the query selection.
      Returns:
      a new query result with all of the provided objects.
    • wrap

      public static GUIQuery wrap(GUIObject... objects)
      Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
      Parameters:
      objects - the objects to include in the query selection.
      Returns:
      a new query result with all of the provided objects.
    • wrap

      public static GUIQuery wrap(Iterable<GUIObject> objects)
      Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
      Parameters:
      objects - the objects to include in the query selection.
      Returns:
      a new query result with all of the provided objects.
    • wrap

      public static GUIQuery wrap(GUIQuery query)
      Wraps a set of objects in a new query, where its contents consist of the provided objects, in the same order.
      Parameters:
      query - the query of objects to include in the query selection.
      Returns:
      a new query result with all of the provided objects.
    • copy

      public GUIQuery copy()
      Copies this query, returning a new query with the same objects.
      Returns:
      a new query.
    • get

      public GUIQuery get(int index)
      Gets an object in this query wrapped in a query. The order of the objects in the query is the order in which they were added.
      Parameters:
      index - the index of the desired object.
      Returns:
      a new query result that is the desired object.
    • getObject

      public GUIObject getObject(int index)
      Gets an GUIObject in this query. The order of the objects in the query is the order in which they were added.
      Parameters:
      index - the index of the desired object.
      Returns:
      the GUIObject at the desired index, or null if no object at that index.
    • getEveryMultiple

      public GUIQuery getEveryMultiple(int n)
      Gets every n-th object in this query as a new query. For example, if n is 3, this returns every multiple-of-3-indexed object. Conveience method for getOffsetAndModulo(0, n).
      Parameters:
      n - the multiple stepping.
      Returns:
      a new query result.
    • getEvens

      public GUIQuery getEvens()
      Gets each even-indexed object in this query as a new query. Conveience method for getOffsetAndModulo(0, 2).
      Returns:
      a new query result.
    • getOdds

      public GUIQuery getOdds()
      Gets each odd-indexed object in this query as a new query. Conveience method for getOffsetAndModulo(1, 2).
      Returns:
      a new query result.
    • getOffsetAndModulo

      public GUIQuery getOffsetAndModulo(int offset, int modulo)
      Gets every object at the index pattern specified in this query as a new query. For example, if offset is 1 and step is 3, this returns every 3rd object shifted after the first object.
      Parameters:
      offset - the starting offset.
      modulo - the modulo after the offset.
      Returns:
      a new query result.
    • getFirst

      public GUIQuery getFirst()
      Returns the first object in this query wrapped in a query. Convenience method for get(0). If there are no objects in this query, it will return an empty query.
      Returns:
      a new query result with the first object in this query.
    • getLast

      public GUIQuery getLast()
      Returns the last object in this query wrapped in a query. Convenience method for get(size()-1).
      Returns:
      a new query result with the last object in this query.
    • getByName

      public GUIQuery getByName(String... names)
      Gets all GUI Objects that match all of the names provided in this query. IF no names are provided, this returns itself.
      Parameters:
      names - the names to search for.
      Returns:
      a new query result.
    • getByPattern

      public GUIQuery getByPattern(Pattern pattern)
      Gets all GUI Objects with a matching name regex pattern in this query.
      Parameters:
      pattern - the pattern to use.
      Returns:
      a new query result.
    • getByType

      public GUIQuery getByType(Class<?> clazz)
      Gets a new query result of all objects in the query with the same class.
      Parameters:
      clazz - the class type to scan for.
      Returns:
      a new query result where all of the results are castable as clazz.
    • getByAttrib

      public GUIQuery getByAttrib(Object layoutAttribute)
      Gets a new query result of all objects in the query with a specific layout attribute.
      Parameters:
      layoutAttribute - the layout attribute to test for.
      Returns:
      a new query result.
    • getAnimating

      public GUIQuery getAnimating()
      Gets a new query result containing objects that are currently animating.
      Returns:
      a new query result that has objects that are in an animation.
    • getChildren

      public GUIQuery getChildren()
      Gets all children of all of the objects in this query.
      Returns:
      a new query result.
    • getDescendants

      public GUIQuery getDescendants()
      Gets all descendants of all of the objects in this query.
      Returns:
      a new query result.
    • getSiblings

      public GUIQuery getSiblings()
      Gets all siblings of all of the objects in this query. Does not get siblings of objects without parents.
      Returns:
      a new query result.
    • getParents

      public GUIQuery getParents()
      Gets all parents of all of the objects in this query.
      Returns:
      a new query result.
    • getUnion

      public GUIQuery getUnion(GUIQuery query)
      Creates a new query result that is the union of two queries. NOTE: There are never duplicates in GUIQueries.
      Parameters:
      query - the query to unify with this one.
      Returns:
      a new query result with both sets of objects.
    • getIntersection

      public GUIQuery getIntersection(GUIQuery query)
      Creates a new query result that is the intersection of two queries (both objects must exist in this query and the other to be included).
      Parameters:
      query - the query to intersect with this one.
      Returns:
      a new query result consisting of objects that are in both queries.
    • getDifference

      public GUIQuery getDifference(GUIQuery query)
      Creates a new query result that is the objects in this query minus the ones present in another.
      Parameters:
      query - the query to subtract from this one.
      Returns:
      a new query result with objects in this query minus the provided query.
    • getXOr

      public GUIQuery getXOr(GUIQuery query)
      Creates a new query result that is the union of the objects in this query and another, minus the ones present in both. The is essentially the union minus the intersection.
      Parameters:
      query - the query to XOR with this one.
      Returns:
      a new query result with objects in this query and the provided one, but not both.
    • getSubQuery

      public GUIQuery getSubQuery(int startIndex, int endIndex)
      Gets a sublist of this query result as another query.
      Parameters:
      startIndex - the starting index of this query, INCLUSIVE.
      endIndex - the ending index, EXCLUSIVE. If this is past the end of the query, this is size().
      Returns:
      a new query result that is a sublist of the objects in this result.
    • getRandom

      public GUIQuery getRandom(Random random)
      Gets a new query result that is a random sub-selection of objects in this query.
      Parameters:
      random - the random number generator to use.
      Returns:
      a new query result that is a random sub-selection of objects in this query.
    • getRandomSample

      public GUIQuery getRandomSample(Random random, float chance)
      Gets a new query result that is a random sub-selection of objects in this query, weighted by a chance to select each one.
      Parameters:
      random - the random number generator to use.
      chance - the random chance factor. if 0 or less, picks nothing. if 1 or greater, picks EVERYTHING. No random numbers are generated in these cases.
      Returns:
      a new query result that is a random sub-selection of objects in this query.
    • getRandomAmount

      public GUIQuery getRandomAmount(Random random, int objects)
      Gets a new query result that is a random sub-selection of a specific amount of objects in this query.
      Parameters:
      random - the random number generator to use.
      objects - the number of objects to pick at random.
      Returns:
      a new query result that is a random sub-selection of objects in this query, with size objects.
    • getHavingToggleState

      public GUIQuery getHavingToggleState(boolean state)
      Gets a new query result containing objects with a matching toggle state. Only works on GUIToggleable objects.
      Parameters:
      state - the set state to test for.
      Returns:
      a new query result that has objects with a matching toggle state.
    • getVisible

      public GUIQuery getVisible()
      Gets a new query result containing objects that are visible.
      Returns:
      a new query result that has objects that are visible.
      See Also:
    • shuffle

      public GUIQuery shuffle(Random random)
      Randomizes the order of the objects in this query.
      Parameters:
      random - the random number generator to use.
      Returns:
      itself, in order to chain queries.
    • requestFocus

      public GUIQuery requestFocus()
      Requests focus on the first object in the query. If the set is empty, this does nothing.
      Returns:
      itself, in order to chain queries.
    • releaseFocus

      public GUIQuery releaseFocus()
      Requests release of focus on all of the objects in the query. Only one object at a time can be focused, so this will actually unfocus at most one object in the query set.
      Returns:
      itself, in order to chain queries.
    • setEnabled

      public GUIQuery setEnabled(boolean enabled)
      Sets if the object can accept input on all objects in this query result.
      Parameters:
      enabled - true to enable, false to disable.
      Returns:
      itself, in order to chain queries.
    • isEnabled

      public boolean isEnabled()
      Gets if the first object in the result can accept input. Note that this can be affected by parents in the object's lineage. If the set is empty, this returns false.
      Returns:
      true if so, false otherwise.
      See Also:
    • setVisible

      public GUIQuery setVisible(boolean visible)
      Sets if the object is visible on all objects in this query result.
      Parameters:
      visible - true to set visible, false to not.
      Returns:
      itself, in order to chain queries.
    • isVisible

      public boolean isVisible()
      Gets if the first object in the result is visible. Note that this can be affected by parents in the object's lineage. If the set is empty, this returns false.
      Returns:
      true if so, false otherwise.
      See Also:
    • setTheme

      public GUIQuery setTheme(GUITheme theme)
      Sets the theme on all objects in this query result.
      Parameters:
      theme - the theme to set.
      Returns:
      itself, in order to chain queries.
    • getTheme

      public GUITheme getTheme()
      Gets the theme on the first object in the query result. Note that this can be affected by the GUI that the object is attached to. If the set is empty, this returns null.
      Returns:
      the attached theme or null if no theme.
      See Also:
    • getThemeKey

      public String getThemeKey()
      Gets the current theme key on the first object in the query. If the set is empty, this returns null.
      Returns:
      the key name or null if no key is set.
      See Also:
    • setTexture

      public GUIQuery setTexture(String texture)
      Sets this object's texture on all objects in this query result.
      Parameters:
      texture - the texture to set.
      Returns:
      itself, in order to chain queries.
    • getTexture

      public String getTexture()
      Gets the texture on the first object in this query result. If the set is empty, this returns null.
      Returns:
      the set texture or null if no texture is set.
    • setColor

      public GUIQuery setColor(float red, float green, float blue, float alpha)
      Sets the color on all objects in this query result.
      Parameters:
      red - the red component value for the color.
      green - the green component value for the color.
      blue - the blue component value for the color.
      alpha - the alpha component value for the color.
      Returns:
      itself, in order to chain queries.
    • setColor

      public GUIQuery setColor(GUIColor color)
      Sets the color on all objects in this query result.
      Parameters:
      color - the color to set.
      Returns:
      itself, in order to chain queries.
    • getColor

      public GUIColor getColor()
      Gets the color on the first object in this query result. If the set is empty, this returns null.
      Returns:
      the color.
    • getRed

      public float getRed()
      Gets the red color component of the first object in this query result. This color is a calculated color - it is affected by its parent's color components. If the set is empty, this returns 0.
      Returns:
      the red color component.
      See Also:
    • getGreen

      public float getGreen()
      Gets the green color component of the first object in this query result. This color is a calculated color - it is affected by its parent's color components. If the set is empty, this returns 0.
      Returns:
      the green color component.
      See Also:
    • getBlue

      public float getBlue()
      Gets the blue color component of the first object in this query result. This color is a calculated color - it is affected by its parent's color components. If the set is empty, this returns 0.
      Returns:
      the blue color component.
      See Also:
    • getAlpha

      public float getAlpha()
      Gets the alpha color component of the first object in this query result. This color is a calculated color - it is affected by its parent's color components. If the set is empty, this returns 0.
      Returns:
      the alpha color component.
      See Also:
    • setOpacity

      public GUIQuery setOpacity(float opacity)
      Sets the opacity on all objects in this query result.
      Parameters:
      opacity - the opacity to set.
      Returns:
      itself, in order to chain queries.
    • getOpacity

      public float getOpacity()
      Gets the opacity on the first object in this query result. If the set is empty, this returns 0.
      Returns:
      the object's opacity value.
    • setBounds

      public GUIQuery setBounds(float x, float y, float width, float height)
      Sets the object bounds on all objects in this query result.
      Parameters:
      x - its position x.
      y - its position y.
      width - its width.
      height - its height.
      Returns:
      itself, in order to chain queries.
    • getBounds

      public GUIBounds getBounds()
      Gets the object bounds on the first object in this query result. If the set is empty, this returns null.
      Returns:
      a GUIBounds containing the object bounds. If the contents of the GUIBounds change, it will not affect the object.
    • getAbsoluteBounds

      public GUIBounds getAbsoluteBounds()
      Gets the object absolute bounds on the first object in this query result. If the set is empty, this returns null.
      Returns:
      a GUIBounds containing the object bounds. If the contents of the GUIBounds change, it will not affect the object.
    • setPosition

      public GUIQuery setPosition(float x, float y)
      Sets the object position on all objects in this query result.
      Parameters:
      x - its position x.
      y - its position y.
      Returns:
      itself, in order to chain queries.
    • setDimensions

      public GUIQuery setDimensions(float width, float height)
      Sets the object width and height on all objects in this query result.
      Parameters:
      width - its width.
      height - its height.
      Returns:
      itself, in order to chain queries.
    • translate

      public GUIQuery translate(float x, float y)
      Changes this object's position by an x or y-coordinate amount on all objects in this query result.
      Parameters:
      x - the x movement.
      y - the y movement.
      Returns:
      itself, in order to chain queries.
    • stretch

      public GUIQuery stretch(float width, float height)
      Changes this object's width/height by an x or y-coordinate amount on all objects in this query result.
      Parameters:
      width - the width amount.
      height - the height amount.
      Returns:
      itself, in order to chain queries.
    • setText

      public GUIQuery setText(String text)
      Sets the text of all objects in this query result. Only works on GUILabel objects.
      Parameters:
      text - the text message to set.
      Returns:
      itself, in order to chain queries.
    • getText

      public String getText()
      Gets the text on the first object in this query result, or null if the object is not a GUILabel type. If the set is empty, this returns null.
      Returns:
      the text as a String.
    • setValue

      public GUIQuery setValue(Object value)
      Sets the value on all objects in this query result. Only works on GUIValueField objects.
      Parameters:
      value - the value to set.
      Returns:
      itself, in order to chain queries.
    • getValue

      public Object getValue()
      Gets the value on the first object in this query result, or null if the object is not a GUIValueField type. If the set is empty, this returns null.
      Returns:
      the text as a String.
    • toggle

      public GUIQuery toggle()
      Toggles the state of all objects in this query result. Only works on GUIToggleable objects.
      Returns:
      itself, in order to chain queries.
    • setState

      public GUIQuery setState(boolean state)
      Sets the state of all objects in this query result. Only operates on GUIToggleable objects.
      Parameters:
      state - the new toggle state.
      Returns:
      itself, in order to chain queries.
    • isSet

      public boolean isSet()
      Gets if the toggle state on the first object in this query result is "set," or false if the object is not an GUIToggleable type. If the set is empty, this returns false.
      Returns:
      if the toggleable is set or false otherwise.
      See Also:
    • setRotationZ

      public GUIQuery setRotationZ(float rotation)
      Sets this object's rotation in degrees on all objects in this query result.
      Parameters:
      rotation - the rotation to set.
      Returns:
      itself, in order to chain queries.
    • rotate

      public GUIQuery rotate(float rotation)
      Rotates this object by an amount of degrees on all objects in this query result.
      Parameters:
      rotation - the rotation to add.
      Returns:
      itself, in order to chain queries.
    • addName

      public GUIQuery addName(String... names)
      Adds a name (or several) to the objects in this query.
      Parameters:
      names - the names to add to the objects.
      Returns:
      itself, in order to chain queries.
    • removeName

      public GUIQuery removeName(String... names)
      Removes a name (or several) from the objects in this query.
      Parameters:
      names - the names to remove from the objects.
      Returns:
      itself, in order to chain queries.
    • animate

      public GUIQuery animate(GUIAnimation... animations)
      Enqueues an animation on this GUI Object, no duration.
      Parameters:
      animations - the animations to perform (at once) for this animation.
      Returns:
      itself, in order to chain queries.
    • animate

      public GUIQuery animate(long duration, GUIAnimation... animations)
      Enqueues an animation on this GUI Object, linear transition.
      Parameters:
      duration - the duration of the action in time units.
      animations - the animations to perform (at once) for this animation.
      Returns:
      itself, in order to chain queries.
    • animate

      public GUIQuery animate(long duration, GUIEasingType transition, GUIAnimation... animations)
      Enqueues an animation on this GUI Object.
      Parameters:
      duration - the duration of the action in time units.
      transition - the transition type for the action.
      animations - the animations to perform (at once) for this animation.
      Returns:
      itself, in order to chain queries.
    • animate

      public GUIQuery animate(long cumulativeDelay, long duration, GUIAnimation... animations)
      Enqueues an animation on this GUI Object, linear transition, and with a cumulative delay added to each object.

      For example, if cumulativeDelay is 200, then the first object will receive 0 delay, but the next will receive 200ms, then the next will get 400ms, then the next 600ms, and so on.

      Parameters:
      cumulativeDelay - the cumulative delay to add to each object beyond the first.
      duration - the duration of the action in time units.
      animations - the animations to perform (at once) for this animation.
      Returns:
      itself, in order to chain queries.
    • animate

      public GUIQuery animate(long cumulativeDelay, long duration, GUIEasingType transition, GUIAnimation... animations)
      Enqueues an animation on this GUI Object, and with a cumulative delay added to each object.

      For example, if cumulativeDelay is 200, then the first object will receive 0 delay, but the next will receive 200ms, then the next will get 400ms, then the next 600ms, and so on.

      Parameters:
      cumulativeDelay - the cumulative delay to add to each object beyond the first.
      duration - the duration of the action in time units.
      transition - the transition type for the action.
      animations - the animations to perform (at once) for this animation.
      Returns:
      itself, in order to chain queries.
    • animateDelay

      public GUIQuery animateDelay(long duration)
      Enqueues a delay between animations on this GUI Object.
      Parameters:
      duration - the duration of the action in time units.
      Returns:
      itself, in order to chain queries.
    • animateAbort

      public GUIQuery animateAbort()
      Aborts the animation on this object, abandoning it mid-animation.
      Returns:
      itself, in order to chain queries.
    • animateFinish

      public GUIQuery animateFinish()
      Finishes the animation on this object all the way to the end.
      Returns:
      itself, in order to chain queries.
    • bindAction

      public GUIQuery bindAction(GUIAction action, String... types)
      Binds an action of a particular type to the objects inside this query.
      Parameters:
      action - the action to bind.
      types - the action type to bind.
      Returns:
      itself, in order to chain queries.
    • unbindAction

      public GUIQuery unbindAction(GUIAction action, String... types)
      Unbinds an action of a particular type from the objects inside this query.
      Parameters:
      action - the action to bind.
      types - the action type to bind.
      Returns:
      itself, in order to chain queries.
    • unbindAllActions

      public GUIQuery unbindAllActions(String type)
      Unbinds all actions of a particular type from the objects inside this query.
      Parameters:
      type - the action type to bind.
      Returns:
      itself, in order to chain queries.
    • callAction

      public GUIQuery callAction(GUIAction action)
      Calls an action on the objects inside the query.
      Parameters:
      action - the action to call.
      Returns:
      itself, in order to chain queries.
    • toString

      public String toString()
      Overrides:
      toString in class Object