Package pivot.wtk

Examples of 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 void uninstall() {
        Window window = (Window)getComponent();
        window.getWindowListeners().remove(this);
        window.getWindowStateListeners().remove(this);

        window.setFocusTraversalPolicy(null);

        super.uninstall();
    }
View Full Code Here

        super.uninstall();
    }

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

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

            && content.isDisplayable()) ?
            content.getPreferredWidth(height) : 0;
    }

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

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

            && content.isDisplayable()) ?
            content.getPreferredHeight(width) : 0;
    }

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

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

            && content.isDisplayable()) ?
            content.getPreferredSize() : new Dimensions(0, 0);
    }

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

        if (content != null) {
            if (content.isDisplayable()) {
                content.setVisible(true);
                content.setSize(window.getSize());
            } else {
                content.setVisible(false);
            }
        }
    }
View Full Code Here

    public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
        boolean consumed = super.keyReleased(component, keyCode, keyLocation);

        // Perform any action defined for this keystroke
        // in the active window's action dictionary
        Window window = (Window)getComponent();
        Keyboard.KeyStroke keyStroke = new Keyboard.KeyStroke(keyCode,
            Keyboard.getModifiers());

        Action action = window.getActions().get(keyStroke);
        if (action != null
            && action.isEnabled()) {
            action.perform();
        }
View Full Code Here

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

            Window window = (Window)container;

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

    @Override
    public void windowOpened(final Window window) {
        super.windowOpened(window);

        Window owner = window.getOwner();
        owner.getComponentMouseButtonListeners().add(ownerMouseButtonListener);

        ApplicationContext.queueCallback(new Runnable() {
            public void run() {
                openTransition = new SlideTransition(window, 0, 0,
                    -window.getHeight(), 0, false, SLIDE_DURATION, SLIDE_RATE);
View Full Code Here

    public Vote previewSheetClose(final Sheet sheet, final boolean result) {
        // Start a close transition, return false, and close the window
        // when the transition is complete
        Vote vote = Vote.APPROVE;

        Window owner = sheet.getOwner();
        if (!owner.isClosing()
            && closeTransition == null) {
            int duration = SLIDE_DURATION;
            int beginX = 0;
            int beginY = 0;
View Full Code Here

TOP

Related Classes of 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.