public class GGCheckButton extends GGButtonBase
Constructor and Description |
---|
GGCheckButton(java.lang.String text)
Creates a unchecked check button with the given text annotation, black text and
white background colors.
|
GGCheckButton(java.lang.String text,
boolean isChecked)
Creates a check button with the given text annotation, black text and
and white background colors.
|
GGCheckButton(java.lang.String text,
java.awt.Color textColor,
java.awt.Color bkColor)
Creates a unchecked check button with the given text annotation and given
text and background colors.
|
GGCheckButton(java.lang.String text,
java.awt.Color textColor,
java.awt.Color bkColor,
boolean isChecked)
Creates a check button with the given text annotation and given
text and background colors.
|
Modifier and Type | Method and Description |
---|---|
void |
addCheckButtonListener(GGCheckButtonListener listener)
Registers a GGCheckButtonListener to get notifications when the button is manipulated.
|
boolean |
isChecked()
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 |
setChecked(boolean b)
Sets the button in the checked/unchecked state.
|
isEnabled, setEnabled, setHotspotArea, setRefreshEnabled
act, addActorCollisionListener, addBorderListener, addCollisionActor, addCollisionActors, addCollisionTile, addCollisionTiles, addMouseTouchListener, addMouseTouchListener, addTileCollisionListener, collide, collide, 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, getRotatedPosition, getRotationIndex, getScaledImage, getScaledImage, getScaledImage, getSlowDown, getWidth, getX, getXStart, getY, getYStart, hide, isActEnabled, isActorCollisionEnabled, isHorzMirror, isInGrid, isMoveValid, isNearBorder, isRemoved, isRotatable, isTileCollisionEnabled, isVertMirror, isVisible, move, move, nearBorder, removeSelf, rotate, rotate, setActEnabled, setActorCollisionEnabled, setCollisionCircle, setCollisionCircle, setCollisionImage, setCollisionImage, setCollisionLine, setCollisionLine, setCollisionRectangle, setCollisionRectangle, setCollisionSpot, setCollisionSpot, setDirection, setDirection, setDisplacePosition, setHorzMirror, setLocation, setLocationOffset, setLocationOffset, setMouseTouchCircle, setMouseTouchCircle, setMouseTouchEnabled, setMouseTouchImage, setMouseTouchImage, setMouseTouchRectangle, setMouseTouchRectangle, setOnBottom, setOnTop, setPixelLocation, setSlowDown, setTileCollisionEnabled, setVertMirror, setX, setY, show, show, showNextSprite, showPreviousSprite, turn
public GGCheckButton(java.lang.String text)
text
- the text annotationpublic GGCheckButton(java.lang.String text, boolean isChecked)
text
- the text annotationisChecked
- if true, the check box is initially checkedpublic GGCheckButton(java.lang.String text, java.awt.Color textColor, java.awt.Color bkColor)
text
- the text annotationtextColor
- the color of the annotation textbkColor
- the background colorpublic GGCheckButton(java.lang.String text, java.awt.Color textColor, java.awt.Color bkColor, boolean isChecked)
text
- the text annotationtextColor
- the color of the annotation textbkColor
- the background colorisChecked
- if true, the check box is initially checkedpublic void reset()
public boolean isChecked()
public void setChecked(boolean b)
b
- if true, the button is checked; otherwise it is uncheckedpublic void addCheckButtonListener(GGCheckButtonListener listener)
listener
- the GGCheckButtonListener to register