Search in sources :

Example 1 with ManualLayoutAlgorithm

use of org.opennms.features.topology.app.internal.ManualLayoutAlgorithm in project opennms by OpenNMS.

the class LayoutHintComponent method graphChanged.

@Override
public void graphChanged(GraphContainer graphContainer) {
    if (!(graphContainer.getLayoutAlgorithm() instanceof ManualLayoutAlgorithm)) {
        LayoutEntity layoutEntity = layoutManager.loadLayout(graphContainer.getGraph());
        if (layoutEntity != null) {
            boolean isEqualLayout = layoutManager.isPersistedLayoutEqualToCurrentLayout(graphContainer.getGraph());
            getCompositionRoot().setVisible(!isEqualLayout);
        } else {
            getCompositionRoot().setVisible(false);
        }
    } else {
        getCompositionRoot().setVisible(false);
    }
}
Also used : ManualLayoutAlgorithm(org.opennms.features.topology.app.internal.ManualLayoutAlgorithm) LayoutEntity(org.opennms.netmgt.topology.persistence.api.LayoutEntity)

Aggregations

ManualLayoutAlgorithm (org.opennms.features.topology.app.internal.ManualLayoutAlgorithm)1 LayoutEntity (org.opennms.netmgt.topology.persistence.api.LayoutEntity)1