use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class LingDisplay method pasteSubsession.
public void pasteSubsession(List sessionElements, Point upperLeft) {
getWorkbench().pasteSubgraph(sessionElements, upperLeft);
getWorkbench().deselectAll();
for (int i = 0; i < sessionElements.size(); i++) {
Object o = sessionElements.get(i);
if (o instanceof GraphNode) {
Node modelNode = (Node) o;
getWorkbench().selectNode(modelNode);
}
}
getWorkbench().selectConnectingEdges();
}
use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class PatternDisplay method pasteSubsession.
public void pasteSubsession(List sessionElements, Point upperLeft) {
getWorkbench().pasteSubgraph(sessionElements, upperLeft);
getWorkbench().deselectAll();
for (int i = 0; i < sessionElements.size(); i++) {
Object o = sessionElements.get(i);
if (o instanceof GraphNode) {
Node modelNode = (Node) o;
getWorkbench().selectNode(modelNode);
}
}
getWorkbench().selectConnectingEdges();
}
use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class GraphSelectionEditor method pasteSubsession.
@Override
public void pasteSubsession(List sessionElements, Point upperLeft) {
getWorkbench().pasteSubgraph(sessionElements, upperLeft);
getWorkbench().deselectAll();
for (Object o : sessionElements) {
if (o instanceof GraphNode) {
Node modelNode = (Node) o;
getWorkbench().selectNode(modelNode);
}
}
getWorkbench().selectConnectingEdges();
}
use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class IonDisplay method pasteSubsession.
public void pasteSubsession(List sessionElements, Point upperLeft) {
getWorkbench().pasteSubgraph(sessionElements, upperLeft);
getWorkbench().deselectAll();
for (int i = 0; i < sessionElements.size(); i++) {
Object o = sessionElements.get(i);
if (o instanceof GraphNode) {
Node modelNode = (Node) o;
getWorkbench().selectNode(modelNode);
}
}
getWorkbench().selectConnectingEdges();
}
use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class JsonUtils method parseJSONObjectToTetradNode.
public static Node parseJSONObjectToTetradNode(JSONObject jObj) {
JSONObject nodeType = jObj.getJSONObject("nodeType");
int ordinal = nodeType.getInt("ordinal");
int centerX = jObj.getInt("centerX");
int centerY = jObj.getInt("centerY");
String name = jObj.getString("name");
GraphNode graphNode = new GraphNode(name);
graphNode.setNodeType(NodeType.TYPES[ordinal]);
graphNode.setCenter(centerX, centerY);
return graphNode;
}
Aggregations