Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.repastdemos.jiggle
Class JiggleEdge

    java.lang.Object
      uchicago.src.sim.network.DefaultEdge
          uchicago.src.repastdemos.jiggle.JiggleEdge

All Implemented Interfaces:
  DrawableEdge, Edge

    public class JiggleEdge

extends DefaultEdge
implements DrawableEdge

The link between JiggleNodes. Edges are objects and thus can act as agents, although this is not the case here. JiggleEdge can draw itself and keep track of the nodes on its ends.

Version:
  $Revision: 1.1 $ $Date: 2005/08/12 20:04:51 $
Author:
  Nick Collier

Field Summary

Fields inherited from class uchicago.src.sim.network.DefaultEdge
`from, label, strength, to, type`

Constructor Summary
`JiggleEdge()`
`JiggleEdge(Node from, Node to, java.awt.Color color)`

Method Summary
`void` | `draw(SimGraphics g, int fromX, int toX, int fromY, int toY)` Called by a Network*Display instructing the edge to draw itself.
`void` | `setColor(java.awt.Color c)`

Methods inherited from class uchicago.src.sim.network.DefaultEdge
`getFrom, getLabel, getStrength, getTo, getType, setFrom, setLabel, setStrength, setTo, setType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface uchicago.src.sim.network.Edge
`getFrom, getLabel, getStrength, getTo, getType, setFrom, setLabel, setStrength, setTo, setType`

Constructor Detail

### JiggleEdge

    public JiggleEdge()

### JiggleEdge

    public JiggleEdge(Node from,
                      Node to,
                      java.awt.Color color)

Method Detail

### setColor

    public void setColor(java.awt.Color c)

### draw

    public void draw(SimGraphics g,
                     int fromX,
                     int toX,
                     int fromY,
                     int toY)

  Description copied from interface: `DrawableEdge`
  Called by a Network*Display instructing the edge to draw itself. The coordinates are screen coordinates and correspond to the center of the nodes. Edges to be drawn by a Network*Display must implement this interface. Typicaly, some line drawing method in SimGraphics is called, passing the remaining arguments to that method. For example
  `

       public void draw(SimGraphics g, int fromX, int toX, int fromY, int toY) {

          g.drawLink(Color.red, fromX, toX, fromY, toY);

       }

  ` The x and y coordinates are calculated by the Display from the position of the nodes to which this is an edge.

  Specified by:
    `draw` in interface `DrawableEdge`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD