org.deken.game.component
Class GTextContainer

java.lang.Object
  extended by org.deken.game.sprites.Sprite
      extended by org.deken.game.component.GComponent
          extended by org.deken.game.component.GTextContainer
All Implemented Interfaces:
InputMouseListener, Updateable
Direct Known Subclasses:
GButton, GLabel, GTextEntry

public abstract class GTextContainer
extends GComponent

Title: GTextContainer

Description: The GTextContainer is a convenience object that hold a GText and Animation. It purpose is to allow GLabels and GButtons to be of the same type of object.

Copyright: Copyright (c) Feb 10, 2013

Version:
1.0
Author:
Gary Deken

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deken.game.component.GComponent
GComponent.Alignment, GComponent.MouseActions
 
Field Summary
protected  Animation baseAnimation
           
protected  GText gText
           
 
Fields inherited from class org.deken.game.component.GComponent
horizontalAlignment, id, invalid, keyPolling, mouseActions, parent, requestKeyPolling, screenHeight, screenWidth, verticalAlignment, xOffSet, yOffSet
 
Fields inherited from class org.deken.game.sprites.Sprite
boundingBox, collisionMap, location, size
 
Constructor Summary
GTextContainer()
           
 
Method Summary
abstract  void addAnimation(int id, Animation animation)
           
abstract  void addFontColor(int id, java.awt.Color color)
           
abstract  void addGText(GText gText)
           
 Animation getBaseAnimation()
           
 GText getGText()
           
 boolean hasListeners()
          Convenience method for determining if child has InputListeners.
 void setInvalid()
          Makes this GComponent invalid, so that it will be re-validated.
 
Methods inherited from class org.deken.game.component.GComponent
addMouseAction, copy, copyBase, draw, getHorizontalAlignment, getMouseActions, getParent, getVerticalAlignment, getXLocation, getYLocation, isEnabled, positionHorizontalAlignment, positionVerticalAlignment, requestKeyPolling, setEnabled, setHorizontalAlignment, setKeyPolling, setMonitored, setParent, setVerticalAlignment, update, validate
 
Methods inherited from class org.deken.game.sprites.Sprite
getBounds, getDepth, getHeight, getLocation, getName, getSize, getWidth, removeFromMap, setBoundingBox, setBoundingBox, setCollisionMap, setLocation, setName, setSize, spriteCollison, toString, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deken.game.input.InputMouseListener
notifyListener
 

Field Detail

gText

protected GText gText

baseAnimation

protected Animation baseAnimation
Constructor Detail

GTextContainer

public GTextContainer()
Method Detail

addGText

public abstract void addGText(GText gText)

addAnimation

public abstract void addAnimation(int id,
                                  Animation animation)

addFontColor

public abstract void addFontColor(int id,
                                  java.awt.Color color)

getBaseAnimation

public Animation getBaseAnimation()

getGText

public GText getGText()

hasListeners

public boolean hasListeners()
Convenience method for determining if child has InputListeners.

Returns:

setInvalid

public void setInvalid()
Description copied from class: GComponent
Makes this GComponent invalid, so that it will be re-validated.

Overrides:
setInvalid in class GComponent