All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fact.hexmap.ui.components.selectors.CameraOverlayKeySelector Maven / Gradle / Ivy

Go to download

The FACT telescope is a Cherenkov telescope on the island of La Palma. This set of tools is dedicated to read, parse and process raw data produced by the FACT telescope.

The newest version!
package fact.hexmap.ui.components.selectors;

import fact.hexmap.ui.Bus;
import fact.hexmap.ui.events.OverlaySelectionChangedEvent;
import fact.hexmap.ui.overlays.CameraMapOverlay;
import stream.Data;

import java.awt.*;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by kaibrugge on 02.06.14.
 */
public class CameraOverlayKeySelector extends KeySelector {
    @Override
    public void selectionUpdate() {
        Bus.eventBus.post(new OverlaySelectionChangedEvent(getSelectedItemPairs()));

    }

    @Override
    public Set filterItems(Data item) {
        Set newItems = new HashSet<>();
        for  (String key: item.keySet()){
            try {
                CameraMapOverlay b = (CameraMapOverlay) item.get(key);
                newItems.add(new SeriesKeySelectorItem(key, new Color(186, 217, 246), this));
            } catch (ClassCastException e){
                continue;
            }
        }
        return newItems;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy