org.deken.game.component.layout
Class StaticLayout

java.lang.Object
  extended by org.deken.game.component.layout.StaticLayout
All Implemented Interfaces:
Layout

public class StaticLayout
extends java.lang.Object
implements Layout

Title: StaticLayout

Description: StaticLayout of components on the screen.

Copyright: Copyright (c) Mar 4, 2015

Version:
1.0
Author:
Gary Deken

Constructor Summary
StaticLayout(int screenWidth, int screenHeight)
           
 
Method Summary
 void addComponent(GComponent gComponent, LayoutLocation layoutLocation)
          Adds a component to this Layout based on the LayoutLocation parameters.
 void draw(java.awt.Graphics2D graphics)
          Draws this layout to the screen.
 GComponent getComponentByName(java.lang.String name)
          Returns a Component in the is Layout by its name.
 java.util.List<GComponent> getComponents()
          Get the complete list of components in this Layout
 int getScreenHeight()
          Get the screen height associated to this layout
 int getScreenWidth()
          Get the screen width associated to this Layout
 void update(long elapseTime)
          Game loop update method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticLayout

public StaticLayout(int screenWidth,
                    int screenHeight)
Method Detail

addComponent

public void addComponent(GComponent gComponent,
                         LayoutLocation layoutLocation)
Description copied from interface: Layout
Adds a component to this Layout based on the LayoutLocation parameters.

Specified by:
addComponent in interface Layout

draw

public void draw(java.awt.Graphics2D graphics)
Description copied from interface: Layout
Draws this layout to the screen. The Layout is draw from the top left source.

Specified by:
draw in interface Layout

getComponentByName

public GComponent getComponentByName(java.lang.String name)
Description copied from interface: Layout
Returns a Component in the is Layout by its name.

Specified by:
getComponentByName in interface Layout
Returns:

getComponents

public java.util.List<GComponent> getComponents()
Description copied from interface: Layout
Get the complete list of components in this Layout

Specified by:
getComponents in interface Layout
Returns:

getScreenWidth

public int getScreenWidth()
Description copied from interface: Layout
Get the screen width associated to this Layout

Specified by:
getScreenWidth in interface Layout
Returns:
int

getScreenHeight

public int getScreenHeight()
Description copied from interface: Layout
Get the screen height associated to this layout

Specified by:
getScreenHeight in interface Layout
Returns:
int

update

public void update(long elapseTime)
Description copied from interface: Layout
Game loop update method. This will update all components in the Layout

Specified by:
update in interface Layout