... | ... | @@ -41,10 +41,11 @@ Lets have a closer look at the individual methods. |
|
|
* Calling the **tetherWith()** method will initiate the tethering process between this **tetherable** instance and the specified candidate. The **separateFrom()** method does the opposite by tearing down a previously established link.
|
|
|
* Tethering should normally only take place between current active, i.e. visible objects. The **isActive()** method helps in determining whether this is true or not.
|
|
|
* The **isTethered()** method helps in figuring out whether this **tetherable** instance currently is tethered to another instance or not.
|
|
|
* The **Tetherable** interface defines a property called *draggable*. If you remember, normal object behaviour when the distance between currently tethered object exceeds the specified tethering distance consists in tearing down the established connection. **Draggable** objects however, will follow along as if they were on a *leash*. Please note that this feature is currently not fully supported. Some of the fundamental helper methods already exist, but setting the **draggable** property to true will have no effect for the time being. Nevertheless, the **isDraggable()** returns the state of the **draggable** property.
|
|
|
* The **Tetherable** interface defines a property called *draggable*. If you remember, normal object behaviour when the distance between currently tethered object exceeds the specified tethering distance consists in tearing down the established connection. **Draggable** objects however, will follow along as if they were on a *leash*. Please note that this feature is currently not fully supported. Some of the fundamental helper methods already exist, but setting the *draggable* property to true will have no effect for the time being. Nevertheless, the **isDraggable()** returns the state of the **draggable** property.
|
|
|
* The *exclusive* property specifies whether a **tetherable** object can be tethered to more than one object or whether it only accepts a single tethering partner. the **isExclusive()** returns the state of the **exclusive** property.
|
|
|
* The **`rotatesWithTether`** flag specifies whether or not a **tetherable** object *rotates* together with its **Tether**. If said flag is set to *true*, this instance's orientation would follow the object it is tethered with if the later would orbit around this object.
|
|
|
* The *rotatesWithTether* flag specifies whether or not a **tetherable** object *rotates* together with its **Tether**. If said flag is set to *true*, this instance's orientation would follow the object it is tethered with if the later would orbit around this object.
|
|
|
* The **isTetheredWith()** method allows checking whether this instance is currently tethered to the specified candidate.
|
|
|
* Changes in tethering state can be intercept by means of **TetherListeners**. The **addTetherListener()** method allows registering an interested class as a listener to be notified about tethering state changes. The **removeTetherListener()** does the opposite.
|
|
|
|
|
|
|
|
|
<div align="center">
|
... | ... | |