databionics.esom.renderer.foreground
Class ForegroundList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by databionics.esom.renderer.foreground.ForegroundList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class ForegroundList
extends java.util.ArrayList

List that holds ForegroundRenderers.

See Also:
Serialized Form

Field Summary
protected  int bmSize
          Size in grid-neurons for the smallest bm.
protected static org.apache.log4j.Logger log
          interface to log4j system
protected  int renderPosition
          One of the constants RENDER_POSTTILE,RENDER_MASK or RENDER_PRETILE from ForegroundRenderer.java.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ForegroundList()
          Standard constructor.
ForegroundList(int rndPos)
          Constructor.
 
Method Summary
 void addForeground(ForegroundRenderer fg)
          Adds a foregroundRenderer to thid list at the right position, depending on its RndLayer.
 int getBmSize()
           
 ForegroundRenderer getForeground(int index)
          Get a foregroundrenderer with casting
 StringList getListOfNames()
          Get a list of the names of the forgrounds
 int getRenderPosition()
          Set the RenderPosition.
 void orderBmSizes()
          Orders the Sizes of eventually contained Bestmatchrenderers descending.
 void removeForeground(ForegroundRenderer fg)
          Remove a Foreground from List.
 void render(Renderer renderer)
          Let all contained Foregrounds render.
 void setBmSize(int bmSize)
           
 void setCircularBestmatches(boolean circular)
           
 void setRenderPosition(int renderPosition)
          Set the RenderPosition.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

log

protected static final org.apache.log4j.Logger log
interface to log4j system


renderPosition

protected int renderPosition
One of the constants RENDER_POSTTILE,RENDER_MASK or RENDER_PRETILE from ForegroundRenderer.java.


bmSize

protected int bmSize
Size in grid-neurons for the smallest bm.

Constructor Detail

ForegroundList

public ForegroundList()
Standard constructor. Sets bmSize to 1. Sets renderPosition to -1 which makes this list useless until other position is set.


ForegroundList

public ForegroundList(int rndPos)
Constructor. Sets bmSize to 1. Sets renderPosition to rendPos.

Parameters:
rndPos - One of the constants ForegroundRenderer.java.
Method Detail

getForeground

public ForegroundRenderer getForeground(int index)
Get a foregroundrenderer with casting

Parameters:
index - position in this list

orderBmSizes

public void orderBmSizes()
Orders the Sizes of eventually contained Bestmatchrenderers descending. In a fashion, that ClassBestmatch would be bigger than Opinion, so both is visible. is for bmRenderersonly. class should specialize.


addForeground

public void addForeground(ForegroundRenderer fg)
Adds a foregroundRenderer to thid list at the right position, depending on its RndLayer.

Parameters:
fg - A forgroundRenderer

removeForeground

public void removeForeground(ForegroundRenderer fg)
Remove a Foreground from List.

Parameters:
fg -

render

public void render(Renderer renderer)
Let all contained Foregrounds render.

Parameters:
renderer - The main Renderer.

getRenderPosition

public int getRenderPosition()
Set the RenderPosition.

Returns:
Returns the actual renderPosition (One of the constants RENDER_POSTTILE,RENDER_MASK or RENDER_PRETILE from ForegroundRenderer.java. -1 if none was set).

setRenderPosition

public void setRenderPosition(int renderPosition)
Set the RenderPosition.

Parameters:
renderPosition - The renderPosition to set (One of the constants RENDER_POSTTILE,RENDER_MASK or RENDER_PRETILE from ForegroundRenderer.java.).

getBmSize

public int getBmSize()
Returns:
Returns the bmSize.

setBmSize

public void setBmSize(int bmSize)
Parameters:
bmSize - The bmSize to set.

getListOfNames

public StringList getListOfNames()
Get a list of the names of the forgrounds

Returns:
sl SringList of names of all active Foregrounds.

setCircularBestmatches

public void setCircularBestmatches(boolean circular)
Parameters:
circular -


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.