Package org.apache.pivot.wtk

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


    @Override
    public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
        Sheet sheet = (Sheet)container;
        if (!sheet.isTopMost()) {
            Window owner = sheet.getOwner();
            owner.moveToFront();
        }

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

        if (resizable && button == Mouse.Button.LEFT) {
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

    public Vote previewSheetClose(Sheet sheet, boolean result) {
        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()
            || doingFinalClose)) {
            if (openTransition == null) {
                // Setup for the close transition
                // Don't start it until we know that everyone
                // else is okay with it
View Full Code Here

    }

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

        Window owner = sheet.getOwner();
        if (owner != null) {
            Bounds clientArea = owner.getClientArea();

            Point location = owner.mapPointToAncestor(owner.getDisplay(), clientArea.x,
                clientArea.y);
            int x = location.x;
            int y = location.y;

            switch (slideSource) {
View Full Code Here

    @Override
    public void focusedChanged(Component component, Component obverseComponent) {
        super.focusedChanged(component, obverseComponent);

        TextInput textInput = (TextInput)component;
        Window window = textInput.getWindow();

        if (component.isFocused()) {
            // If focus was permanently transferred within this window,
            // select all
            if (obverseComponent == null
View Full Code Here

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.LEFT) {
            // Close the window if this is not a top-level menu
            if (menu.getItem() != null) {
                Window window = menu.getWindow();
                window.close();
                consumed = true;
            }
        } else if (keyCode == Keyboard.KeyCode.RIGHT) {
            Menu.Item activeItem = menu.getActiveItem();
View Full Code Here

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

        Window window = (Window)getComponent();
        boolean maximized = window.isMaximized();

        if (button == Mouse.Button.LEFT
            && !maximized) {
            Bounds titleBarBounds = titleBarTablePane.getBounds();
View Full Code Here

    @Override
    public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
        Dialog dialog = (Dialog)container;
        if (!dialog.isTopMost()) {
            Window rootOwner = dialog.getRootOwner();
            rootOwner.moveToFront();
        }

        return super.mouseDown(container, button, x, y);
    }
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

    @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

TOP

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

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.