com.badlogic.gdx.scenes.scene2d.ui
Class ImageTextButton

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Actor
      extended by com.badlogic.gdx.scenes.scene2d.Group
          extended by com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
              extended by com.badlogic.gdx.scenes.scene2d.ui.Table
                  extended by com.badlogic.gdx.scenes.scene2d.ui.Button
                      extended by com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton
All Implemented Interfaces:
Cullable, Disableable, Layout

public class ImageTextButton
extends Button

A button with a child Image and Label.

Author:
Nathan Sweet
See Also:
ImageButton, TextButton, Button

Nested Class Summary
static class ImageTextButton.ImageTextButtonStyle
          The style for an image text button, see ImageTextButton.
 
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Button
Button.ButtonStyle
 
Constructor Summary
ImageTextButton(String text, ImageTextButton.ImageTextButtonStyle style)
           
ImageTextButton(String text, Skin skin)
           
ImageTextButton(String text, Skin skin, String styleName)
           
 
Method Summary
 void draw(SpriteBatch batch, float parentAlpha)
          If this method is overridden, the super method or WidgetGroup.validate() should be called to ensure the widget group is laid out.
 Image getImage()
           
 Cell getImageCell()
           
 Label getLabel()
           
 Cell getLabelCell()
           
 ImageTextButton.ImageTextButtonStyle getStyle()
          Returns the button's style.
 CharSequence getText()
           
 void setStyle(Button.ButtonStyle style)
           
 void setText(String text)
           
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Button
getClickListener, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, isChecked, isDisabled, isOver, isPressed, setChecked, setDisabled, toggle
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
add, add, add, add, add, add, align, bottom, center, clearChildren, columnDefaults, debug, debug, debugCell, debugTable, debugWidget, defaults, drawDebug, getAlign, getBackground, getCell, getCells, getClip, getDebug, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getRow, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, reset, right, row, setBackground, setBackground, setClip, setRound, setSkin, stack, top
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, validate
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, findActor, getChildren, hasChildren, isTransform, localToDescendantCoordinates, print, setCullingArea, setTransform, swapActor, swapActor
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, getActions, getCaptureListeners, getColor, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotate, scale, scale, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setVisible, setWidth, setX, setY, setZIndex, size, size, stageToLocalCoordinates, toBack, toFront, toString, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageTextButton

public ImageTextButton(String text,
                       Skin skin)

ImageTextButton

public ImageTextButton(String text,
                       Skin skin,
                       String styleName)

ImageTextButton

public ImageTextButton(String text,
                       ImageTextButton.ImageTextButtonStyle style)
Method Detail

setStyle

public void setStyle(Button.ButtonStyle style)
Overrides:
setStyle in class Button

getStyle

public ImageTextButton.ImageTextButtonStyle getStyle()
Description copied from class: Button
Returns the button's style. Modifying the returned style may not have an effect until Button.setStyle(ButtonStyle) is called.

Overrides:
getStyle in class Button

draw

public void draw(SpriteBatch batch,
                 float parentAlpha)
Description copied from class: WidgetGroup
If this method is overridden, the super method or WidgetGroup.validate() should be called to ensure the widget group is laid out.

Overrides:
draw in class Button
parentAlpha - Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.

getImage

public Image getImage()

getImageCell

public Cell getImageCell()

getLabel

public Label getLabel()

getLabelCell

public Cell getLabelCell()

setText

public void setText(String text)

getText

public CharSequence getText()


Copyright © 2013. All Rights Reserved.