ch.sahits.game.graphic.display
Class OpenPatricianBackgroundView

java.lang.Object
  extended by ch.sahits.game.rendering.AbstractRenderPart
      extended by ch.sahits.game.graphic.display.OpenPatricianBackgroundView
All Implemented Interfaces:
ch.sahits.game.event.IEventListener, ISahitsContainer, ch.sahits.game.rendering.Renderable, ch.sahits.game.rendering.RenderablePart
Direct Known Subclasses:
NewGameView

public class OpenPatricianBackgroundView
extends ch.sahits.game.rendering.AbstractRenderPart
implements ISahitsContainer

This RenderablePart implementation is a base implementation for brick walled background on which form elements can be placed.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 3, 2011

Field Summary
private  LinkedList<ISahitsComponent> components
           
private  ISahitsLayoutManager layoutManager
           
private  LinkedList<IUpdatableComponent> updatables
           
 
Fields inherited from class ch.sahits.game.rendering.AbstractRenderPart
rect
 
Constructor Summary
OpenPatricianBackgroundView(Rectangle rect, ISahitsLayoutManager layoutManager)
           
 
Method Summary
 void add(ISahitsComponent comp, ISahitsLayoutConstraint constraint)
          Add a component to the container with a specific constraint
 void gameRender(Graphics gScr)
           
 void gameUpdate(ch.sahits.game.event.Event e, Object notice)
           
 ISahitsComponent get(int i)
          Retrieve a component from internal storage at position i.
 int getComponentCount()
          Retrieve the total number of components contained in this container
 int getHeight()
          Retrieve the actual height of the container
 Insets getInsets()
          Retrieve the insets of the container
 int getWidth()
          Retrieve the actual width of the container
 
Methods inherited from class ch.sahits.game.rendering.AbstractRenderPart
getBounds, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.sahits.game.graphic.display.ISahitsContainer
getBounds
 

Field Detail

updatables

private LinkedList<IUpdatableComponent> updatables

components

private LinkedList<ISahitsComponent> components

layoutManager

private final ISahitsLayoutManager layoutManager
Constructor Detail

OpenPatricianBackgroundView

public OpenPatricianBackgroundView(Rectangle rect,
                                   ISahitsLayoutManager layoutManager)
Method Detail

add

public void add(ISahitsComponent comp,
                ISahitsLayoutConstraint constraint)
Description copied from interface: ISahitsContainer
Add a component to the container with a specific constraint

Specified by:
add in interface ISahitsContainer
Parameters:
comp - ISahitsComponent
constraint - ISahitsLayoutConstraint

gameRender

public void gameRender(Graphics gScr)
Specified by:
gameRender in interface ch.sahits.game.rendering.Renderable

gameUpdate

public void gameUpdate(ch.sahits.game.event.Event e,
                       Object notice)
Specified by:
gameUpdate in interface ch.sahits.game.event.IEventListener
Specified by:
gameUpdate in interface ch.sahits.game.rendering.Renderable

getComponentCount

public int getComponentCount()
Description copied from interface: ISahitsContainer
Retrieve the total number of components contained in this container

Specified by:
getComponentCount in interface ISahitsContainer
Returns:
number of contained ISahitsComponents

get

public ISahitsComponent get(int i)
Description copied from interface: ISahitsContainer
Retrieve a component from internal storage at position i. This method does not guarantee any order.

Specified by:
get in interface ISahitsContainer
Parameters:
i - position in the internal storage.
Returns:

getInsets

public Insets getInsets()
Description copied from interface: ISahitsContainer
Retrieve the insets of the container

Specified by:
getInsets in interface ISahitsContainer
Returns:

getHeight

public int getHeight()
Description copied from interface: ISahitsContainer
Retrieve the actual height of the container

Specified by:
getHeight in interface ISahitsContainer
Returns:
height in pixels

getWidth

public int getWidth()
Description copied from interface: ISahitsContainer
Retrieve the actual width of the container

Specified by:
getWidth in interface ISahitsContainer
Returns:
width in pixels


Copyright © 2011 Sahits GmbH. All Rights Reserved.