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

public Class CheckBox

extends TextButton
Class Inheritance
Imports
com.badlogic.gdx.graphics.Color, com.badlogic.gdx.graphics.g2d.Batch, .BitmapFont, com.badlogic.gdx.scenes.scene2d.utils.Drawable, com.badlogic.gdx.utils.Align, .Null, .Scaling

A checkbox is a button that contains an image indicating the checked or unchecked state and a label.
Author
Nathan Sweet

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CheckBox.CheckBoxStyle

The style for a select box, see CheckBox.

Field Summary

Modifier and TypeField and Description
private Image
private Cell<T extends Actor>
private CheckBox.CheckBoxStyle

Constructor Summary

AccessConstructor and Description
public
CheckBox(String text, Skin skin)

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

public

Method Summary

Modifier and TypeMethod and Description
public void
draw(Batch batch, float parentAlpha)

Overrides com.badlogic.gdx.scenes.scene2d.ui.TextButton.draw.

If this method is overridden, the super method or validate() should be called to ensure the widget group is laid out.

public Image
public Cell<T extends Actor>
protected Drawable
public CheckBox.CheckBoxStyle
protected Image
public void
Inherited from com.badlogic.gdx.scenes.scene2d.ui.TextButton:
getFontColorgetLabelgetLabelCellgetTextnewLabelsetLabelsetTexttoString

Field Detail

imageback to summary
private Image image
imageCellback to summary
private Cell<T extends Actor> imageCell
styleback to summary
private CheckBox.CheckBoxStyle style

Hides com.badlogic.gdx.scenes.scene2d.ui.TextButton.style.

Constructor Detail

CheckBoxback to summary
public CheckBox(String text, Skin skin)
CheckBoxback to summary
public CheckBox(String text, Skin skin, String styleName)
CheckBoxback to summary
public CheckBox(String text, CheckBox.CheckBoxStyle style)

Method Detail

drawback to summary
public void draw(Batch batch, float parentAlpha)

Overrides com.badlogic.gdx.scenes.scene2d.ui.TextButton.draw.

Doc from com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.draw.

If this method is overridden, the super method or validate() should be called to ensure the widget group is laid out.

getImageback to summary
public Image getImage()
getImageCellback to summary
public Cell<T extends Actor> getImageCell()
getImageDrawableback to summary
protected Drawable getImageDrawable()
Annotations
@Null
getStyleback to summary
public CheckBox.CheckBoxStyle getStyle()

Overrides com.badlogic.gdx.scenes.scene2d.ui.TextButton.getStyle.

Implements com.badlogic.gdx.scenes.scene2d.ui.Styleable.getStyle.

Returns the checkbox's style. Modifying the returned style may not have an effect until setStyle(ButtonStyle) is called.

newImageback to summary
protected Image newImage()
setStyleback to summary
public void setStyle(Button.ButtonStyle style)

Overrides com.badlogic.gdx.scenes.scene2d.ui.TextButton.setStyle.

Implements com.badlogic.gdx.scenes.scene2d.ui.Styleable.setStyle.

Doc from com.badlogic.gdx.scenes.scene2d.ui.Styleable.setStyle.

Set the current style of the actor

com.badlogic.gdx.scenes.scene2d.ui back to summary

public Class CheckBox.CheckBoxStyle

extends TextButtonStyle
Class Inheritance

The style for a select box, see CheckBox.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
public Drawable
public Drawable
public Drawable
public Drawable
public Drawable
public Drawable
Inherited from com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle:
checkedDownFontColorcheckedFocusedFontColorcheckedFontColorcheckedOverFontColordisabledFontColordownFontColorfocusedFontColorfontfontColoroverFontColor

Constructor Summary

AccessConstructor and Description
public
public
CheckBoxStyle(Drawable checkboxOff, Drawable checkboxOn, BitmapFont font, Color fontColor)

public

Field Detail

checkboxOffback to summary
public Drawable checkboxOff
checkboxOffDisabledback to summary
public Drawable checkboxOffDisabled
Annotations
@Null
checkboxOnback to summary
public Drawable checkboxOn
checkboxOnDisabledback to summary
public Drawable checkboxOnDisabled
Annotations
@Null
checkboxOnOverback to summary
public Drawable checkboxOnOver
Annotations
@Null
checkboxOverback to summary
public Drawable checkboxOver
Annotations
@Null

Constructor Detail

CheckBoxStyleback to summary
public CheckBoxStyle()
CheckBoxStyleback to summary
public CheckBoxStyle(Drawable checkboxOff, Drawable checkboxOn, BitmapFont font, Color fontColor)
CheckBoxStyleback to summary
public CheckBoxStyle(CheckBox.CheckBoxStyle style)