Package pivot.wtk

Examples of pivot.wtk.Palette


        buttonFlowPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        buttonFlowPane.add(closeButton);

        closeButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Palette palette = (Palette)getComponent();
                palette.close();
            }
        });
    }
View Full Code Here


    @Override
    public void install(Component component) {
        super.install(component);

        Palette palette = (Palette)component;
        palette.add(titleBarFlowPane);

        // Attach the drop-shadow decorator
        dropShadowDecorator = new DropShadowDecorator(3, 3, 3);
        palette.getDecorators().add(dropShadowDecorator);

        ownerChanged(palette, null);
        titleChanged(palette, null);
    }
View Full Code Here

        titleChanged(palette, null);
    }

    @Override
    public void uninstall() {
        Palette palette = (Palette)getComponent();
        palette.remove(titleBarFlowPane);

        // Detach the drop shadow decorator
        palette.getDecorators().remove(dropShadowDecorator);
        dropShadowDecorator = null;

        super.uninstall();
    }
View Full Code Here

    }

    public int getPreferredWidth(int height) {
        int preferredWidth = 0;

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        Dimensions preferredTitleBarSize = titleBarFlowPane.getPreferredSize();
        preferredWidth = preferredTitleBarSize.width;

        if (content != null
View Full Code Here

    }

    public int getPreferredHeight(int width) {
        int preferredHeight = 0;

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        if (width != -1) {
            width = Math.max(width - 2, 0);
        }
View Full Code Here

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

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        Dimensions preferredTitleBarSize = titleBarFlowPane.getPreferredSize();

        preferredWidth = preferredTitleBarSize.width;
        preferredHeight = preferredTitleBarSize.height;
View Full Code Here

        return new Dimensions(preferredWidth, preferredHeight);
    }

    public void layout() {
        Palette palette = (Palette)getComponent();

        int width = getWidth();
        int height = getHeight();

        // Size/position title bar
        titleBarFlowPane.setLocation(1, 1);
        titleBarFlowPane.setSize(Math.max(width - 2, 0),
            Math.max(titleBarFlowPane.getPreferredHeight(width - 2), 0));

        // Size/position content
        Component content = palette.getContent();

        if (content != null) {
            if (content.isDisplayable()) {
                content.setVisible(true);
View Full Code Here

        Frame window1bii = new Frame();
        window1bii.setTitle("Window 1 B II");
        window1bii.setPreferredSize(160, 60);
        window1bii.open(window1b);

        Palette palette1 = new Palette();
        palette1.setTitle("Palette 1bii 1");
        palette1.setPreferredSize(160, 60);
        palette1.open(window1bii);

        Palette palette2 = new Palette();
        palette2.setTitle("Palette 1bii 2");
        palette2.setPreferredSize(160, 60);
        palette2.open(window1bii);

        Frame dialogOwner = new Frame();
        dialogOwner.setTitle("Dialog Owner");
        dialogOwner.setPreferredSize(160, 60);
        dialogOwner.open(display);
View Full Code Here

        Frame window1bii = new Frame();
        window1bii.setTitle("Window 1 B II");
        window1bii.setPreferredSize(160, 60);
        window1bii.open(window1b);

        Palette palette1 = new Palette();
        palette1.setTitle("Palette 1bii 1");
        palette1.setPreferredSize(160, 60);
        palette1.open(window1bii);

        Palette palette2 = new Palette();
        palette2.setTitle("Palette 1bii 2");
        palette2.setPreferredSize(160, 60);
        palette2.open(window1bii);

        Frame dialogOwner = new Frame();
        dialogOwner.setTitle("Dialog Owner");
        dialogOwner.setPreferredSize(160, 60);
        dialogOwner.open(display);
View Full Code Here

        buttonFlowPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        buttonFlowPane.add(closeButton);

        closeButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Palette palette = (Palette)getComponent();
                palette.close();
            }
        });
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.Palette

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.