|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AgentRepresentation is for storing the agents. It is used by the AgentContainer
class.
The extends of this class are that it has some dimension that
can be setted and also a propertychange support should available by
it implementors
Field Summary | |
static String |
PROP_DIMENSION
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener. |
Dimension |
getDimension()
gets the dimension. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
removes listener |
Point |
rndPosition()
Generates position somewhere within the representation dimension. |
Point |
rndRelPosition(Point from,
double radius)
Like rndPosition, but it generates relativee from point from with max distance to point radius. |
void |
setDimension(Dimension d)
Should set the dimension of the imeplemnting class, but it could be not supported. |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Field Detail |
public static final String PROP_DIMENSION
Method Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- listenerPropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- listenerPropertyChangeListener
public void setDimension(Dimension d)
d
- the dimenstionpublic Dimension getDimension()
public Point rndPosition()
public Point rndRelPosition(Point from, double radius)
from
- relative pointradius
- distance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |