Package org.joshy.gfx.node.control

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


public class PencilTool extends PixelTool {
    private FlexBox panel;
    public PencilTool(PixelDocContext pixelDocContext) {
        super(pixelDocContext);
        panel = new HFlexBox().setBoxAlign(HFlexBox.Align.Baseline);
        panel.add(new Label("Pencil"));

    }
View Full Code Here


        HFlexBox row  = null;
       
       
        row = new HFlexBox();
        row.add(new Label("font size"));
        final PopupMenuButton<String> fontbutton = new PopupMenuButton<String>();
        fontbutton.setModel(ListView.createModel(new String[]{"mini","small","regular","large","gigante"}));
        fontbutton.setSelectedIndex(2);
        EventBus.getSystem().addListener(fontbutton, SelectionEvent.Changed, new Callback<SelectionEvent>() {
            public void call(SelectionEvent event) {
View Full Code Here

    private Checkbox smooth;

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

        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 {
                stage.hide();
            }
View Full Code Here

        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."+
                        " It contains software from Apache, Twitter4J, Parboiled."+
                        " Fonts from The League Of Movable Type." +
                        " Icon by VisualPharm (Ivan Boyko).").setPrefWidth(370)))
                .add(new HFlexBox().add(new Linkbutton("Click for license info").onClicked(openLink)))
                .add(new HFlexBox()
                        .add(new Label("Version"))
                        .add(new Label(Main.releaseProperties.getProperty("org.joshy.sketch.build.version"))))
                .add(new HFlexBox()
                        .add(new Label("Build number"))
                        .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);
View Full Code Here

        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()
                        .add(new Label("noise"),0)
                        .add(noiseAmount,0)
                        ,0)
                .add(showPatternGrid,0)
        );
View Full Code Here

                    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"));
                u.p("version = " + release.attr("version"));
                u.p("description = " + release.text());
                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))
View Full Code Here

            List<Control> list = new ArrayList<Control>();

            if(propz.containsKey("text")) {
                HFlexBox text_row  = new HFlexBox();
                text_row.setBoxAlign(FlexBox.Align.Stretch);
                text_row.add(new Label("caption"));
                final Textbox tb = new Textbox((String) this.propz.get("text"));
                tb.onAction(new Callback<ActionEvent>() {
                    public void call(ActionEvent actionEvent) throws Exception {
                        propz.put("text",tb.getText());
                        context.redraw();
View Full Code Here

        this.setBoxAlign(Align.Top);
        pixelColorPicker = new SwatchColorPicker();
        this.add(pixelColorPicker);
        histogramColorPicker = new HistogramColorPicker(context);
        this.add(histogramColorPicker);
        this.add(new Label("W:"));
        brushWidthSlider = new Slider(false).setValue(10).setMin(1).setMax(100);
        this.add(brushWidthSlider);
        this.add(new Label("S:"));
        brushHardnessSlider = new Slider(false).setValue(1.0).setMin(0).setMax(1.0);
        this.add(brushHardnessSlider);
        this.add(new Label("O:"));
        brushOpacitySlider = new Slider(false).setValue(1.0).setMin(0).setMax(1.0);
        this.add(brushOpacitySlider);
    }
View Full Code Here

                .nextRow()
                .addControl(greenSelect.addCSSClass("rgbbox")).addControl(greenText.addCSSClass("rgbbox"))
                .nextRow()
                .addControl(blueSelect.addCSSClass("rgbbox")).addControl(blueText.addCSSClass("rgbbox"))
                .nextRow()
                .addControl(new Label("  #: ").addCSSClass("rgbbox")).addControl(hexText.addCSSClass("rgbbox"))
                ;
        selectors.debug(false);
        selectors.setPrefWidth(70);
        selectors.setPrefHeight(140);
        add(selectors);
View Full Code Here

TOP

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

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.