public class DotBehavior extends Behavior implements MessageCallback
Behavior.CommandMessage, Behavior.EventMessage
Modifier and Type | Field and Description |
---|---|
protected boolean |
activated |
protected Point |
destination |
protected int |
radius |
lock, MSG_TYPE_COMMAND, MSG_TYPE_EVENT, obj
NO_FLAGS, RESPONSE_EXPECTED
Constructor and Description |
---|
DotBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
deactivate() |
int |
getRadius() |
void |
handleMessage(Message msg,
int flags)
Handle message.
|
void |
initialize() |
void |
reaction(ObjectTracker.NotifyReactionRadiusMessage nMsg) |
void |
setRadius(int radius) |
dispatchMessage, getObjectStub, setObjectStub
protected int radius
protected Point destination
protected boolean activated
public void initialize()
initialize
in class Behavior
public void deactivate()
deactivate
in class Behavior
public void handleMessage(Message msg, int flags)
MessageCallback
handleMessage
in interface MessageCallback
handleMessage
in class Behavior
msg
- Message sent from other agent.flags
- Bitwise OR of MessageCallback.NO_FLAGS
, MessageCallback.RESPONSE_EXPECTED
.public void reaction(ObjectTracker.NotifyReactionRadiusMessage nMsg)
public void setRadius(int radius)
public int getRadius()