|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.tools.transfer.ExportGraphModel
Field Summary | |
(package private) Vector |
FIFOVec
|
Vector |
graphLinkVector
|
Hashtable |
graphNodeHashtable
|
private EventListenerList |
listenerList
|
(package private) int |
numberOfGraphs
|
private static String |
RESOURCE
|
Constructor Summary | |
ExportGraphModel()
|
Method Summary | |
void |
addGraphModelListener(GraphModelListener listener)
|
void |
addLink(GraphLink pLink)
|
void |
addNode(String key,
GraphNode pNode)
|
Enumeration |
allLinks()
|
Vector |
allLinksVector()
|
Enumeration |
allNodes()
|
Vector |
allNodesVector()
|
void |
CollapseLink(ExportGraphLink eLink,
int nowMode,
int nextMode)
Collapse a link, recursively to handel descendants |
void |
CollapseNode(ExportGraphNode eNode,
int nowMode,
int nextMode)
Collapse a node, recursively to handel descendants |
void |
computeExcluded()
recompute the entities which are in effect excluded |
void |
excludeLink(ExportGraphLink eLink)
Exclude a link, and its wholly owned sub components |
void |
excludeNode(ExportGraphNode eNode)
Exclude a node, and its wholly owned sub components |
void |
expandAll()
Expand all the nodes |
void |
expandAllOfNode(ExportGraphNode aNode)
Expand the entire tree under a node |
private void |
expandAllThisNode(ExportGraphNode eNode,
int level,
Vector doneVec)
Exclude a node, and its wholly owned sub components |
Enumeration |
findLinks(GraphNode pNode)
|
Enumeration |
findPredecessorLinks(ExportGraphNode aNode)
|
Enumeration |
findPredecessorLinks(GraphNode pNode)
|
Enumeration |
findSuccessorLinks(ExportGraphNode aNode)
|
Enumeration |
findSuccessorLinks(GraphNode pNode)
|
void |
fireGraphModelChanged(int change,
GraphModel source,
GraphNode pNode,
GraphLink pLink)
|
GraphLink |
getLink(GraphNode pPredecessor,
GraphNode pSuccessor)
|
GraphLink |
getLink(GraphNode pPredecessor,
GraphNode pSuccessor,
String name)
|
GraphLink |
getLink(String pPredecessor,
String pSuccessor,
String name)
|
int |
getMaxLevel()
|
GraphNode |
getNode(String pNodeKey)
|
Vector |
getNodesInSafestImportOrder()
|
Vector |
getNodesOnLevel(int level)
|
int |
getNumberOfGraphs()
determine how many subgraphs exist in the model |
void |
includeLink(ExportGraphLink pLink)
Exclude a link, and its wholly owned sub components |
void |
includeNode(ExportGraphNode pNode)
Include a node, and its wholly owned sub components |
void |
invert()
invert the levels |
boolean |
isLinkInModel(GraphLink pLink)
|
boolean |
isLinkInModel(String name1,
String name2)
determine if a link is in the model |
boolean |
isNodeInModel(GraphNode pNode)
|
int |
maxIncrementForLink(String name1,
String name2)
determine how many links exist between two nodes |
void |
newCeiling(int thisSubGraph,
int newCeiling)
|
private int |
numberOfLinksNotUsed(Enumeration linkList,
Vector doneVec)
|
void |
printalledges()
|
void |
printallnodes()
|
void |
propertyChange(PropertyChangeEvent e)
|
private void |
recursiveCompute(ExportGraphNode node1,
Vector allNodes,
Vector allLinks,
Vector nodeDoneVec,
Vector linkDoneVec)
recursive recompute the entities which are in effect excluded |
private void |
recursiveMaxDistance(ExportGraphNode recNode,
Vector donetable)
recursively traverse graph given node, and do layout based on greatest distance from the root. |
private void |
recursiveMinDistance(ExportGraphNode recNode,
Vector donetable)
recursively traverse graph given node, and do default layout. |
void |
removeall()
remove all nodes and links from the model |
void |
removeGraphModelListener(GraphModelListener listener)
|
void |
removeLink(GraphLink pLink)
|
void |
removeLink(GraphNode pPredecessor,
GraphNode pSuccessor)
|
void |
removeLinks(GraphNode pNode)
|
void |
removeNode(GraphNode pNode)
|
void |
removeNode(String pNodeKey)
|
void |
resizeMaxDistance(int graphNum)
Create a default layout given a new graph/subgraph and a ceiling in case of subgraph |
void |
resizeMinDistance(ExportGraphNode rNode,
boolean DFS)
Create a default layout given a new graph/subgraph and a ceiling in case of subgraph |
void |
setNumberOfGraphs(int aInt)
set the number of subgraphs |
boolean |
shouldExclude(ExportGraphNode sNode,
int level,
Vector doneVec)
determine if a node should be excluded by determinig which are wholly owned or not |
boolean |
shouldInclude(ExportGraphNode sNode,
int level,
Vector doneVec)
determine if a node should be included by determinig which are wholly owned or not |
void |
showNode(ExportGraphNode aNode)
|
void |
startCollapse(ExportGraphNode eNode)
Collapse a node |
private void |
validateLinkExistence(GraphLink pLink)
|
private void |
validateLinkInexistence(GraphLink pLink)
|
private void |
validateNodeExistence(GraphNode pNode)
|
private void |
validateNodeInexistence(GraphNode pNode)
|
void |
Zoom(float zoominc)
set a new zoom value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Hashtable graphNodeHashtable
private EventListenerList listenerList
public Vector graphLinkVector
private static final String RESOURCE
int numberOfGraphs
Vector FIFOVec
Constructor Detail |
public ExportGraphModel()
Method Detail |
public void computeExcluded()
private void recursiveCompute(ExportGraphNode node1, Vector allNodes, Vector allLinks, Vector nodeDoneVec, Vector linkDoneVec)
public void excludeNode(ExportGraphNode eNode) throws NodeDoesNotExistException
eNode
- the Node to exclude
NodeDoesNotExistException
public void excludeLink(ExportGraphLink eLink) throws LinkDoesNotExistException
eLink
- the Link to exclude
LinkDoesNotExistException
public boolean shouldExclude(ExportGraphNode sNode, int level, Vector doneVec)
sNode
- the Node to excludelevel
- level of node to check fordoneVec
- list of already visited nodespublic boolean shouldInclude(ExportGraphNode sNode, int level, Vector doneVec)
sNode
- the Node to excludelevel
- level of node to check fordoneVec
- list of already visited nodespublic void includeNode(ExportGraphNode pNode) throws NodeDoesNotExistException
NodeDoesNotExistException
public void includeLink(ExportGraphLink pLink) throws LinkDoesNotExistException
LinkDoesNotExistException
public void startCollapse(ExportGraphNode eNode)
eNode
- node to collapsepublic void CollapseNode(ExportGraphNode eNode, int nowMode, int nextMode)
eNode
- node to collapsenowMode
- current show mode for this levelnextMode
- mode for next levelpublic void CollapseLink(ExportGraphLink eLink, int nowMode, int nextMode)
nowMode
- current show mode for this levelnextMode
- mode for next levelpublic void Zoom(float zoominc)
zoominc
- factor to zoompublic boolean isLinkInModel(String name1, String name2)
name1
- name of the origin nodename2
- name of the neighbor nodepublic int maxIncrementForLink(String name1, String name2)
name1
- name of the origin nodename2
- name of the neighbor node
public Enumeration findPredecessorLinks(ExportGraphNode aNode)
public Enumeration findSuccessorLinks(ExportGraphNode aNode)
public GraphLink getLink(GraphNode pPredecessor, GraphNode pSuccessor) throws LinkDoesNotExistException
pPredecessor
- pSuccessor
-
LinkDoesNotExistException
public GraphLink getLink(GraphNode pPredecessor, GraphNode pSuccessor, String name) throws LinkDoesNotExistException
pPredecessor
- pSuccessor
-
LinkDoesNotExistException
public GraphLink getLink(String pPredecessor, String pSuccessor, String name) throws LinkDoesNotExistException
pPredecessor
- pSuccessor
-
LinkDoesNotExistException
public void newCeiling(int thisSubGraph, int newCeiling)
public int getNumberOfGraphs()
public void setNumberOfGraphs(int aInt)
public void printalledges()
public void printallnodes()
public void addLink(GraphLink pLink) throws NodeDoesNotExistException, InvalidLinkException
addLink
in interface GraphModel
pLink
-
NodeDoesNotExistException
LinkAlreadyExistException
InvalidLinkException
public void removeall()
private void validateNodeExistence(GraphNode pNode) throws NodeDoesNotExistException
pNode
-
NodeDoesNotExistException
public Vector allNodesVector()
public Vector allLinksVector()
public void addNode(String key, GraphNode pNode) throws NodeAlreadyExistException, InvalidNodeException
addNode
in interface GraphModel
key
- pNode
-
NodeAlreadyExistException
InvalidNodeException
public void removeNode(GraphNode pNode) throws NodeDoesNotExistException
removeNode
in interface GraphModel
pNode
-
NodeDoesNotExistException
public void removeNode(String pNodeKey) throws NodeDoesNotExistException
pNodeKey
-
NodeDoesNotExistException
public void removeLinks(GraphNode pNode) throws NodeDoesNotExistException
pNode
-
NodeDoesNotExistException
public void removeLink(GraphLink pLink) throws LinkDoesNotExistException
removeLink
in interface GraphModel
pLink
-
LinkDoesNotExistException
public void removeLink(GraphNode pPredecessor, GraphNode pSuccessor) throws LinkDoesNotExistException, NodeDoesNotExistException
pPredecessor
- pSuccessor
-
LinkDoesNotExistException
NodeDoesNotExistException
public boolean isNodeInModel(GraphNode pNode)
pNode
-
public boolean isLinkInModel(GraphLink pLink)
pLink
-
private void validateNodeInexistence(GraphNode pNode) throws NodeAlreadyExistException
pNode
-
NodeAlreadyExistException
private void validateLinkExistence(GraphLink pLink) throws LinkDoesNotExistException
pLink
-
LinkDoesNotExistException
private void validateLinkInexistence(GraphLink pLink) throws LinkAlreadyExistException
pLink
-
LinkAlreadyExistException
public void fireGraphModelChanged(int change, GraphModel source, GraphNode pNode, GraphLink pLink)
change
- source
- pNode
- pLink
- public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
e
- public GraphNode getNode(String pNodeKey)
getNode
in interface GraphModel
pNodeKey
-
public Enumeration allNodes()
allNodes
in interface GraphModel
public Enumeration allLinks()
allLinks
in interface GraphModel
public Enumeration findLinks(GraphNode pNode)
findLinks
in interface GraphModel
pNode
-
public Enumeration findPredecessorLinks(GraphNode pNode)
findPredecessorLinks
in interface GraphModel
pNode
-
public Enumeration findSuccessorLinks(GraphNode pNode)
findSuccessorLinks
in interface GraphModel
pNode
-
public void addGraphModelListener(GraphModelListener listener)
addGraphModelListener
in interface GraphModel
listener
- public void removeGraphModelListener(GraphModelListener listener)
removeGraphModelListener
in interface GraphModel
listener
- public void expandAll()
public void expandAllOfNode(ExportGraphNode aNode)
private void expandAllThisNode(ExportGraphNode eNode, int level, Vector doneVec)
eNode
- the Node to excludepublic void showNode(ExportGraphNode aNode)
public void resizeMinDistance(ExportGraphNode rNode, boolean DFS)
rNode
- node to use for originDFS
- boolean to decide whether to use DFS traverse (DFS=true) or BFS traverse (false)private void recursiveMinDistance(ExportGraphNode recNode, Vector donetable)
recNode
- node to use for origindonetable
- the list of already traversed nodespublic void resizeMaxDistance(int graphNum)
private void recursiveMaxDistance(ExportGraphNode recNode, Vector donetable)
recNode
- node to use for origindonetable
- the list of already traversed nodespublic void invert()
public Vector getNodesOnLevel(int level)
public int getMaxLevel()
public Vector getNodesInSafestImportOrder()
private int numberOfLinksNotUsed(Enumeration linkList, Vector doneVec)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |