Search in sources :

Example 1 with FilteredMarkersUpdatedEvent

use of org.opennms.features.vaadin.nodemaps.internal.gwt.client.event.FilteredMarkersUpdatedEvent in project opennms by OpenNMS.

the class MarkerContainer method refresh.

public void refresh() {
    logger.info("MarkerContainer.refresh()");
    final List<JSNodeMarker> markers = new ArrayList<JSNodeMarker>();
    final List<JSNodeMarker> existingMarkers = getAllMarkers();
    if (existingMarkers != null) {
        for (final JSNodeMarker marker : existingMarkers) {
            if (m_filter.matches(marker)) {
                markers.add(marker);
            }
        }
    }
    m_filteredMarkers = markers;
    logger.info("MarkerContainer.refresh(): out of " + getMarkers().size() + " markers, " + markers.size() + " matched the search filter.");
    m_eventManager.fireEvent(new FilteredMarkersUpdatedEvent());
}
Also used : FilteredMarkersUpdatedEvent(org.opennms.features.vaadin.nodemaps.internal.gwt.client.event.FilteredMarkersUpdatedEvent) ArrayList(java.util.ArrayList) JSNodeMarker(org.opennms.features.vaadin.nodemaps.internal.gwt.client.JSNodeMarker)

Aggregations

ArrayList (java.util.ArrayList)1 JSNodeMarker (org.opennms.features.vaadin.nodemaps.internal.gwt.client.JSNodeMarker)1 FilteredMarkersUpdatedEvent (org.opennms.features.vaadin.nodemaps.internal.gwt.client.event.FilteredMarkersUpdatedEvent)1