Search in sources :

Example 1 with GraphVisitor

use of org.opennms.features.topology.api.GraphVisitor in project opennms by OpenNMS.

the class TopologyComponent method updateGraph.

public void updateGraph() {
    BoundingBox boundingBox = getBoundingBox();
    getState().setBoundX(boundingBox.getX());
    getState().setBoundY(boundingBox.getY());
    getState().setBoundWidth(boundingBox.getWidth());
    getState().setBoundHeight(boundingBox.getHeight());
    getState().setActiveTool(m_activeTool);
    Graph graph = getGraph();
    GraphVisitor painter = new GraphPainter(m_graphContainer, graph.getLayout(), m_iconRepoManager, getState());
    try {
        graph.visit(painter);
    } catch (Exception e) {
        LoggerFactory.getLogger(getClass()).error(e.getMessage(), e);
    }
}
Also used : Graph(org.opennms.features.topology.api.Graph) GraphVisitor(org.opennms.features.topology.api.GraphVisitor) BoundingBox(org.opennms.features.topology.api.BoundingBox)

Aggregations

BoundingBox (org.opennms.features.topology.api.BoundingBox)1 Graph (org.opennms.features.topology.api.Graph)1 GraphVisitor (org.opennms.features.topology.api.GraphVisitor)1