|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.sprites.Sprite
org.deken.game.component.GComponent
org.deken.game.component.GContainer
org.deken.game.component.GTableContainer
public class GTableContainer
Title: GTableContainer
Description: The GTableContainer display GComponents within a grid.
Copyright: Copyright (c) Feb 9, 2013
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deken.game.component.GComponent |
---|
GComponent.Alignment, GComponent.MouseActions |
Field Summary |
---|
Fields inherited from class org.deken.game.component.GContainer |
---|
backgroundColor, grabbed |
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 | |
---|---|
GTableContainer(int screenWidth,
int screenHeight,
int columns,
int rows)
|
Method Summary | |
---|---|
void |
add(GComponent component)
|
void |
add(GComponent gameComponent,
GComponent.Alignment horizontalAlignment,
GComponent.Alignment verticalAlignment,
int column,
int row)
Add a GameComponent to this GameTable, using the alignment for Horizontal and Vertical placement, in cell at the row and column. |
void |
add(GComponent gameComponent,
GComponent.Alignment horizontalAlignment,
int column,
int row)
Add a GameComponent to this GameTable, using the alignment for Horizontal placement, in cell at the row and column. |
void |
add(GComponent gameComponent,
int column,
int row)
Add a GameComponent to this GameTable, using the alignment for Horizontal placement, in cell at the row and column. |
GComponent |
copy()
|
void |
draw(java.awt.Graphics2D graphics,
int xOffset,
int yOffset)
Draws the sprite with the current offset. |
java.util.List<GComponent> |
getChildren()
|
GComponent |
getComponentByName(java.lang.String name)
|
void |
notifyListener(InputMouseAction inputMouseAction)
notifyListener |
void |
remove(GComponent gameComponent)
|
protected void |
setLocations(int x,
int y)
|
void |
setMonitored(boolean active)
|
void |
setSize(SpriteSize spriteSize)
Set the size of this container. |
protected void |
spriteCollison(Sprite collideSprite)
Handle the collision with another sprite. |
void |
update(long elapseTime)
update |
void |
validate(java.awt.Graphics2D graphics)
|
Methods inherited from class org.deken.game.component.GContainer |
---|
copyBase, isGrabbed, isSizeSet, setBackgroundColor, setGrabbed, setScreenHeightWidth |
Methods inherited from class org.deken.game.component.GComponent |
---|
addMouseAction, copyBase, getHorizontalAlignment, getMouseActions, getParent, getVerticalAlignment, getXLocation, getYLocation, isEnabled, positionHorizontalAlignment, positionVerticalAlignment, requestKeyPolling, setEnabled, setHorizontalAlignment, setInvalid, setKeyPolling, setParent, setVerticalAlignment |
Methods inherited from class org.deken.game.sprites.Sprite |
---|
getBounds, getDepth, getHeight, getLocation, getName, getSize, getWidth, removeFromMap, setBoundingBox, setBoundingBox, setCollisionMap, setLocation, setName, toString, updateLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GTableContainer(int screenWidth, int screenHeight, int columns, int rows)
screenWidth
- screenHeight
- columns
- rows
- Method Detail |
---|
public void add(GComponent component)
add
in class GContainer
public void add(GComponent gameComponent, GComponent.Alignment horizontalAlignment, int column, int row)
gameComponent
- horizontalAlignment
- column
- row
- public void add(GComponent gameComponent, GComponent.Alignment horizontalAlignment, GComponent.Alignment verticalAlignment, int column, int row)
gameComponent
- horizontalAlignment
- verticalAlignment
- column
- row
- public void add(GComponent gameComponent, int column, int row)
gameComponent
- column
- row
- public GComponent copy()
copy
in class GComponent
public void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
GComponent
draw
in class GComponent
public java.util.List<GComponent> getChildren()
getChildren
in class GContainer
public GComponent getComponentByName(java.lang.String name)
getComponentByName
in class GContainer
public void notifyListener(InputMouseAction inputMouseAction)
InputMouseListener
This method is called when any Mouse Motion event occurs.
inputMouseAction
- InputMouseActionpublic void remove(GComponent gameComponent)
remove
in class GContainer
gameComponent
- public void setMonitored(boolean active)
setMonitored
in class GComponent
public void setSize(SpriteSize spriteSize)
setSize
in class Sprite
spriteSize
- public void update(long elapseTime)
GComponent
This method takes the elapse time, and calculates the new current frame of the animation.
update
in interface Updateable
update
in class GComponent
elapseTime
- longpublic void validate(java.awt.Graphics2D graphics)
validate
in class GComponent
protected void spriteCollison(Sprite collideSprite)
Sprite
spriteCollison
in class Sprite
protected void setLocations(int x, int y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |