traker.addPropertyChangeListener(CombatTraker.METH_ADD_UNIT_METHOD,
new PropertyChangeListener() {
@Override
public void propertyChange(final PropertyChangeEvent evt) {
Threads.execute(new MyRunnable() {
@Override
public void run() {
addElement((UniqueID) evt.getNewValue());
}
@Override
public String getTaskName() {
return "Add unit";
}
});
}
});
traker.addPropertyChangeListener(CombatTraker.METH_REMOVE_UNIT_METHOD,
new PropertyChangeListener() {
@Override
public void propertyChange(final PropertyChangeEvent evt) {
Threads.execute(new MyRunnable() {
@Override
public void run() {
removeElement((UniqueID) evt.getNewValue());
}