Package org.joshy.gfx.node.layout

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


                Core.getShared().reloadSkins();
            }
        };


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


        selectButtonForTool(moveRectTool);

    }

    public void setupSidebar() {
        this.sideBar = new TabPanel();
        this.symbolPanel = new SymbolPanel(getMain().symbolManager, this);
        this.sideBar.add(getString("sidebar.symbols"),this.symbolPanel);
        this.flickrPanel = new FlickrPanel(this);
        this.sideBar.add(getString("sidebar.flickr"), this.flickrPanel);
        this.flickrPanel.setVisible(false);
View Full Code Here

            gfx.translate(-x,-y);
        }
    };

    private TabPanel buildPanel() throws IOException {
        final TabPanel panel = new TabPanel();
        panel.setPrefWidth(300);
        panel.setPrefHeight(250);

        setupColorTab(panel);
        setupSwatchTab(panel);
        setupRGBTab(panel);
        setupGradientTab(panel);
        setupPatternTab(panel);

        //TODO: is this popup event really working?
        EventBus.getSystem().addListener(panel, MouseEvent.MouseAll, new Callback<MouseEvent>() {
            public void call(MouseEvent event) {
                if(event.getType() == MouseEvent.MouseDragged) {
                    if(!popup.isVisible()) return;
                    Control control = panel.getSelected();
                    if(control instanceof ListView) {
                        ListView lv = (ListView) control;
                        Object item = lv.getItemAt(event.getPointInNodeCoords(lv));
                        if(item instanceof Paint) {
                            setSelectedFill((Paint) item);
                        }
                    }
                }
                if(event.getType() == MouseEvent.MouseReleased) {
                    Point2D pt = event.getPointInNodeCoords(panel);
                    pt = new Point2D.Double(pt.getX()+panel.getTranslateX(),pt.getY()+panel.getTranslateY());
                    if(panel.getVisualBounds().contains(pt)) {
                        popup.setVisible(false);
                    }
                }
            }
        });
View Full Code Here

        return getString(key);
    }

    @Override
    public void execute() {
        TabPanel sideBar = context.getSidebar();
        if(sideBar != null) {
            sideBar.setSelected(panel);
        }
    }
View Full Code Here

TOP

Related Classes of org.joshy.gfx.node.layout.TabPanel

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.