Search in sources :

Example 1 with GraphNodeMeasured

use of edu.cmu.tetradapp.workbench.GraphNodeMeasured in project tetrad by cmu-phil.

the class SemPmGraphicalEditor method addMouseListenerToGraphNodesMeasured.

private void addMouseListenerToGraphNodesMeasured() {
    List nodes = graph().getNodes();
    for (Object node : nodes) {
        Object displayNode = workbench().getModelNodesToDisplay().get(node);
        if (displayNode instanceof GraphNodeMeasured) {
            DisplayNode _displayNode = (DisplayNode) displayNode;
            _displayNode.setToolTipText(getEquationOfNode(_displayNode.getModelNode()));
        }
    }
}
Also used : DisplayNode(edu.cmu.tetradapp.workbench.DisplayNode) GraphNodeMeasured(edu.cmu.tetradapp.workbench.GraphNodeMeasured) List(java.util.List)

Example 2 with GraphNodeMeasured

use of edu.cmu.tetradapp.workbench.GraphNodeMeasured in project tetrad by cmu-phil.

the class TestDisplayNode method testSetLocation.

@Test
public void testSetLocation() {
    // When constructing a display node without a model node, must check
    // make sure its position can be set. This at one point threw a
    // null pointer exception.
    DisplayNode displayNode = new GraphNodeMeasured("X");
    displayNode.setLocation(10, 10);
}
Also used : DisplayNode(edu.cmu.tetradapp.workbench.DisplayNode) GraphNodeMeasured(edu.cmu.tetradapp.workbench.GraphNodeMeasured) Test(org.junit.Test)

Aggregations

DisplayNode (edu.cmu.tetradapp.workbench.DisplayNode)2 GraphNodeMeasured (edu.cmu.tetradapp.workbench.GraphNodeMeasured)2 List (java.util.List)1 Test (org.junit.Test)1