private void updatePropertyEditor_selected() {
        HashSet<Vertex> selectedVertices = spm.getSelectedVertices();
        HashSet<Edge> selectedEdges = spm.getSelectedEdges();

        int numOfSelectedVertices = selectedVertices.size();
        int numOfSelectedEdges = selectedEdges.size();

        //if there was only 1 selected vertex(edge) show the classic editor for it
        if (numOfSelectedVertices + numOfSelectedEdges == 1) {
            if (numOfSelectedVertices == 1) {
                setTarget(new VertexNotifiableAttrSet(selectedVertices.iterator().next()));
                viewer = vertexView;
            } else {
                setTarget(new EdgeNotifiableAttrSet(selectedEdges.iterator().next()));
                viewer = edgeView;
            }
        } else {
            viewer = selectView;

            iChangedTheAttribute = true;
            TimeLimitedNotifiableAttrSet retAtrs = new TimeLimitedNotifiableAttrSet(new AttributeSetImpl());
            retAtrs.removeAttributeListener(this);

            //adding each Vertex/Edge attribute to selectionAttributes
            int i = 0;
            retAtrs.put("Vertices", numOfSelectedVertices);
            selectView.setEditable("Vertices", false);
            selectView.setIndex("Vertices", i++);
            for (Vertex v : selectedVertices) {
                if (i < 500) {
                    AttributeSet vAtrs = new VertexAttrSet(v);
                    vertexView.setAttribute(vAtrs);
                    for (String atrName : vertexView.getNames()) {
                        String key = vertexAtrName(atrName);
                        insertAttributeToSelectionAtrs(retAtrs, key, vAtrs, atrName);
                        selectView.setDisplayName(key, atrName);
                        selectView.setIndex(key, i++);
                    }
                }
            }

            retAtrs.put("   ", "");
            selectView.setEditable("   ", false);
            retAtrs.put("Edges", numOfSelectedEdges);
            selectView.setIndex("   ", i++);
            selectView.setIndex("Edges", i++);
            selectView.setEditable("Edges", false);
            for (Edge e : selectedEdges) {
                if (i < 1000) {
                    AttributeSet eAtrs = new EdgeAttrSet(e);
                    for (String atrName : ((Set<String>)eAtrs.getAttrs().keySet())) {
                        String key = edgeAtrName(atrName);
                        insertAttributeToSelectionAtrs(retAtrs, key, eAtrs, atrName);
                        selectView.setDisplayName(key, atrName);
                        selectView.setIndex(key, i++);
                    }
                }
            }
            selectView.setVisible("v" + VertexAttrSet.LOCATION, false);
            selectView.setVisible("v" + VertexAttrSet.SELECTED, false);
            selectView.setEditor("v" + VertexAttrSet.BORDER, new GStrokeEditor() {
                public Object[] getValues() {
                    return new GStroke[]{
                            GStroke.empty,
                            simple,
                            solid,
                            strong,
                            dashed,
                            dotted,
                            dashed_dotted,
                            dashed_dotted_dotted,
                            dashed_dashed_dotted
                    };
                }
            });
            selectView.setEditor("v" + VertexAttrSet.COLOR, new GMergedColorEditor());
            selectView.setrenderer("v" + VertexAttrSet.COLOR, new GMergedColorRenderer());

            selectView.setEditor("e" + VertexAttrSet.COLOR, new GMergedColorEditor());
            selectView.setrenderer("e" + VertexAttrSet.COLOR, new GMergedColorRenderer());

            viewer = selectView;
            retAtrs.addAttributeListener(this);
//            updateSelectView();
            iChangedTheAttribute = false;

            setTarget(retAtrs);
        }

    }