Search in sources :

Example 1 with BrushPanel

use of org.gephi.ui.tools.plugin.BrushPanel in project gephi by gephi.

the class Brush method getUI.

@Override
public ToolUI getUI() {
    return new ToolUI() {

        @Override
        public JPanel getPropertiesBar(Tool tool) {
            brushPanel = new BrushPanel();
            brushPanel.setDiffusionMethod(diffusionMethod);
            brushPanel.setColor(new Color(color[0], color[1], color[2]));
            brushPanel.setIntensity(intensity);
            return brushPanel;
        }

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

        @Override
        public Icon getIcon() {
            return new ImageIcon(getClass().getResource("/org/gephi/tools/plugin/resources/brush.png"));
        }

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

        @Override
        public int getPosition() {
            return 110;
        }
    };
}
Also used : BrushPanel(org.gephi.ui.tools.plugin.BrushPanel) ImageIcon(javax.swing.ImageIcon) Color(java.awt.Color) ToolUI(org.gephi.tools.spi.ToolUI) Tool(org.gephi.tools.spi.Tool)

Aggregations

Color (java.awt.Color)1 ImageIcon (javax.swing.ImageIcon)1 Tool (org.gephi.tools.spi.Tool)1 ToolUI (org.gephi.tools.spi.ToolUI)1 BrushPanel (org.gephi.ui.tools.plugin.BrushPanel)1