com.monad.homerun.view
Class Region

java.lang.Object
  extended by com.monad.homerun.view.Region
All Implemented Interfaces:
java.io.Serializable

public class Region
extends java.lang.Object
implements java.io.Serializable

A Region is a collection of 1 or more views, to be placed in a Scene at a specified location

See Also:
Serialized Form

Constructor Summary
Region()
           
Region(java.lang.String location)
           
Region(java.lang.String name, Region region)
           
 
Method Summary
 void addView(View view)
          Adds a view to the region
 java.lang.String getLocation()
          Returns the location of the region within the scene
 int getNumViews()
          Returns the number of views in this region
 View getView(int index)
          Returns the view at index i of the region
 View[] getViews()
          Returns an ordered list of views in this region
 void removeView(int index)
          Removes the view at index i of the region
 void setLocation(java.lang.String location)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Region

public Region()

Region

public Region(java.lang.String location)

Region

public Region(java.lang.String name,
              Region region)
Method Detail

getLocation

public java.lang.String getLocation()
Returns the location of the region within the scene

Returns:
location the position of the region in the scene

setLocation

public void setLocation(java.lang.String location)

getViews

public View[] getViews()
Returns an ordered list of views in this region

Returns:
views an array of View objectss

getNumViews

public int getNumViews()
Returns the number of views in this region

Returns:
num the number of views

addView

public void addView(View view)
Adds a view to the region

Parameters:
view - the view to add

removeView

public void removeView(int index)
Removes the view at index i of the region

Parameters:
index - the location of the view to remove

getView

public View getView(int index)
Returns the view at index i of the region

Parameters:
index - the index of the desired view
Returns:
view the View object


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.