org.deken.game.component.layout
Interface Layout

All Known Implementing Classes:
StaticLayout

public interface Layout

Title: Layout

Description:

Copyright: Copyright (c) Mar 4, 2015

Version:
1.0
Author:
Gary Deken

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.
 

Method Detail

addComponent

void addComponent(GComponent gComponent,
                  LayoutLocation layoutLocation)
Adds a component to this Layout based on the LayoutLocation parameters.

Parameters:
gComponent -
layoutLocation -

getComponents

java.util.List<GComponent> getComponents()
Get the complete list of components in this Layout

Returns:

update

void update(long elapseTime)
Game loop update method. This will update all components in the Layout

Parameters:
elapseTime -

draw

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

Parameters:
graphics -

getComponentByName

GComponent getComponentByName(java.lang.String name)
Returns a Component in the is Layout by its name.

Parameters:
name -
Returns:

getScreenWidth

int getScreenWidth()
Get the screen width associated to this Layout

Returns:
int

getScreenHeight

int getScreenHeight()
Get the screen height associated to this layout

Returns:
int