Class BaseDrawable
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
-
- All Implemented Interfaces:
Drawable
- Direct Known Subclasses:
NinePatchDrawable,SpriteDrawable,TextureRegionDrawable
public class BaseDrawable extends java.lang.Object implements Drawable
Drawable that stores the size information but doesn't draw anything.
-
-
Constructor Summary
Constructors Constructor Description BaseDrawable()BaseDrawable(Drawable drawable)Creates a new empty drawable with the same sizing information as the specified drawable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(Batch batch, float x, float y, float width, float height)Draws this drawable at the specified bounds.floatgetBottomHeight()floatgetLeftWidth()floatgetMinHeight()floatgetMinWidth()java.lang.StringgetName()floatgetRightWidth()floatgetTopHeight()voidsetBottomHeight(float bottomHeight)voidsetLeftWidth(float leftWidth)voidsetMinHeight(float minHeight)voidsetMinSize(float minWidth, float minHeight)voidsetMinWidth(float minWidth)voidsetName(java.lang.String name)voidsetPadding(float topHeight, float leftWidth, float bottomHeight, float rightWidth)voidsetRightWidth(float rightWidth)voidsetTopHeight(float topHeight)java.lang.StringtoString()
-
-
-
Constructor Detail
-
BaseDrawable
public BaseDrawable()
-
BaseDrawable
public BaseDrawable(Drawable drawable)
Creates a new empty drawable with the same sizing information as the specified drawable.
-
-
Method Detail
-
draw
public void draw(Batch batch, float x, float y, float width, float height)
Description copied from interface:DrawableDraws this drawable at the specified bounds. The drawable should be tinted withBatch.getColor(), possibly by mixing its own color.
-
getLeftWidth
public float getLeftWidth()
- Specified by:
getLeftWidthin interfaceDrawable
-
setLeftWidth
public void setLeftWidth(float leftWidth)
- Specified by:
setLeftWidthin interfaceDrawable
-
getRightWidth
public float getRightWidth()
- Specified by:
getRightWidthin interfaceDrawable
-
setRightWidth
public void setRightWidth(float rightWidth)
- Specified by:
setRightWidthin interfaceDrawable
-
getTopHeight
public float getTopHeight()
- Specified by:
getTopHeightin interfaceDrawable
-
setTopHeight
public void setTopHeight(float topHeight)
- Specified by:
setTopHeightin interfaceDrawable
-
getBottomHeight
public float getBottomHeight()
- Specified by:
getBottomHeightin interfaceDrawable
-
setBottomHeight
public void setBottomHeight(float bottomHeight)
- Specified by:
setBottomHeightin interfaceDrawable
-
setPadding
public void setPadding(float topHeight, float leftWidth, float bottomHeight, float rightWidth)
-
getMinWidth
public float getMinWidth()
- Specified by:
getMinWidthin interfaceDrawable
-
setMinWidth
public void setMinWidth(float minWidth)
- Specified by:
setMinWidthin interfaceDrawable
-
getMinHeight
public float getMinHeight()
- Specified by:
getMinHeightin interfaceDrawable
-
setMinHeight
public void setMinHeight(float minHeight)
- Specified by:
setMinHeightin interfaceDrawable
-
setMinSize
public void setMinSize(float minWidth, float minHeight)
-
getName
@Null public java.lang.String getName()
-
setName
public void setName(@Null java.lang.String name)
-
toString
@Null public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-