|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.iastate.metnet.graphmodel.AbstractGraphMetaphor
public class AbstractGraphMetaphor
abstract graph metaphor containing common utility functions and default behaviors.
| Field Summary | |
|---|---|
protected static java.awt.Color |
DEFAULT_BACKGROUND
default background color |
protected static java.awt.Color |
DEFAULT_FOREGROUND
default foreground color |
protected static int |
DEFAULT_LINE_WIDTH
default line width for recovery |
(package private) static org.apache.log4j.Logger |
logger
log4j facility |
| Constructor Summary | |
|---|---|
AbstractGraphMetaphor()
defualt constrcutor |
|
| Method Summary | |
|---|---|
protected void |
autoSizeBox(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
change the vertex size according to the content |
protected void |
changeEdgeColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
change the line color |
protected void |
changeEdgeDualColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color leftColor,
java.awt.Color rightColor)
change the line color to two parallel foreground color to indicate the different interaction type |
protected void |
changeEdgePattern(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float[] pattern)
change the edge or border's line pattern |
protected void |
changeEdgeWidth(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float width)
change the edge width |
protected void |
changeVertexBackgroundColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
set the normal background |
protected void |
changeVertexBorderColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
change the vertext border color |
protected void |
changeVertexBorderWidth(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float width)
change the edge width |
protected void |
changeVertexDualColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color leftColor,
java.awt.Color rightColor)
things are complicated if we want two or more background color |
protected void |
changeVertexForegroundColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
change the font color in the vertex |
static MetaphorTypeInformation |
getEdgeType(Blockunit source,
Blockunit target)
searching rule: node A, and node B, edge (A, B) A and B both are entitywithcontext get the intersection of the interactions? require the entity join the interaction A is interaction and B is entitywithcontext type of A A is entitywithcontext and B is interaction see if catalysis A and B both are interaction, never occurred |
protected java.util.List |
getIncomingEdges(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
get the incoming edges use CellView[] views = graph.getGraphLayoutCache().getMapping(cells); to get views |
protected java.util.List |
getIncomingNodes(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
get the predecessor nodes |
protected java.awt.Color |
getInteractionColorForEdge(java.lang.String interactionType)
get the color for interaction type |
protected int |
getInteractionWidthForEdge(java.lang.String interactionType)
get the line width for interaction type |
protected static java.util.Set |
getIntersectionNodes(Blockunit source,
Blockunit target)
if the intermedia dummy node is removed already, guess the interaction from the two enity nodes |
protected java.awt.Color |
getLocationColorForVertex(java.lang.String location)
return the vertext background color |
protected java.util.List |
getOutgoingEdges(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
get outgoing edges from one node |
protected java.util.List |
getOutgoingNodes(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
get the successor nodes |
void |
run(org.jgraph.JGraph graph,
java.lang.Object[] cells)
make the graph black and white |
| 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
protected static final int DEFAULT_LINE_WIDTH
protected static final java.awt.Color DEFAULT_FOREGROUND
protected static final java.awt.Color DEFAULT_BACKGROUND
| Constructor Detail |
|---|
public AbstractGraphMetaphor()
| Method Detail |
|---|
public void run(org.jgraph.JGraph graph,
java.lang.Object[] cells)
run in interface IGraphMetaphorgraph - the jgraph instancecells - the selected cells or all cells
protected void changeVertexForegroundColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
graph - the graphcell - the nodeview - the node viewcolor - the font color
protected void changeVertexDualColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color leftColor,
java.awt.Color rightColor)
graph - the graphcell - the cell, vertex onlyview - the viewleftColor - the left background colorrightColor - the right background color
protected void changeEdgeDualColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color leftColor,
java.awt.Color rightColor)
graph - the graphcell - the edgeview - the edge viewleftColor - the left colorrightColor - the right color
protected void changeVertexBackgroundColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
graph - the graphcell - the normal vertexview - the viewcolor - the background color
protected void autoSizeBox(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
graph - the graphcell - the graph cellview - the cell view
protected void changeVertexBorderColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
graph - the graphcell - the graph cellview - the cell viewcolor - the border color
protected void changeEdgeColor(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
java.awt.Color color)
graph - the graphcell - the edge cellview - the edge viewcolor - the line color
protected void changeEdgeWidth(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float width)
graph - the graphcell - the edgeview - the edge viewwidth - the width of the edge
protected void changeVertexBorderWidth(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float width)
graph - the graphcell - the edgeview - the edge viewwidth - the width of the edge
protected void changeEdgePattern(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view,
float[] pattern)
graph - the graphcell - the node or edgeview - the node or edgepattern - the pattern for node border or edge line
protected java.util.List getIncomingEdges(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
graph - the graphcell - the nodeview - the node
protected java.util.List getIncomingNodes(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
graph - the graphcell - the current nodeview - the node view
protected java.util.List getOutgoingEdges(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
graph - the graphcell - start nodeview - start node
protected java.util.List getOutgoingNodes(org.jgraph.JGraph graph,
java.lang.Object cell,
org.jgraph.graph.CellView view)
graph - the graphcell - the current nodesview - the current node view
protected java.awt.Color getLocationColorForVertex(java.lang.String location)
location -
protected java.awt.Color getInteractionColorForEdge(java.lang.String interactionType)
interactionType - the interaction type
protected int getInteractionWidthForEdge(java.lang.String interactionType)
width - for interaction type
public static MetaphorTypeInformation getEdgeType(Blockunit source,
Blockunit target)
source - the source blockunittarget - the target blockunit
protected static java.util.Set getIntersectionNodes(Blockunit source,
Blockunit target)
source - the source entitywithlocaion nodetarget - the target entitywithlocation nodes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||