Search in sources :

Example 11 with CollapsibleCriteria

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

the class IpLikeSearchProvider method onToggleCollapse.

@Override
public void onToggleCollapse(SearchResult searchResult, GraphContainer graphContainer) {
    LOG.debug("SearchProvider->onToggleCollapse: called with search result: '{}'", searchResult);
    CollapsibleCriteria criteria = getMatchingCriteriaById(graphContainer, searchResult.getId());
    if (criteria != null) {
        criteria.setCollapsed(!criteria.isCollapsed());
        graphContainer.redoLayout();
    }
}
Also used : CollapsibleCriteria(org.opennms.features.topology.api.topo.CollapsibleCriteria)

Aggregations

CollapsibleCriteria (org.opennms.features.topology.api.topo.CollapsibleCriteria)11 HashSet (java.util.HashSet)5 VertexRef (org.opennms.features.topology.api.topo.VertexRef)5 Criteria (org.opennms.features.topology.api.topo.Criteria)4 DefaultVertexRef (org.opennms.features.topology.api.topo.DefaultVertexRef)4 Set (java.util.Set)2 Test (org.junit.Test)2 DefaultVertexHopCriteria (org.opennms.features.topology.api.support.VertexHopGraphProvider.DefaultVertexHopCriteria)2 VertexHopCriteria (org.opennms.features.topology.api.support.VertexHopGraphProvider.VertexHopCriteria)2 Edge (org.opennms.features.topology.api.topo.Edge)2 Vertex (org.opennms.features.topology.api.topo.Vertex)2 ArrayList (java.util.ArrayList)1 TreeMap (java.util.TreeMap)1 Graph (org.opennms.features.topology.api.Graph)1 SemanticZoomLevelCriteria (org.opennms.features.topology.api.support.SemanticZoomLevelCriteria)1 VertexHopGraphProvider (org.opennms.features.topology.api.support.VertexHopGraphProvider)1 AbstractVertex (org.opennms.features.topology.api.topo.AbstractVertex)1 RefComparator (org.opennms.features.topology.api.topo.RefComparator)1 SearchCriteria (org.opennms.features.topology.api.topo.SearchCriteria)1 SearchResult (org.opennms.features.topology.api.topo.SearchResult)1