com.rubecula.darwin.visualization
Interface VisualizationModel

All Superinterfaces:
Countable
All Known Implementing Classes:
VisualizationModel_, VisualizationModel_Standard

public interface VisualizationModel
extends Countable

Defines a model to which population delegates its graphical rendering.

Author:
Robin Hillyard

Method Summary
 void addAvatar(Avatar avatar)
          Mutator method to add an individual to this population (the index for this new individual will be the current value of Countable.getCount().
 int clean()
          Clean the model of dead wood, so to speak.
 void clear()
          Method to remove all individuals from the model.
 Avatar findAvatar(Individual individual)
           
 void fireModelChange()
          Method to notify all of the listeners that the population has changed.
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
           
 java.util.Collection<Avatar> getIndividuals()
           
 java.lang.String getTitle()
           
 boolean isVisible()
           
 void putAttribute(java.lang.String attrName, java.lang.Object attrValue)
          Method to set (or reset) an attribute.
 boolean removeIndividual(Avatar avatar)
          Mutator method to remove an individual from this population (NOTE: the indices for some of the other individual members of the population will be affected).
 void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
          Method to initialize several attributes at once.
 void setComponent(java.awt.Component component)
           
 void setVisible(boolean visible)
           
 void visualize(Visualizable visualizable, VisualizationFactory visualizationFactory)
           
 
Methods inherited from interface com.rubecula.darwin.foundation.Countable
getCount
 

Method Detail

addAvatar

void addAvatar(Avatar avatar)
Mutator method to add an individual to this population (the index for this new individual will be the current value of Countable.getCount().

Parameters:
avatar - an individual which is to be added to the population.

clean

int clean()
Clean the model of dead wood, so to speak.

Returns:
the number of individuals culled.

clear

void clear()
Method to remove all individuals from the model. Consider eliminating.


findAvatar

Avatar findAvatar(Individual individual)
Parameters:
individual -
Returns:
an Avatar based on the given individual.

fireModelChange

void fireModelChange()
Method to notify all of the listeners that the population has changed. In general, should be called after any calls to addAvatar(Avatar) or removeIndividual(Avatar).


getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns:
a map which specifies various attributes of the visualization model, derived typically from the environment.

getIndividuals

java.util.Collection<Avatar> getIndividuals()
Returns:
the current collection of individual objects.

getTitle

java.lang.String getTitle()
Returns:
get the title for this visualization model.

isVisible

boolean isVisible()
Returns:
true if this visualization model is visible.

putAttribute

void putAttribute(java.lang.String attrName,
                  java.lang.Object attrValue)
Method to set (or reset) an attribute.

Parameters:
attrName -
attrValue -

removeIndividual

boolean removeIndividual(Avatar avatar)
Mutator method to remove an individual from this population (NOTE: the indices for some of the other individual members of the population will be affected).

Parameters:
avatar - an individual which is to be removed from the population.
Returns:
true if the population model has changed (result would be false if individual was not a member of this population model).

setAttributes

void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Method to initialize several attributes at once.

Parameters:
attributes -

setComponent

void setComponent(java.awt.Component component)
Parameters:
component - the component to set

setVisible

void setVisible(boolean visible)
Parameters:
visible - the visible to set

visualize

void visualize(Visualizable visualizable,
               VisualizationFactory visualizationFactory)
Parameters:
visualizable -
visualizationFactory -


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.