|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.touchgraph.graphlayout.LocalityUtils
public class LocalityUtils
LocalityUtils: Utilities for switching locality. Animation effects require a reference to TGPanel.
Includes enhancement from v1.22's locality switching, at radius 1 or 2.
| Nested Class Summary | |
|---|---|
protected class |
LocalityUtils.ShiftLocaleThread
The thread that gets instantiated for doing the locality shift animation. |
| Field Summary | |
|---|---|
protected boolean |
fastFinishShift
If finish fast is true, quickly wrap up animation. |
static int |
INFINITE_LOCALITY_RADIUS
Constant indicating an "infinite" locality, i.e., even unconnected graphs are included. |
protected Locality |
locality
|
protected LocalityUtils.ShiftLocaleThread |
shiftLocaleThread
|
protected TGPanel |
tgPanel
|
| Constructor Summary | |
|---|---|
LocalityUtils(Locality loc,
TGPanel tgp)
|
|
| Method Summary | |
|---|---|
void |
addAllGraphElts()
|
protected void |
addNearNodes(Hashtable distHash,
int radius)
Add to locale nodes within radius distance of a focal node. |
void |
collapseNode(Node collapseNode)
Opposite of expand node, works like hide node except that the selected node is not hidden. |
void |
expandNode(Node n)
Add to locale nodes that are one edge away from a given node. |
void |
extendLocalityTo(Node n)
Add to locale the provided Node, using the currently selected Node as the starting basis. |
void |
fastFinishAnimation()
|
void |
hideNode(Node hideNode)
Hides a node, and all the nodes attached to it. |
protected boolean |
isShiftingLocality()
Returns true if the locality shifting thread is active. |
protected boolean |
markDistantNodes(Collection subgraph)
Mark for deletion nodes not contained within distHash. |
protected void |
removeMarkedNodes()
|
void |
setLocale(Node n,
int radius)
|
void |
setLocale(Node n,
int radius,
int maxAddEdgeCount,
int maxExpandEdgeCount,
boolean unidirectional)
|
protected void |
unmarkNewAdditions()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INFINITE_LOCALITY_RADIUS
protected boolean fastFinishShift
protected TGPanel tgPanel
protected Locality locality
protected LocalityUtils.ShiftLocaleThread shiftLocaleThread
| Constructor Detail |
|---|
public LocalityUtils(Locality loc,
TGPanel tgp)
| Method Detail |
|---|
public void fastFinishAnimation()
protected boolean markDistantNodes(Collection subgraph)
protected void removeMarkedNodes()
protected void addNearNodes(Hashtable distHash,
int radius)
throws TGException
TGExceptionprotected void unmarkNewAdditions()
protected boolean isShiftingLocality()
public void setLocale(Node n,
int radius,
int maxAddEdgeCount,
int maxExpandEdgeCount,
boolean unidirectional)
throws TGException
TGException
public void setLocale(Node n,
int radius)
throws TGException
TGException
public void addAllGraphElts()
throws TGException
TGExceptionpublic void expandNode(Node n)
public void extendLocalityTo(Node n)
public void hideNode(Node hideNode)
public void collapseNode(Node collapseNode)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||