APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.utils

public Class BaseDrawable

extends Object
implements Drawable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.scenes.scene2d.utils.Drawable
Known Direct Subclasses
com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable, com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable, com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
Imports
com.badlogic.gdx.graphics.g2d.Batch, com.badlogic.gdx.utils.Null, com.badlogic.gdx.utils.reflect.ClassReflection

Drawable that stores the size information but doesn't draw anything.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private float
private float
private float
private float
private String
private float
private float

Constructor Summary

AccessConstructor and Description
public
public
BaseDrawable(Drawable drawable)

Creates a new empty drawable with the same sizing information as the specified drawable.

Method Summary

Modifier and TypeMethod and Description
public void
draw(Batch batch, float x, float y, float width, float height)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Draws this drawable at the specified bounds.

public float
public float
public float
public float
public String
public float
public float
public void
public void
public void
public void
public void
public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bottomHeightback to summary
private float bottomHeight
leftWidthback to summary
private float leftWidth
minHeightback to summary
private float minHeight
minWidthback to summary
private float minWidth
nameback to summary
private String name
Annotations
@Null
rightWidthback to summary
private float rightWidth
topHeightback to summary
private float topHeight

Constructor Detail

BaseDrawableback to summary
public BaseDrawable()
BaseDrawableback to summary
public BaseDrawable(Drawable drawable)

Creates a new empty drawable with the same sizing information as the specified drawable.

Method Detail

drawback to summary
public void draw(Batch batch, float x, float y, float width, float height)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Doc from com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Draws this drawable at the specified bounds. The drawable should be tinted with Batch#getColor(), possibly by mixing its own color.

getBottomHeightback to summary
public float getBottomHeight()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getBottomHeight.

getLeftWidthback to summary
public float getLeftWidth()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getLeftWidth.

getMinHeightback to summary
public float getMinHeight()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getMinHeight.

getMinWidthback to summary
public float getMinWidth()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getMinWidth.

getNameback to summary
public String getName()
Annotations
@Null
getRightWidthback to summary
public float getRightWidth()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getRightWidth.

getTopHeightback to summary
public float getTopHeight()

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.getTopHeight.

setBottomHeightback to summary
public void setBottomHeight(float bottomHeight)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setBottomHeight.

setLeftWidthback to summary
public void setLeftWidth(float leftWidth)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setLeftWidth.

setMinHeightback to summary
public void setMinHeight(float minHeight)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setMinHeight.

setMinWidthback to summary
public void setMinWidth(float minWidth)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setMinWidth.

setNameback to summary
public void setName(String name)
setRightWidthback to summary
public void setRightWidth(float rightWidth)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setRightWidth.

setTopHeightback to summary
public void setTopHeight(float topHeight)

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.setTopHeight.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Null