class NodePencil implements Tool {

    //Architecture
    private ToolEventListener[] listeners;
    private NodePencilPanel nodePencilPanel;
    //Settings
    private Color color;
    private float size;

    public NodePencil() {
        //Default settings
        color = new Color(153, 153, 153);//Default gray of nodes
        size = 10f;
    }

    @Override
    public void select() {
    }

    @Override
    public void unselect() {
        listeners = null;
        nodePencilPanel = null;
    }

    @Override
    public ToolEventListener[] getListeners() {
        listeners = new ToolEventListener[1];
        listeners[0] = new MouseClickEventListener() {
            @Override
            public void mouseClick(int[] positionViewport, float[] position3d) {<FILL_FUNCTION_BODY>}
        };
        return listeners;
    }

    @Override
    public ToolUI getUI() {
        return new ToolUI() {
            @Override
            public JPanel getPropertiesBar(Tool tool) {
                nodePencilPanel = new NodePencilPanel();
                nodePencilPanel.setColor(color);
                nodePencilPanel.setNodeSize(size);
                return nodePencilPanel;
            }

            @Override
            public String getName() {
                return NbBundle.getMessage(NodePencil.class, "NodePencil.name");
            }

            @Override
            public Icon getIcon() {
                return ImageUtilities.loadImageIcon("ToolsPlugin/nodepencil.png", false);
            }

            @Override
            public String getDescription() {
                return NbBundle.getMessage(NodePencil.class, "NodePencil.description");
            }

            @Override
            public int getPosition() {
                return 120;
            }
        };
    }

    @Override
    public ToolSelectionType getSelectionType() {
        return ToolSelectionType.NONE;
    }
}

                color = nodePencilPanel.getColor();
                size = nodePencilPanel.getNodeSize();
                GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                GraphModel gm = gc.getGraphModel();
                Graph graph = gm.getGraph();
                Node node = gm.factory().newNode();
                node.setX(position3d[0]);
                node.setY(position3d[1]);
                node.setSize(size);
                node.setColor(color);
                graph.addNode(node);
            
<no_super_class>