public GraphPoint[] getSelectedPoints() {
        ArrayList<GraphPoint> buffer = new ArrayList();
        Iterator<Map.Entry<Integer, GraphPoint>> it = points.entrySet().iterator();
        GraphPoint bgp;
        while (it.hasNext()) {
             bgp = it.next().getValue();
            if (bgp.getComponent().getSelect()) {
                buffer.add(bgp);
            }
        }

        GraphPoint[] gps = buffer.toArray(new GraphPoint[0]);

        return gps;
    }