Examples of FlowPane


Examples of org.apache.pivot.wtk.FlowPane

            + padding.top + padding.bottom);
    }

    @Override
    public int getBaseline(int width, int height) {
        FlowPane flowPane = (FlowPane)getComponent();

        int baseline = -1;

        if (alignToBaseline) {
            int contentWidth = Math.max(width - (padding.left + padding.right), 0);

            // Break the components into multiple rows, and calculate the baseline of the
            // first row
            int rowWidth = 0;
            for (int i = 0, n = flowPane.getLength(); i < n; i++) {
                Component component = flowPane.get(i);

                if (component.isVisible()) {
                    Dimensions size = component.getPreferredSize();

                    if (rowWidth + size.width > contentWidth
View Full Code Here

Examples of pivot.wtk.FlowPane

    private Window window = null;
    private PushButton helloButton = null;

    public void startup(Display display, Dictionary<String, String> properties)
        throws Exception {
        FlowPane flowPane = new FlowPane();
        flowPane.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);

        helloButton = new PushButton("Say Hello");
        flowPane.add(helloButton);

        helloButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                BrowserApplicationContext.eval("sayHello(\"Hello from Java!\")", DOMTest.this);
            }
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.