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.jinGirNew
Class JinGirNewNode

    java.lang.Object
      uchicago.src.sim.network.DefaultNode
          uchicago.src.sim.network.DefaultDrawableNode
              uchicago.src.repastdemos.jinGirNew.JinGirNewNode

All Implemented Interfaces:
  Drawable2DGridNode, DrawableNonGridNode, Moveable, NonGridDrawable, Node

    public class JinGirNewNode

extends DefaultDrawableNode

The agent class for the JinGirNew simluation. JinGirNode extends DefaultDrawableNode and so it is both a DefaultNode and a DrawableNonGridNode. All of the important behavoir here as to do with creating new links.

Version:
  $Revision: 1.1 $ $Date: 2005/08/12 20:04:52 $

Nested Class Summary

Nested classes/interfaces inherited from class uchicago.src.sim.network.DefaultNode
`DefaultNode.OrderedHashMap`

Field Summary

Fields inherited from class uchicago.src.sim.network.DefaultDrawableNode
`item`

Fields inherited from class uchicago.src.sim.network.DefaultNode
`inEdges, inMap, label, outEdges, outMap`

Constructor Summary
`JinGirNewNode()`
`JinGirNewNode(int x, int y)`

Method Summary
`void` | `init(int x, int y)` Initialize this JinGirNewNode, this takes the place of the constructor when a JinGirNewNode is created from a file using its no-arg constructor.
`void` | `makeEdgeToFrom(DefaultNode node, int maxDegree, java.awt.Color color)` Makes an edge to the specified node and from the specifed node to thisJinGirNewNode if both nodes do not already have edges to each other and if adding the edge keeps their degrees less than maxDegree.
`void` | `meetNeighbor(int maxDegree)` Creates an edge between two nodes that both link to this JinGirNewNode.
`void` | `meetRandom(java.util.ArrayList list, int maxDegree)` Creates a new edge between this JinGirNewNode and a node chosen at random from the specified list.
`void` | `removeFriend()` Removes a link between this JinGirNewNode and one chosen at random from those linked to this JinGirNewNode.

Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode
`allowResizing, calcSize, contains, draw, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY`

Methods inherited from class uchicago.src.sim.network.DefaultNode
`addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge`

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.gui.DrawableNonGridNode
`getOutEdges`

Methods inherited from interface uchicago.src.sim.gui.Drawable2DGridNode
`getOutEdges`

Constructor Detail

### JinGirNewNode

    public JinGirNewNode()

### JinGirNewNode

    public JinGirNewNode(int x,
                         int y)

Method Detail

### init

    public void init(int x,
                     int y)

  Initialize this JinGirNewNode, this takes the place of the constructor when a JinGirNewNode is created from a file using its no-arg constructor.

### makeEdgeToFrom

    public void makeEdgeToFrom(DefaultNode node,
                               int maxDegree,
                               java.awt.Color color)

  Makes an edge to the specified node and from the specifed node to thisJinGirNewNode if both nodes do not already have edges to each other and if adding the edge keeps their degrees less than maxDegree. The edges is displayed in the specified color.

### meetRandom

    public void meetRandom(java.util.ArrayList list,
                           int maxDegree)

  Creates a new edge between this JinGirNewNode and a node chosen at random from the specified list. This edge is created via `makeEdgeFromTo` and so those conditions must be met as well.

### meetNeighbor

    public void meetNeighbor(int maxDegree)

  Creates an edge between two nodes that both link to this JinGirNewNode. This edge is created via `makeEdgeFromTo` and so those conditions must be met as well.

### removeFriend

    public void removeFriend()

  Removes a link between this JinGirNewNode and one chosen at random from those linked to this JinGirNewNode.

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