Package org.joshy.sketch.controls

Examples of org.joshy.sketch.controls.ToolbarButton


    @Override
    public void setupTools() throws Exception {
        toolbar = new VFlexBox();

        brushTool = new BrushTool(this);
        tools.add(new ToolbarButton(Main.getIcon("cr22-action-14_ellipse.png")), brushTool);

        pencilTool = new PencilTool(this);
        tools.add(new ToolbarButton(Main.getIcon("cr22-action-14_pencil.png")), pencilTool);

        selectionTool = new SelectionTool(this);
        tools.add(new ToolbarButton(Main.getIcon("cr22-action-tool_rect_selection.png")),selectionTool);

        lineTool = new LineTool(this);
        tools.add(new ToolbarButton(Main.getIcon("cr22-action-14_polyline.png")),lineTool);

        group = new ToggleGroup();
        for(Button button : tools.keys()) {
            group.add(button);
            toolbar.add(button);
View Full Code Here


        super(main);
    }

    @Override
    public void setupToolbar(BiList<Button, CanvasTool> tools, Main main, VectorDocContext context) throws Exception {
        tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-14_rectangle.png")),new DrawRectTool(context));
        tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-14_ellipse.png")),new DrawOvalTool(context));
        tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-14_polyline.png")),new DrawPolyTool(context));
        //tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-14_shear.png")),new DrawArrowTool(context));
        //tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-move.png")),new PanCanvasTool(context));
        tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-14_image.png")),new AddImageTool(context));
        //tools.add(new ToolbarButton(main.getClass().getResource("resources/cr22-action-move.png")), new TransformTool(context));
    }
View Full Code Here

TOP

Related Classes of org.joshy.sketch.controls.ToolbarButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.