de.htwdd.rosenkoenig.gui.genuts
Class OkButton

java.lang.Object
  extended by com.genuts.gameui.Sprite
      extended by com.genuts.gameui.SpriteWrapper
          extended by de.htwdd.rosenkoenig.gui.genuts.OkButton
All Implemented Interfaces:
Tickable, Clickable, java.lang.Cloneable

public class OkButton
extends SpriteWrapper
implements Clickable

Represents the button that ends a player's turn. The button is clickable.


Field Summary
private  ImageSequenceSprite button
           
private  Game game
           
private  ImageState state
           
 
Constructor Summary
OkButton(Game game, PlayField playfield)
          Creates a new OkButton.
 
Method Summary
 void click(java.awt.event.MouseEvent event)
          End the current user's turn.
 void setState(ImageState state)
          Sets the button's state
 
Methods inherited from class com.genuts.gameui.SpriteWrapper
checkCollision, cloneSprite, collisionWith, getActionSprite, getBackground, getBottomCollisionOffset, getBounds, getFinalActionSprite, getHeight, getId, getImage, getLeftCollisionOffset, getParent, getPosition, getRightCollisionOffset, getRotation, getSize, getTopCollisionOffset, getWidth, getX, getY, invalidate, isBackgroundSprite, isPremode, isSpriteAt, isValidate, isVisible, paint, preCollisionWith, repaint, setActionSprite, setBackground, setBackgroundSprite, setBottomCollisionOffset, setBounds, setBounds, setId, setImage, setLeftCollisionOffset, setParent, setPosition, setPremode, setRightCollisionOffset, setRotation, setSize, setTopCollisionOffset, setVisible, tick, validate
 
Methods inherited from class com.genuts.gameui.Sprite
getFinalWrapper, getWrapper, setWrapper, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

button

private ImageSequenceSprite button

state

private ImageState state

game

private Game game
Constructor Detail

OkButton

public OkButton(Game game,
                PlayField playfield)
Creates a new OkButton.

Parameters:
game - the game this button belongs to
playfield - parent playfield
Method Detail

setState

public void setState(ImageState state)
Sets the button's state

Parameters:
state - enabled or disabled

click

public void click(java.awt.event.MouseEvent event)
End the current user's turn.

Specified by:
click in interface Clickable