public void loadProperties(Element currentElement, Graph graph, DiagramPanel window) {
        nameText.setEnabled(true);
        widthText.setEnabled(true);
        heightText.setEnabled(true);
        this.element = currentElement;
        heightText.setEnabled(true);
        widthText.setEnabled(true);
        //this.graph = graph;
        this.window = window;
        setElementName(currentElement.getName());
        setElementColor(currentElement.getColor());
        colorLabel.setBackground(currentElement.getColor());
        fontColorLabel.setBackground(currentElement.getColor2());
        setElementFontSize(Integer.toString(currentElement.getFontSize()));
        //notes.setText(currentElement.getNote());
        if (currentElement instanceof AbsPlace) {
            jLabel7.setText("Marking");
            int marking;
            if (currentElement instanceof Place) {
                marking = ((Place) currentElement).getMarkings().getMarkings().size();
            } else {
                marking = ((Resource) currentElement).getMarking();
            }
            AbsPlace current = (AbsPlace) currentElement;
            setElementWidth(Integer.toString(current.getWidth()));
            setElementHeight(Integer.toString(current.getHeight()));
            setElementMarking(marking);
            startCheckBox.setVisible(true);
            endCheckBox.setVisible(true);
            setElementEnd(current.isEnd());
            setElementStart(current.isStart());
            specific.setVisible(true);
            jLabel7.setToolTipText("Marking of place/resource");
        }
        if (currentElement instanceof Node) {
            jLabel7.setText("Marking");
            Node current = (Node) currentElement;
            setElementWidth(Integer.toString(current.getWidth()));
            setElementHeight(Integer.toString(current.getHeight()));
            setElementMarking(current.getCapacity());
            startCheckBox.setVisible(false);
            endCheckBox.setVisible(false);
            specific.setVisible(true);
            jLabel7.setToolTipText("Marking of node");
        }
        if (currentElement instanceof Transition) {
            Transition current = (Transition) currentElement;
            setElementWidth(Integer.toString(current.getWidth()));
            setElementHeight(Integer.toString(current.getHeight()));
            specific.setVisible(false);
        }
        if (currentElement instanceof Arc) {
            Arc current = (Arc) currentElement;
            widthText.setEnabled(false);
            widthText.setText("");
            heightText.setEnabled(false);
            heightText.setText("");
            jLabel7.setText("Capacity");
            capacitySpiner.setValue(new Integer(current.getCapacity()));
            //capacityText.setText(current.getCapacity() + "");                
            capacitySpiner.setSize(nameText.getHeight(), nameText.getWidth());
            startCheckBox.setVisible(false);
            endCheckBox.setVisible(false);
            specific.setVisible(true);
            jLabel7.setToolTipText("Capacity of a arc");
        }
        this.revalidate();
        this.validate();
    }