|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.visualization.Ring
public class Ring
Field Summary | |
---|---|
double |
angle
|
int |
childNum
0 is the global ring a numbered coordinate sets a degree offset based on the total number of rings |
protected java.util.Hashtable |
clients
DistNodeHandle -> VisualizationClient |
static double |
DISTANCE_BUFFER
|
java.lang.String |
name
The ring name |
protected java.security.KeyPair |
pair
|
Ring |
parent
|
static double[] |
RENDER_RADIUS
|
int |
renderSize
|
double |
unitX
|
double |
unitY
|
protected Visualization |
visualization
|
Constructor Summary | |
---|---|
Ring(java.lang.String name,
java.security.KeyPair pair,
DistNodeHandle handle)
|
|
Ring(java.lang.String name,
java.security.KeyPair pair,
DistNodeHandle handle,
Ring parent)
|
Method Summary | |
---|---|
int |
addChild(Ring r)
|
Node |
addNode(DistNodeHandle handle)
|
void |
addNode(Node node)
|
void |
buildAssociations(Node n)
Checks self and all child rings. |
protected java.util.Vector |
cloneNodes()
|
boolean |
contains(int x,
int y)
|
java.awt.Point |
getCenter()
|
java.awt.Point |
getCenterBasedOnParent()
Calculates your center as an offset of your parent's center. |
java.security.KeyPair |
getKeyPair()
|
Node |
getNode(int x,
int y)
Attempts to select a node in own ring, then children's rings. |
Node[] |
getNodes()
|
double |
getRadius()
|
Ring |
getRing(int x,
int y)
|
int |
getState(DistNodeHandle node)
|
java.awt.Point |
getTextLocation(java.awt.Point idDim)
|
java.awt.Point |
idToLocation(Id id,
java.awt.Point center,
int radius)
|
protected boolean |
isHighlighted(Node node)
|
protected boolean |
isSelected(Node node)
|
int |
numChildren()
|
protected void |
paintConnections(java.awt.Graphics g)
|
protected void |
paintConnections(java.awt.Graphics g,
Node node,
boolean selected)
|
protected void |
paintNodeCircle(java.awt.Graphics g,
java.awt.Color color,
int x,
int y)
|
void |
paintSelf(java.awt.Graphics g)
|
void |
paintTree(java.awt.Graphics g,
int w,
int h)
|
void |
prepNodes(java.awt.Graphics g,
java.awt.Point center,
int radius)
|
void |
select()
|
void |
setVisualization(Visualization v)
|
void |
stopTouchingNodes()
|
java.lang.String |
toString()
|
void |
touchAllNodes()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable clients
protected Visualization visualization
public java.lang.String name
protected java.security.KeyPair pair
public static final double[] RENDER_RADIUS
public static final double DISTANCE_BUFFER
public Ring parent
public int childNum
public double angle
public double unitX
public double unitY
public int renderSize
Constructor Detail |
---|
public Ring(java.lang.String name, java.security.KeyPair pair, DistNodeHandle handle)
public Ring(java.lang.String name, java.security.KeyPair pair, DistNodeHandle handle, Ring parent)
Method Detail |
---|
public java.security.KeyPair getKeyPair()
public void setVisualization(Visualization v)
public void addNode(Node node)
protected java.util.Vector cloneNodes()
public Node addNode(DistNodeHandle handle)
public void buildAssociations(Node n)
public Node[] getNodes()
public java.lang.String toString()
toString
in class java.lang.Object
public int getState(DistNodeHandle node)
public Node getNode(int x, int y)
public Ring getRing(int x, int y)
public boolean contains(int x, int y)
public void paintTree(java.awt.Graphics g, int w, int h)
public void paintSelf(java.awt.Graphics g)
protected void paintConnections(java.awt.Graphics g)
protected void paintConnections(java.awt.Graphics g, Node node, boolean selected)
public void prepNodes(java.awt.Graphics g, java.awt.Point center, int radius)
public java.awt.Point getTextLocation(java.awt.Point idDim)
protected boolean isSelected(Node node)
protected boolean isHighlighted(Node node)
public java.awt.Point idToLocation(Id id, java.awt.Point center, int radius)
protected void paintNodeCircle(java.awt.Graphics g, java.awt.Color color, int x, int y)
public java.awt.Point getCenter()
public java.awt.Point getCenterBasedOnParent()
public void select()
public double getRadius()
public int numChildren()
public int addChild(Ring r)
public void stopTouchingNodes()
public void touchAllNodes()
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |