public void setObject(Object object) {
if (object == this.object)
return;
if (this.object != null && this.object instanceof BelongsToDocument) {
Document document=((BelongsToDocument)this.object).getDocument();
document.removeObjectListener(this);
if (document instanceof Project)
((Project)document).removeScheduleListener(this);
}
this.object = object;
if (object != null && object instanceof BelongsToDocument) {
Document document=((BelongsToDocument)this.object).getDocument();
document.addObjectListener(this);
if (document instanceof Project)
((Project)document).addScheduleListener(this);
}
}