Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.StackPane


    private Insets padding = Insets.NONE;

    @Override
    public int getPreferredWidth(int height) {
        int preferredWidth = 0;
        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            preferredWidth = Math.max(preferredWidth,
                component.getPreferredWidth(height));
        }
View Full Code Here


    }

    @Override
    public int getPreferredHeight(int width) {
        int preferredHeight = 0;
        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            preferredHeight = Math.max(preferredHeight,
                component.getPreferredHeight(width));
        }
View Full Code Here

    @Override
    public Dimensions getPreferredSize() {
        int preferredWidth = 0;
        int preferredHeight = 0;

        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            Dimensions preferredCardSize = component.getPreferredSize();

            preferredWidth = Math.max(preferredWidth,
View Full Code Here

    @Override
    public void layout() {
        // Set the size of all components to match the size of the stack pane,
        // minus padding
        StackPane stackPane = (StackPane)getComponent();

        int width = Math.max(getWidth() - (padding.left + padding.right), 0);
        int height = Math.max(getHeight() - (padding.top + padding.bottom), 0);

        for (Component component : stackPane) {
View Full Code Here

        return false;
    }

    private static Component createCell(int index) {
        StackPane stackPane = new StackPane();

        Border border = new Border();
        border.getStyles().put("backgroundColor", index);

        stackPane.add(border);

        Label label = new Label();
        label.setText(Integer.toString(index));
        label.getStyles().put("backgroundColor", Color.WHITE);
        label.getStyles().put("padding", 2);

        BoxPane boxPane = new BoxPane();
        boxPane.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        boxPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);

        boxPane.add(new Border(label));
        stackPane.add(boxPane);

        return stackPane;
    }
View Full Code Here

    @Override
    public void resume() {
    }

    private Component createCell(int index) {
        StackPane stackPane = new StackPane();

        Border border = new Border();
        border.getStyles().put("backgroundColor", index);

        stackPane.add(border);

        Label label = new Label();
        label.setText(Integer.toString(index));
        label.getStyles().put("backgroundColor", Color.WHITE);
        label.getStyles().put("padding", 2);

        BoxPane boxPane = new BoxPane();
        boxPane.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        boxPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);

        boxPane.add(new Border(label));
        stackPane.add(boxPane);

        return stackPane;
    }
View Full Code Here

    private Insets padding = Insets.NONE;

    @Override
    public int getPreferredWidth(int height) {
        int preferredWidth = 0;
        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            preferredWidth = Math.max(preferredWidth,
                component.getPreferredWidth(height));
        }
View Full Code Here

    }

    @Override
    public int getPreferredHeight(int width) {
        int preferredHeight = 0;
        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            preferredHeight = Math.max(preferredHeight,
                component.getPreferredHeight(width));
        }
View Full Code Here

    @Override
    public Dimensions getPreferredSize() {
        int preferredWidth = 0;
        int preferredHeight = 0;

        StackPane stackPane = (StackPane)getComponent();

        for (Component component : stackPane) {
            Dimensions preferredCardSize = component.getPreferredSize();

            preferredWidth = Math.max(preferredWidth,
View Full Code Here

    @Override
    public void layout() {
        // Set the size of all components to match the size of the stack pane,
        // minus padding
        StackPane stackPane = (StackPane)getComponent();

        int width = Math.max(getWidth() - (padding.left + padding.right), 0);
        int height = Math.max(getHeight() - (padding.top + padding.bottom), 0);

        for (Component component : stackPane) {
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.StackPane

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.