Package pivot.wtk

Examples of pivot.wtk.Window


public class PushButtonTest implements Application {
    private Window window = null;

    public void startup(Display display, Dictionary<String, String> properties)
        throws Exception {
        window = new Window();
        FlowPane flowPane = new FlowPane();

        PushButton pushButton = new PushButton("OK");
        pushButton.getStyles().put("preferredAspectRatio", 3.0f);
        flowPane.add(pushButton);
View Full Code Here


    private TextInput textinputDateRegex = null;
    private TextInput textinputCustomBoolean = null;

    public void startup(Display display, Dictionary<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = new Window((Component)wtkxSerializer.readObject(
            getClass().getResource("textInputValidator_test.wtkx")));
        textinputFloatRange = (TextInput)wtkxSerializer.getObjectByID("textinputFloatRange");
        textinputIntRange = (TextInput)wtkxSerializer.getObjectByID("textinputIntRange");
        textinputDateRegex = (TextInput)wtkxSerializer.getObjectByID("textinputDateRegex");
        textinputCustomBoolean = (TextInput)wtkxSerializer.getObjectByID("textinputCustomBoolean");
View Full Code Here

public class LabelTest implements Application {
    private Window window = null;

    public void startup(Display display, Dictionary<String, String> properties) throws Exception {
        window = new Window();
        window.setTitle("Label Test");

        String line1 = "There's a lady who's sure all that glitters is gold, and "
            + "she's buying a stairway to heaven. When she gets there she knows, "
            + "if the stores are closed, with a word she can get what she came "
View Full Code Here

            MenuButton menuButton = (MenuButton)getComponent();
            Component content = menuPopup.getContent();

            // Determine the popup's location and preferred size, relative
            // to the button
            Window window = menuButton.getWindow();

            if (window != null) {
                int width = getWidth();
                int height = getHeight();
View Full Code Here

            Component affiliate = menuPopup.getAffiliate();
            Component focusedComponent = Component.getFocusedComponent();

            if (focusedComponent != null
                && focusedComponent != affiliate) {
                Window window = focusedComponent.getWindow();

                if (window != menuPopup
                    && !menuPopup.isOwner(window)) {
                    menuPopup.close();
                }
View Full Code Here

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

        Window window = (Window)component;

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

        window.add(titleBarFlowPane);

        // Create the frame buttons
        minimizeButton = new FrameButton(minimizeImage);
        maximizeButton = new FrameButton(maximizeImage);
        closeButton = new FrameButton(closeImage);

        frameButtonFlowPane.add(minimizeButton);
        frameButtonFlowPane.add(maximizeButton);
        frameButtonFlowPane.add(closeButton);

        ButtonPressListener buttonPressListener = new ButtonPressListener() {
            public void buttonPressed(Button button) {
                Window window = (Window)getComponent();

                if (button == minimizeButton) {
                    window.setDisplayable(false);
                } else if (button == maximizeButton) {
                    window.setMaximized(!window.isMaximized());
                } else if (button == closeButton) {
                    window.close();
                }
            }
        };

        minimizeButton.getButtonPressListeners().add(buttonPressListener);
        maximizeButton.getButtonPressListeners().add(buttonPressListener);
        closeButton.getButtonPressListeners().add(buttonPressListener);

        window.add(resizeHandle);

        iconChanged(window, null);
        titleChanged(window, null);
        activeChanged(window);
View Full Code Here

        updateMaximizedState();
    }

    @Override
    public void uninstall() {
        Window window = (Window)getComponent();

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

        window.remove(titleBarFlowPane);

        frameButtonFlowPane.remove(minimizeButton);
        frameButtonFlowPane.remove(maximizeButton);
        frameButtonFlowPane.remove(closeButton);
View Full Code Here

    }

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

        Window window = (Window)getComponent();
        Component content = window.getContent();

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

        if (content != null
View Full Code Here

    }

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

        Window window = (Window)getComponent();
        Component content = window.getContent();

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

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

        Window window = (Window)getComponent();
        Component content = window.getContent();

        Dimensions preferredTitleBarSize = titleBarFlowPane.getPreferredSize();

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

TOP

Related Classes of pivot.wtk.Window

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.