|
artoflife pre0.1.0-dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Used by PopulationView
to
implement a policy for positioning
IndividualRecord
s horizontally
and vertically within the view.
Method Summary | |
void |
positionAfterChange(org.artoflife.gui.population.IndividualRecord record,
int index)
Reposition a record (at a given index within the view) whose Individual changed in some way. |
void |
positionNew(org.artoflife.gui.population.IndividualRecord record,
int index)
Find a position for an Individual newly added to the view at a specified index and set the IndividualRecord's state appropriately. |
void |
positionNewAt(org.artoflife.gui.population.IndividualRecord record,
int index,
java.awt.Point location)
Position a record at a certain location (if possible), altering the Individual within the passed IndividualRecord if necessary to make it fit at that location. |
void |
repositionForViewBounds(org.artoflife.gui.population.IndividualRecord record,
int index,
int x,
int y,
int width,
int height)
Reposition an IndividualRecord (at a given index within the view) so it fits in the parent view's new bounds passed in as parameters. |
void |
setPopulationView(PopulationView view)
|
void |
updateBounds()
The bounds of the owning view have changed so can update cached dimensions here. |
void |
updatePopulation()
Population being viewed has changed in some way so might update some cached dimensions here if the population size has changed for example. |
Method Detail |
public void setPopulationView(PopulationView view)
view
- the parent PopulationView
using this policy.public void updateBounds()
repositionForViewBounds(org.artoflife.gui.population.IndividualRecord, int, int, int, int, int)
.
public void updatePopulation()
public void positionNew(org.artoflife.gui.population.IndividualRecord record, int index)
public void positionNewAt(org.artoflife.gui.population.IndividualRecord record, int index, java.awt.Point location)
public void repositionForViewBounds(org.artoflife.gui.population.IndividualRecord record, int index, int x, int y, int width, int height)
public void positionAfterChange(org.artoflife.gui.population.IndividualRecord record, int index)
|
artoflife pre0.1.0-dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |