Package org.joshy.gfx.node.control

Examples of org.joshy.gfx.node.control.Button


        });
        listview.setOrientation(ListView.Orientation.Horizontal);
        scroll.setContent(listview);

        VFlexBox toolbar = new VFlexBox();
        Button bt = new Button("+");

        final DocumentActions.AddNewPage act = new DocumentActions.AddNewPage(context,context.getMain());
        bt.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                try {
                    act.execute();
                } catch (Exception e) {
                    e.printStackTrace();
View Full Code Here


            toolbar.add(button);
        }
        EventBus.getSystem().addListener(ActionEvent.Action, new Callback<ActionEvent>(){
            public void call(ActionEvent event) {
                if(event.getSource() == group) {
                    Button btn = group.getSelectedButton();
                    PixelTool tool = tools.getValue(btn);
                    setSelectedTool(tool);
                }
            }
        });
View Full Code Here

    public BrushTool(PixelDocContext context) {
        super(context);
        panel = new HFlexBox().setBoxAlign(HFlexBox.Align.Baseline);
        panel.add(new Label("Brush"));
        panel.add(new Button("small").onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                radius = 5;
            }
        }));
        panel.add(new Button("medium").onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                radius = 11;
            }
        }));
        panel.add(new Button("large").onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                radius = 17;
            }
        }));
        smooth = new Checkbox("Smooth");
View Full Code Here

        final Stage stage = Stage.createStage();
        stage.setContent(new VFlexBox()
                .setBoxAlign(VFlexBox.Align.Stretch)
                .add(new Label(s))
                .add(new ScrollPane(log),1)
                .add(new Button("Close").onClicked(new Callback<ActionEvent>(){
            public void call(ActionEvent actionEvent) throws Exception {
                stage.hide();
            }
        }))
        );
View Full Code Here

                defaultTool = Tool.Reshape;
                updateToolButtons();
            }
        });
        panel.add(reshapeButton);
        endButton = new Button("end");
        endButton.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                DrawPathTool.this.context.releaseControl();
            }
        });
View Full Code Here

                        .add(new Label(Main.releaseProperties.getProperty("org.joshy.sketch.build.number"))))
                .add(new HFlexBox()
                        .add(new Label("Build date"))
                        .add(new Label(Main.releaseProperties.getProperty("org.joshy.sketch.build.date"))))
                .add(new Spacer(),1)
                .add(new HFlexBox().add(new Spacer(),1).add(new Button("Close").onClicked(closeStage)))
        );
        stage.setWidth(400);
        stage.setHeight(400);
        stage.centerOnScreen();
    }
View Full Code Here

        final Stage stage = Stage.createStage();
        final Iterable<? extends SNode> items = context.getSelection().items();
        VFlexBox box = new VFlexBox();
        for(Page page : context.getDocument().getPages()) {
            final String id = page.getId();
            Button bt = new Button(" " + page.getName());
            bt.onClicked(new Callback<ActionEvent>() {
                public void call(ActionEvent event) throws Exception {
                    stage.hide();
                    for(SNode node : items) {
                        node.setLinkTarget(id);
                    }
                }
            });
            box.add(bt);
        }
       
        Button cancel = new Button("cancel");
        cancel.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent event) throws Exception {
                stage.hide();
            }
        });
        box.add(cancel);
View Full Code Here

                box.add(new Label("Version: " + release.attr("version")).setPrefWidth(200));
                box.add(new Label(release.text()).setPrefWidth(200));
            }
            box.add(new Spacer(),1);
            box.add(new HFlexBox()
                    .add(new Button("Get the Update").onClicked(getUpdate))
                    .add(new Button("Skip This Version").onClicked(skipVersion))
                    .add(new Button("Remind Me Later").onClicked(dismiss))
            );
            stage.setContent(box);
        }
    }
View Full Code Here

        for(final DocModeHelper mode : main.getModeHelpers()) {
            String name = getString("misc.new").toString() + " " + mode.getModeName();
            if(mode.isAlpha()) {
                name = "[ALPHA] " + name;
            }
            grid.addControl(new Button(name).onClicked(new Callback<ActionEvent>() {
                public void call(ActionEvent event) throws Exception {
                    SAction action = mode.getNewDocAction(main);
                    action.execute();
                    stage.hide();
                }
            }).addCSSClass("newdocbutton"));
            count++;
            if(count%2==0) {
                grid.nextRow();
            }
        }


        this.setBoxAlign(Align.Stretch);
        this.add(grid,1);

        this.add(new Button("Open Existing Document").onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                new OpenAction(main).execute();
                if (!main.getContexts().isEmpty()) {
                    stage.hide();
                }
            }
        }));

        this.add(new Button("Exit").onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                System.exit(0);
            }
        }));
View Full Code Here

        hsv = new HSVColorPicker(this,150,150);
        active = freerange;
        freerange.setVisible(true);
        active = freerange;
        hsv.setVisible(false);
        freeButton = new Button("free");
        hsvButton = new Button("hsv");
        add(freeButton);
        add(hsvButton);
        add(freerange);
        add(hsv);
View Full Code Here

TOP

Related Classes of org.joshy.gfx.node.control.Button

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.