Package org.apache.pivot.wtk

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


    }

    @Override
    public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
        Sheet sheet = (Sheet)component;
        Window owner = sheet.getOwner();
        owner.moveToFront();

        boolean consumed = super.mouseDown(component, button, x, y);

        if (resizable && button == Mouse.Button.LEFT) {
            Bounds resizeHandleBounds = resizeHandle.getBounds();
View Full Code Here


        dropShadowDecorator.setShadowOpacity(DropShadowDecorator.DEFAULT_SHADOW_OPACITY);

        alignToOwner();

        Window owner = window.getOwner();
        owner.getComponentListeners().add(ownerListener);

        openTransition = new OpenTransition(false);
        openTransition.start(new TransitionListener() {
            @Override
            public void transitionCompleted(Transition transition) {
View Full Code Here

        // when the transition is complete
        Vote vote = Vote.APPROVE;

        // Don't start the transition if the sheet is being closed as a result
        // of the owner closing
        Window owner = sheet.getOwner();
        if (!(owner.isClosing()
            || owner.isClosed())) {
            TransitionListener transitionListener = new TransitionListener() {
                @Override
                public void transitionCompleted(Transition transition) {
                    sheet.close(result);
                    openTransition = null;
View Full Code Here

    }

    public void alignToOwner() {
        Sheet sheet = (Sheet)getComponent();

        Window owner = sheet.getOwner();
        Bounds clientArea = owner.getClientArea();

        Point location = owner.mapPointToAncestor(owner.getDisplay(), clientArea.x, clientArea.y);
        sheet.setLocation(location.x + (clientArea.width - getWidth()) / 2, location.y);
    }
View Full Code Here

    @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

TOP

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

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.