Search in sources :

Example 1 with EdgePencilPanel

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

the class EdgePencil method getUI.

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

        @Override
        public JPanel getPropertiesBar(Tool tool) {
            edgePencilPanel = new EdgePencilPanel();
            edgePencilPanel.setColor(color);
            edgePencilPanel.setWeight(weight);
            updatePanel();
            return edgePencilPanel;
        }

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

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

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

        @Override
        public int getPosition() {
            return 130;
        }
    };
}
Also used : ImageIcon(javax.swing.ImageIcon) EdgePencilPanel(org.gephi.ui.tools.plugin.EdgePencilPanel) ToolUI(org.gephi.tools.spi.ToolUI) Tool(org.gephi.tools.spi.Tool)

Aggregations

ImageIcon (javax.swing.ImageIcon)1 Tool (org.gephi.tools.spi.Tool)1 ToolUI (org.gephi.tools.spi.ToolUI)1 EdgePencilPanel (org.gephi.ui.tools.plugin.EdgePencilPanel)1