Examples of VFlexBox


Examples of org.joshy.gfx.node.layout.VFlexBox

            }
        });
        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();
                }
            }
        });
        toolbar.add(bt);
        this.add(toolbar, 0);
        this.add(scroll,1);

        this.setBoxAlign(Align.Stretch);
        this.clickRecognizer = new DoubleClickRecognizer();
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

        return canvas;
    }

    @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);
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

        vlocked.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent event) {
                shape.setVLocked(vlocked.isSelected());
            }
        });
        panel = new VFlexBox();
        panel.add(hlocked,vlocked);
        panel.setTranslateX(100);
        panel.setTranslateY(20);
        context.getCanvas().getParent().getStage().getPopupLayer().add(panel);
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

        }

        Textarea log = new Textarea();
        log.setText(buf.toString());
        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 {
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

        scroll = new ScrollPane();
        scroll.setContent(tree);
        this.add(scroll,1);

        propsPanel = new VFlexBox();
        //propsPanel.setPrefHeight(200);


        //all nodes
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

                stage.hide();
            }
        };
       
        //leonardo sketch
        stage.setContent(new VFlexBox().setBoxAlign(VFlexBox.Align.Stretch)
                .add(new HFlexBox()
                        .add(new ImageBox().setImage(Main.class.getResource("resources/Turtle.png"))))
                //.add(new HFlexBox().add(new Label("Leonardo")).setId("aboutHeader"))
                //.add(new HFlexBox().add(new Linkbutton("http://leonardosketch.org/").onClicked(openLink)))
                .add(new HFlexBox().add(new Label("Leonardo is open source, BSD licensed."+
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

        color1.setSelectedColor(FlatColor.BLUE);
        color1.setRecenterOnSelect(false);
        useStripe = new Checkbox("Stripe");


        stripes = new VFlexBox();
        stripes.setFill(FlatColor.hsb(0,0,0.8));
        stripes.add(useStripe,0);

        color2 = new FreerangeColorPicker();
        color2.setPrefWidth(30);
        color2.setPrefHeight(30);
        color2.setSelectedColor(FlatColor.WHITE);
        color2.setRecenterOnSelect(false);
        stripes.add(new HFlexBox()
                .add(new Label("stripe color"), 0)
                .add(color2, 0)
                , 0);

        //stripes vs glyph vs plain
        //stripe width vs glyph picker
        width1 = new Slider(false);
        width1.setMin(1).setMax(64).setValue(32);
        stripes.add(new HFlexBox()
                .add(new Label("stripe 1 width"), 0)
                .add(width1, 0)
                ,0);

        width2 = new Slider(false);
        width2.setMin(1).setMax(64).setValue(32);
        stripes.add(new HFlexBox()
                .add(new Label("stripe 2 width"),0)
                .add(width2,0)
                ,0);

        stripeAngle = new Slider(false);
        stripeAngle.setMin(0).setMax(90).setValue(0);
        stripes.add(new HFlexBox()
                .add(new Label("stripe angle"), 0)
                .add(stripeAngle, 0)
                , 0);

        noiseAmount = new Slider(false);
        noiseAmount.setMin(0).setMax(100).setValue(0);

        showPatternGrid = new org.joshy.gfx.node.control.Checkbox("Show pattern grid");

        add(new VFlexBox()
                .add(new HFlexBox()
                        .add(new Label("Base color"),0)
                        .add(color1,0)
                        ,0)
                .add(new HFlexBox()
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

    @Override
    public void execute() throws Exception {
        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);
        stage.setContent(box);
    }
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

                public void call(ActionEvent actionEvent) throws Exception {
                    stage.hide();
                    OSUtil.openBrowser(Settings.DOWNLOAD_URL);
                }
            };
            FlexBox box = new VFlexBox().setBoxAlign(VFlexBox.Align.Stretch);
            box.add(new Label("New Version Available!").setId("updates-header"));

            for(Elem release : newReleases) {
                u.p("build = " + release.attr("buildNumber"));
                u.p("date = " + release.attr("buildDate"));
View Full Code Here

Examples of org.joshy.gfx.node.layout.VFlexBox

            }
        };


        TabPanel tab = new TabPanel();
        tab.add(getString("preferences.generalTab"),new VFlexBox().setBoxAlign(VFlexBox.Align.Left)
            .add(new HFlexBox()
                    .setBoxAlign(HFlexBox.Align.Baseline)
                    .add(trackingCheckbox)
                    .add(new Linkbutton(getString("misc.whatsthis")).onClicked(new Callback<ActionEvent>() {
                public void call(ActionEvent actionEvent) throws Exception {
                    OSUtil.openBrowser("http://code.google.com/p/leonardosketch/wiki/Tracking");
                }
            })))
            .add(new Label(getString("preferences.flickrCache")))
            .add(new Label(Main.FlickrSearchCache.getCacheDir().getAbsolutePath()).setColor(new FlatColor(0x606060)))
            .add(new Button(getString("preferences.deleteFlickrCache")).onClicked(clearFlickrCache))
        );
        tab.add(getString("preferences.advancedTab"), new VFlexBox().setBoxAlign(VFlexBox.Align.Stretch)
                .add(debugMenuCheckbox)
                .add(new Label(getString("preferences.preferredLocale")))
                .add(localeChoice)
                .add(new Label(getString("misc.changesAppliedLater").toString()))
        );

        stage.setContent(new VFlexBox().setBoxAlign(VFlexBox.Align.Stretch)
                .add(tab,1)
                .add(new HFlexBox().add(new Spacer(),1).add(new Button(getString("misc.close")).onClicked(closeAction)))
        );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.