|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.iastate.metnet.graphmodel.NetworkEditHelper
public class NetworkEditHelper
helper function for NetworkEditForm
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
logger
log4j facility |
| Constructor Summary | |
|---|---|
NetworkEditHelper(org.jgraph.JGraph jGraph)
default constructor |
|
| Method Summary | |
|---|---|
java.lang.Object[] |
captureGraphModel(org.jgraph.JGraph graph)
capture the graph model represented in the current graph, do not consider the bridge interaction right now |
java.util.Map |
createBounds(org.jgraph.graph.CellView view,
java.awt.Color color,
int x,
int y)
create the box for the label |
java.util.Map |
createLines(org.jgraph.graph.CellView view,
java.awt.Color color)
create an line |
MetnetInteraction |
getCurrentInteraction()
|
MetnetLiveEntity |
getCurrentLiveEntity()
|
MetnetPathway |
getCurrentPathway()
|
GraphValidity |
getCurrentValidity()
|
org.jgraph.graph.Edge |
getEdge(org.jgraph.JGraph graph,
org.jgraph.graph.GraphCell sourceCell,
org.jgraph.graph.GraphCell targetCell)
get the JGraph edge based on JGraph node |
org.jgraph.JGraph |
getJGraph()
|
static java.util.Collection |
getMitochondrionFamily()
get the location belongs to mitochondrion. |
static java.util.Collection |
getNucleusFamily()
get the location belongs to nucleus. |
java.util.Collection |
getPathwayList()
|
static java.util.Collection |
getPlastidFamily()
get the location belongs to plastid. |
int |
getPortObject()
|
java.util.List |
getPredEdgeList(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
get the predecessor edges |
java.util.List |
getPredEdgeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
get the predecessor edges |
java.util.List |
getPredNodeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
get the predecessor node list of the current node |
org.jgraph.graph.DefaultGraphCell |
getSourceNode(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
get the source node list of the edge |
org.jgraph.graph.DefaultGraphCell |
getSourceNode(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
get the source node of the edge |
java.util.List |
getSuccEdgeList(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
get the successor edge list |
java.util.List |
getSuccEdgeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
get the successor edges |
org.jgraph.graph.DefaultGraphCell |
getTargetNode(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
get the target node list of the edge |
org.jgraph.graph.DefaultGraphCell |
getTargetNode(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
get the target node of the edge |
boolean |
isEdge(org.jgraph.graph.GraphModel model,
java.lang.Object cell)
detect if it is a vertex |
boolean |
isEdge(org.jgraph.JGraph jGraph,
java.lang.Object cell)
detect if it is a vertex |
boolean |
isVertex(org.jgraph.graph.GraphModel model,
java.lang.Object cell)
detect if it is a vertex |
boolean |
isVertex(org.jgraph.JGraph jGraph,
java.lang.Object cell)
detect if it is a vertex |
java.lang.Integer |
nextPortObject()
create unique port number |
void |
reset()
reset the UI and internal model |
void |
setCurrentInteraction(MetnetInteraction currentInteraction)
|
void |
setCurrentLiveEntity(MetnetLiveEntity currentLiveEntity)
|
void |
setCurrentPathway(MetnetPathway currentPathway)
|
void |
setCurrentValidity(GraphValidity currentValidity)
|
void |
setJGraph(org.jgraph.JGraph graph)
|
void |
setPortObject(int portObject)
|
GraphValidity |
validateGraph(org.jgraph.JGraph jGraph)
we shoudl check the graph at the model level rather than from the user interface level which is hard to infer the graph structure |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public NetworkEditHelper(org.jgraph.JGraph jGraph)
jGraph - the jgraph need to capture| Method Detail |
|---|
public void reset()
public java.lang.Object[] captureGraphModel(org.jgraph.JGraph graph)
public org.jgraph.graph.Edge getEdge(org.jgraph.JGraph graph,
org.jgraph.graph.GraphCell sourceCell,
org.jgraph.graph.GraphCell targetCell)
graph - the jgraphsourceCell - the jgraph nodetargetCell - the jgraph node
public org.jgraph.JGraph getJGraph()
public boolean isVertex(org.jgraph.graph.GraphModel model,
java.lang.Object cell)
cell - the cell
public boolean isVertex(org.jgraph.JGraph jGraph,
java.lang.Object cell)
cell - the cell
public java.lang.Integer nextPortObject()
public java.util.Map createBounds(org.jgraph.graph.CellView view,
java.awt.Color color,
int x,
int y)
view - the box viewcolor - the color
public java.util.Map createLines(org.jgraph.graph.CellView view,
java.awt.Color color)
view - the cell viewcolor - the color
public org.jgraph.graph.DefaultGraphCell getTargetNode(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
model - the graph modelcell - the edge cell
public org.jgraph.graph.DefaultGraphCell getTargetNode(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
jGraph - the jgraphcell - the edge
public java.util.List getSuccEdgeList(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
model - the graph modelcell - the graph element
public java.util.List getSuccEdgeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
jGraph - the jgraphcell - the graph element
public java.util.List getPredEdgeList(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
model - the graph modelcell - the graph element
public java.util.List getPredNodeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
jGraph - the graphcell - the current node
public java.util.List getPredEdgeList(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
jGraph - the jgraphcell - the graph element
public org.jgraph.graph.DefaultGraphCell getSourceNode(org.jgraph.graph.GraphModel model,
org.jgraph.graph.GraphCell cell)
model - the graph modelcell - the edge
public org.jgraph.graph.DefaultGraphCell getSourceNode(org.jgraph.JGraph jGraph,
org.jgraph.graph.GraphCell cell)
jGraph - the jgraphcell - the edge
public boolean isEdge(org.jgraph.graph.GraphModel model,
java.lang.Object cell)
cell - the cell
public boolean isEdge(org.jgraph.JGraph jGraph,
java.lang.Object cell)
cell - the cell
public void setJGraph(org.jgraph.JGraph graph)
graph - the jGraph to setpublic java.util.Collection getPathwayList()
public MetnetInteraction getCurrentInteraction()
public void setCurrentInteraction(MetnetInteraction currentInteraction)
currentInteraction - the currentInteraction to setpublic MetnetLiveEntity getCurrentLiveEntity()
public void setCurrentLiveEntity(MetnetLiveEntity currentLiveEntity)
currentLiveEntity - the currentLiveEntity to setpublic MetnetPathway getCurrentPathway()
public void setCurrentPathway(MetnetPathway currentPathway)
currentPathway - the currentPathway to setpublic int getPortObject()
public void setPortObject(int portObject)
portObject - the portObject to setpublic static java.util.Collection getNucleusFamily()
public static java.util.Collection getMitochondrionFamily()
public static java.util.Collection getPlastidFamily()
public GraphValidity validateGraph(org.jgraph.JGraph jGraph)
jGraph - the user interface level graph
public GraphValidity getCurrentValidity()
public void setCurrentValidity(GraphValidity currentValidity)
currentValidity - the currentValidity to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||