Class LinkManager

java.lang.Object
  |
  +--LinkManager

public class LinkManager
extends java.lang.Object


Method Summary
 void affectStatusBits(int and, int xor)
          Modify a link's status bits.
 boolean aLinkLikeThisExists(Node e1, Node e2)
           
 void deleteAllLinksBetween(Node e1, Node e2)
          deletes all links between e1 and e2
 boolean isThereALinkBetween(Node e1, Node e2)
          returns true iff there's a link between e1 and e2
 void killAllLinks(Node e)
          Destroys all links to Node e
 boolean killLastLink(Node e)
          Destroys the last link that was created on Node e
 void killSpecifiedLink(Link lk)
          Destroys a specified link, lk
 Link linkBetween(Node e1, Node e2)
          returns the link between e1 and e2, or null if no such link exists
 void reset()
          Kills all links.
 Link setLink(Node e1, Node e2, int length, int elasticity, int colour, int status_flags)
          Sets a link between e1 and e2, with target length lenth, elasticity, colour and status flags specified
 Link setLink(Node e1, Node e2, Link lk)
          Sets a link between e1 and e2, which is otherwise a clone of the specified link, lk
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reset

public void reset()
Kills all links. Does not redraw anything

setLink

public final Link setLink(Node e1,
                          Node e2,
                          int length,
                          int elasticity,
                          int colour,
                          int status_flags)
Sets a link between e1 and e2, with target length lenth, elasticity, colour and status flags specified

setLink

public final Link setLink(Node e1,
                          Node e2,
                          Link lk)
Sets a link between e1 and e2, which is otherwise a clone of the specified link, lk

aLinkLikeThisExists

public final boolean aLinkLikeThisExists(Node e1,
                                         Node e2)

deleteAllLinksBetween

public final void deleteAllLinksBetween(Node e1,
                                        Node e2)
deletes all links between e1 and e2

isThereALinkBetween

public final boolean isThereALinkBetween(Node e1,
                                         Node e2)
returns true iff there's a link between e1 and e2

linkBetween

public final Link linkBetween(Node e1,
                              Node e2)
returns the link between e1 and e2, or null if no such link exists

killAllLinks

public final void killAllLinks(Node e)
Destroys all links to Node e

killLastLink

public final boolean killLastLink(Node e)
Destroys the last link that was created on Node e

killSpecifiedLink

public final void killSpecifiedLink(Link lk)
Destroys a specified link, lk

affectStatusBits

public final void affectStatusBits(int and,
                                   int xor)
Modify a link's status bits. AND them with "and", and then XOR them with "xor"