Class GUIAnimation

java.lang.Object
com.blackrook.gui.GUIAnimation
All Implemented Interfaces:
GUI.Animation<GUIObject>

public abstract class GUIAnimation extends Object implements GUI.Animation<GUIObject>
Describes an animation to be performed on an object in the GUI system.
Author:
Matthew Tropiano
  • Constructor Details

    • GUIAnimation

      public GUIAnimation()
  • Method Details

    • color

      public static GUIAnimation color(GUIColor color)
      Creates a new GUI animation that performs a color transition.
      Parameters:
      color - the new color.
      Returns:
      the created animation.
    • color

      public static GUIAnimation color(float red, float green, float blue, float alpha)
      Creates a new GUI animation that performs a color transition.
      Parameters:
      red - the red color component (0 to 1).
      green - the green color component (0 to 1).
      blue - the blue color component (0 to 1).
      alpha - the alpha color component (0 to 1).
      Returns:
      the created animation.
    • opacity

      public static GUIAnimation opacity(float opacity)
      Creates a new GUI animation that performs an opacity transition.
      Parameters:
      opacity - the new opacity (0 to 1).
      Returns:
      the created animation.
    • position

      public static GUIAnimation position(Float x, Float y)
      Creates a new GUI animation that performs an object position transition. Either of the following parameters can be null to designate no change.
      Parameters:
      x - the new x-coordinate.
      y - the new y-coordinate.
      Returns:
      the created animation.
    • dimension

      public static GUIAnimation dimension(Float width, Float height)
      Creates a new GUI animation that performs an object dimension transition. Either of the following parameters can be null to designate no change.
      Parameters:
      width - the new width.
      height - the new height.
      Returns:
      the created animation.
    • bounds

      public static GUIAnimation bounds(Float x, Float y, Float width, Float height)
      Creates a new GUI animation that performs an object bounds transition. Any of the following parameters can be null to designate no change.
      Parameters:
      x - the new x-coordinate.
      y - the new y-coordinate.
      width - the new width.
      height - the new height.
      Returns:
      the created animation.
    • rotation

      public static GUIAnimation rotation(float rotation)
      Creates a new GUI animation that performs a rotation transition.
      Parameters:
      rotation - the new rotation (in degrees).
      Returns:
      the created animation.
    • visible

      public static GUIAnimation visible(boolean visible)
      Creates a new GUI animation that performs an object visibility change.
      Parameters:
      visible - true for visible, false for invisible.
      Returns:
      the created animation.
    • texture

      public static GUIAnimation texture(String... textures)
      Creates a new GUI animation that sets a texture on the object.
      Parameters:
      textures - the textures to set (in order). Can be null.
      Returns:
      the created animation.
    • action

      public static GUIAnimation action(GUIAction action)
      Creates a new GUI animation that calls an action on the object.
      Parameters:
      action - the GUIAction to call.
      Returns:
      the created animation.