Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Window$WindowStateListenerList


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

        Window window = (Window)component;
        window.getWindowListeners().add(this);
        window.getWindowStateListeners().add(this);

        window.setFocusTraversalPolicy(new WindowFocusTraversalPolicy());
    }
View Full Code Here


        window.setFocusTraversalPolicy(new WindowFocusTraversalPolicy());
    }

    @Override
    public int getPreferredWidth(int height) {
        Window window = (Window)getComponent();
        Component content = window.getContent();

        return (content != null) ? content.getPreferredWidth(height) : 0;
    }
View Full Code Here

        return (content != null) ? content.getPreferredWidth(height) : 0;
    }

    @Override
    public int getPreferredHeight(int width) {
        Window window = (Window)getComponent();
        Component content = window.getContent();

        return (content != null) ? content.getPreferredHeight(width) : 0;
    }
View Full Code Here

        return (content != null) ? content.getPreferredHeight(width) : 0;
    }

    @Override
    public Dimensions getPreferredSize() {
        Window window = (Window)getComponent();
        Component content = window.getContent();

        return (content != null) ? content.getPreferredSize() : new Dimensions(0, 0);
    }
View Full Code Here

        return (content != null) ? content.getPreferredSize() : new Dimensions(0, 0);
    }

    @Override
    public void layout() {
        Window window = (Window)getComponent();
        Component content = window.getContent();

        if (content != null) {
            content.setSize(window.getSize());
        }
    }
View Full Code Here

    @Override
    public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
        boolean consumed = super.mouseDown(container, button, x, y);

        Window window = (Window)container;
        window.moveToFront();

        return consumed;
    }
View Full Code Here

            if (direction == null) {
                throw new IllegalArgumentException("direction is null.");
            }

            Window window = (Window)container;

            return window.getContent();
        }
View Full Code Here

        } else {
            MenuButton menuButton = (MenuButton)getComponent();

            // 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

                textInput = new TextInput();
                textInput.setText(cellData == null ? "" : cellData.toString());
                textInput.getComponentKeyListeners().add(textInputKeyHandler);

                // Create and open the popup
                popup = new Window(textInput);
                popup.getWindowStateListeners().add(popupWindowStateHandler);
                popup.open(tableView.getWindow());
                reposition();

                textInput.selectAll();
View Full Code Here

    protected boolean pressed = false;

    public ListButtonSkin() {
        listView = new ListView();

        listViewPopup = new Window();
        listViewPopup.getComponentMouseButtonListeners().add(listViewPopupMouseButtonListener);
        listViewPopup.getComponentKeyListeners().add(listViewPopupKeyListener);
        listViewPopup.getWindowStateListeners().add(listViewPopupWindowStateListener);
    }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.Window$WindowStateListenerList

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.