... | ... | @@ -64,4 +64,5 @@ Fig.1 shows shows the sequence diagram of a widget implementing the **Tetherable |
|
|
* If it is active, the manager retrieves the current position of the potential candidate's tether origin in order to determine the relative distance.
|
|
|
* The course of action depends on whether we're currently tethered with this object or not. A call to the candidate's **isTetheredWith()** will yield the sought answer.
|
|
|
* If we're currently tethered with this object and the distance exceeds our tethering distance, than the manager initiates the separation process by invoking the **separateFrom()** method. It's interesting to note that the manager call's its hosting object's **separateFrom()** method. By doing so, the **TetherManager** notifies the **Tetherable** object about the impending separation, giving it a chance to get ready. Under normal circumstances, the **Tetherable** object's **separateFrom()** relays the call back to the manager's **separateFrom()** method, which in turn performs the actual separation from the candidate object.
|
|
|
* If we're not currently tethered with this object and the distance is below our tethering distance threshold, then the manager initiates the tethering process. Again, the manager calls the **Tetherable** object's **tetherWith()** method, notifying the later about the upcoming tethering, which relays the call back to the manager's **tetherWith()** method. Before establishing the new tether, the manager has to check whether the hosting **Tetherable** object has its *exclusive* property set or not. If this property is set, then the manager has to tear down currently established tethers before establishing a new one. |
|
|
\ No newline at end of file |
|
|
* If we're not currently tethered with this object and the distance is below our tethering distance threshold, then the manager initiates the tethering process. Again, the manager calls the **Tetherable** object's **tetherWith()** method, notifying the later about the upcoming tethering, which relays the call back to the manager's **tetherWith()** method. Before establishing the new tether, the manager has to check whether the hosting **Tetherable** object has its *exclusive* property set or not. If this property is set, then the manager has to tear down currently established tethers before establishing a new one.
|
|
|
* Before establishing a new tether however, the manage needs to figure out which **Tether** object to use to establish the link. |
|
|
\ No newline at end of file |