... | ... | @@ -66,4 +66,6 @@ Fig.1 shows shows the sequence diagram of a widget implementing the **Tetherable |
|
|
* 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.
|
|
|
* Before establishing a new tether however, the manage needs to figure out which **Tether** object to use to establish the link.
|
|
|
* Now, if we're currently tethered with the current candidate, the manager needs to update the corresponding **Tether** object's, since the end point corresponding to the origin of this **Tetherable** object was moved. |
|
|
\ No newline at end of file |
|
|
* Now, if we're currently tethered with the current candidate, the manager needs to update the corresponding **Tether** object's, since the end point corresponding to the origin of this **Tetherable** object was moved.
|
|
|
* Last but not least, depending on whether this **Tetherable** object has its **rotateWithTether** flag set or not,
|
|
|
the manager determines the *line of sight* between both tethered objects, determines its angle and applies it to the **Tetherable** object's origin. |
|
|
\ No newline at end of file |