public class GGRadioButton extends GGButtonBase
Constructor and Description |
---|
GGRadioButton(java.lang.String text)
Creates a deselected radio button with the given text annotation, white text and
black background colors.
|
GGRadioButton(java.lang.String text,
boolean isSelected)
Creates a radio button with the given text annotation, white text and
and black background colors.
|
GGRadioButton(java.lang.String text,
int textColor,
int bkColor)
Creates a deselected radio button with the given text annotation and given
text and background colors.
|
GGRadioButton(java.lang.String text,
int textColor,
int bkColor,
int textSize,
boolean isSelected)
Creates a radio button with the given text annotation and given
text and background colors.
|
Modifier and Type | Method and Description |
---|---|
void |
addRadioButtonListener(GGRadioButtonListener listener)
Registers a GGRadioListener to get notifications when the button is manipulated.
|
boolean |
isSelected()
Returns the current state of the button.
|
void |
reset()
Overrides the actor's reset() called when the button is added to the game grid.
|
void |
setSelected(boolean selected)
Sets the button in the selected/deselected state.
|
isEnabled, setEnabled, setHotspotArea, setRefreshEnabled
act, addActorCollisionListener, addActorTouchListener, addActorTouchListener, addBorderListener, addCollisionActor, addCollisionActors, addCollisionTile, addCollisionTiles, addTileCollisionListener, collide, collide, containsPixel, delay, displace, getBackground, getCollisionActors, getCollisionActorsInRange, getCollisionTiles, getCurrentImage, getDirection, getDirectionStart, getDisplacePosition, getHeight, getIdVisible, getImage, getImage, getIntDirection, getLocation, getLocationOffset, getLocationStart, getNbCycles, getNbHorzCells, getNbSprites, getNbVertCells, getNeighbours, getNeighbours, getNextMoveLocation, getPixelColor, getPixelLocation, getRotatedImage, getRotatedPosition, getRotationIndex, getScaledImage, getScaledImage, getScaledImage, getSlowDown, getWidth, getX, getXStart, getY, getYStart, getZoomedImage, hide, isActEnabled, isActorCollisionEnabled, isHorzMirror, isInGrid, isMoveValid, isNearBorder, isRemoved, isRotatable, isTileCollisionEnabled, isVertMirror, isVisible, move, move, nearBorder, removeSelf, rotate, rotate, setActEnabled, setActorCollisionEnabled, setActorTouchCircle, setActorTouchCircle, setActorTouchEnabled, setActorTouchImage, setActorTouchImage, setActorTouchRectangle, setActorTouchRectangle, setCollisionCircle, setCollisionCircle, setCollisionImage, setCollisionImage, setCollisionLine, setCollisionLine, setCollisionRectangle, setCollisionRectangle, setCollisionSpot, setCollisionSpot, setDirection, setDirection, setDisplacePosition, setHorzMirror, setLocation, setLocationOffset, setLocationOffset, setOnBottom, setOnTop, setPixelLocation, setSlowDown, setTileCollisionEnabled, setVertMirror, setX, setY, show, show, showNextSprite, showPreviousSprite, turn
public GGRadioButton(java.lang.String text)
text
- the text annotationpublic GGRadioButton(java.lang.String text, boolean isSelected)
text
- the text annotationisSelected
- if true, the radio button is initially selectedpublic GGRadioButton(java.lang.String text, int textColor, int bkColor)
text
- the text annotationtextColor
- the color of the annotation text and the circular radio boxbkColor
- the background colorpublic GGRadioButton(java.lang.String text, int textColor, int bkColor, int textSize, boolean isSelected)
text
- the text annotationtextColor
- the color of the annotation text and the circular radio boxbkColor
- the background color and the circular radioboxtextSize
- the size of the text in pixelsisSelected
- if true, the radio button is initially selectedpublic boolean isSelected()
public void setSelected(boolean selected)
selected
- if true, the button is selected; otherwise it is deselectedpublic void reset()
public void addRadioButtonListener(GGRadioButtonListener listener)
listener
- the GGRadioButtonListener to register