ch.sahits.game.graphic.display
Interface ISahitsContainer

All Known Implementing Classes:
NewGameView, OpenPatricianBackgroundView

public interface ISahitsContainer

This container component is used to hold ISahistsComponents that are rendered within this container. The base concept is the same as with Java/Swing container/component however with much less overhead.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Jun 5, 2011

Method Summary
 void add(ISahitsComponent comp, ISahitsLayoutConstraint constraint)
          Add a component to the container with a specific constraint
 ISahitsComponent get(int i)
          Retrieve a component from internal storage at position i.
 Rectangle getBounds()
          Retrieve the bounds of the container
 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
 

Method Detail

add

void add(ISahitsComponent comp,
         ISahitsLayoutConstraint constraint)
Add a component to the container with a specific constraint

Parameters:
comp - ISahitsComponent
constraint - ISahitsLayoutConstraint

get

ISahitsComponent get(int i)
Retrieve a component from internal storage at position i. This method does not guarantee any order.

Parameters:
i - position in the internal storage.
Returns:

getComponentCount

int getComponentCount()
Retrieve the total number of components contained in this container

Returns:
number of contained ISahitsComponents

getInsets

Insets getInsets()
Retrieve the insets of the container

Returns:

getBounds

Rectangle getBounds()
Retrieve the bounds of the container

Returns:

getHeight

int getHeight()
Retrieve the actual height of the container

Returns:
height in pixels

getWidth

int getWidth()
Retrieve the actual width of the container

Returns:
width in pixels


Copyright © 2011 Sahits GmbH. All Rights Reserved.