public final void removeParticpant(final Object participant) { // remember this participant _participants.remove(participant); // stop listening out for property changes if (participant instanceof MWC.GUI.PlainWrapper) { final SupportsPropertyListeners val = (SupportsPropertyListeners) participant; val.removePropertyChangeListener(MWC.GenericData.WatchableList.FILTERED_PROPERTY, this); } // recalculate the start and end times recalcTimes(); }
/** * add a new exercise participant to the list we monitor, providing the start and stop times * aswell * * @param participant * @param start * @param end */ public final void addParticipant( final WatchableList participant, final HiResDate start, final HiResDate end) { // remember this participant _participants.put(participant, new somePeriod(start, end)); // start listening out for property changes if (participant instanceof MWC.GUI.PlainWrapper) { final SupportsPropertyListeners val = (SupportsPropertyListeners) participant; val.addPropertyChangeListener(MWC.GenericData.WatchableList.FILTERED_PROPERTY, this); } // recalculate the start and end times recalcTimes(); }