class Painter implements Tool {

    private ToolEventListener[] listeners;
    private PainterPanel painterPanel;
    //Settings
    private float[] color = {1f, 0f, 0f};
    private float intensity = 0.3f;

    @Override
    public void select() {
    }

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

    @Override
    public ToolEventListener[] getListeners() {
        listeners = new ToolEventListener[1];
        listeners[0] = new NodePressingEventListener() {
            @Override
            public void pressingNodes(Node[] nodes) {<FILL_FUNCTION_BODY>}

            @Override
            public void released() {
            }
        };
        return listeners;
    }

    @Override
    public ToolUI getUI() {
        return new ToolUI() {
            @Override
            public JPanel getPropertiesBar(Tool tool) {
                painterPanel = new PainterPanel();
                painterPanel.setColor(new Color(color[0], color[1], color[2]));
                return painterPanel;
            }

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

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

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

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

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

                color = painterPanel.getColor().getColorComponents(color);
                for (Node node : nodes) {
                    float r = node.r();
                    float g = node.g();
                    float b = node.b();
                    r = intensity * color[0] + (1 - intensity) * r;
                    g = intensity * color[1] + (1 - intensity) * g;
                    b = intensity * color[2] + (1 - intensity) * b;
                    node.setR(r);
                    node.setG(g);
                    node.setB(b);
                }
            
<no_super_class>