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

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.TextButton
                          extended by com.badlogic.gdx.scenes.scene2d.ui.CheckBox
All Implemented Interfaces:
Cullable, Disableable, Layout

public class CheckBox
extends TextButton

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

Author:
Nathan Sweet

Nested Class Summary
static class CheckBox.CheckBoxStyle
          The style for a select box, see CheckBox.
 
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.TextButton
TextButton.TextButtonStyle
 
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Button
Button.ButtonStyle
 
Constructor Summary
CheckBox(String text, CheckBox.CheckBoxStyle style)
           
CheckBox(String text, Skin skin)
           
CheckBox(String text, Skin skin, String styleName)
           
 
Method Summary
 void draw(Batch 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()
           
 CheckBox.CheckBoxStyle getStyle()
          Returns the checkbox's style.
 void setStyle(Button.ButtonStyle style)
           
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.TextButton
getLabel, getLabelCell, getText, setText
 
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, add, align, background, background, 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, 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, getUserObject, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckBox

public CheckBox(String text,
                Skin skin)

CheckBox

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

CheckBox

public CheckBox(String text,
                CheckBox.CheckBoxStyle style)
Method Detail

setStyle

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

getStyle

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

Overrides:
getStyle in class TextButton

draw

public void draw(Batch 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 TextButton
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()


Copyright © 2014. All Rights Reserved.