Package pivot.wtk

Examples of pivot.wtk.Window$WindowClassListenerList


        textInput.setText(cellData == null ? "" : cellData.toString());
        textInput.setPreferredWidth(cellBounds.width);
        textInput.getComponentKeyListeners().add(textInputKeyHandler);

        // Create and open the popup
        popup = new Window(textInput, true);
        popup.getWindowStateListeners().add(popupWindowStateHandler);
        popup.setLocation(cellBounds.x, cellBounds.y
            + (cellBounds.height - textInput.getPreferredHeight(-1)) / 2);
        popup.open(tableView.getWindow());
View Full Code Here


    public void layout() {
        Display display = (Display)getComponent();

        // Set all components to their preferred sizes
        for (Component component : display) {
            Window window = (Window)component;

            if (window.isDisplayable()) {
                if (window.isMaximized()) {
                    window.setLocation(0, 0);
                    window.setSize(display.getSize());
                } else {
                    Dimensions preferredSize = window.getPreferredSize();

                    if (window.getWidth() != preferredSize.width
                        || window.getHeight() != preferredSize.height) {
                        window.setSize(preferredSize.width, preferredSize.height);
                    }
                }

                window.setVisible(true);
            } else {
                window.setVisible(false);
            }
        }
    }
View Full Code Here

            textInput.setText(nodeData.getText());
            textInput.setPreferredWidth(editBounds.width);
            textInput.getComponentKeyListeners().add(textInputKeyHandler);

            popup = new Window(textInput, true);
            popup.getWindowStateListeners().add(popupStateHandler);

            popup.setLocation(editBounds.x, editBounds.y
                + (editBounds.height - textInput.getPreferredHeight(-1)) / 2);
            popup.open(treeView.getWindow());
View Full Code Here

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

        if (activeWindowFollowsMouse) {
            Display display = (Display)getComponent();

            Window window = (Window)display.getComponentAt(x, y);
            if (window != null
                && window.isEnabled()
                && !window.isAuxilliary()) {
                Window.setActiveWindow(window);
            }
        }

        return consumed;
View Full Code Here

     * Creates a new <tt>TableViewRowEditor</tt>. This object should only be
     * associated with one table view at a time.
     */
    public TableViewRowEditor() {
        // Create the editor components
        popup = new Window(true);
        editorScrollPane = new ScrollPane(ScrollPane.ScrollBarPolicy.NEVER, ScrollPane.ScrollBarPolicy.FILL);
        editorCardPane = new CardPane();
        editorTablePane = new TablePane();
        editorTablePane.getStyles().put("horizontalSpacing", 1);

View Full Code Here

    @Override
    public boolean mouseMove(Component component, int x, int y) {
        boolean consumed = super.mouseMove(component, x, y);

        if (Mouse.getCapturer() == component) {
            Window window = (Window)getComponent();
            Display display = window.getDisplay();

            Point location = window.mapPointToAncestor(display, x, y);

            // Pretend that the mouse can't move off screen (off the display)
            location = new Point(Math.min(Math.max(location.x, 0), display.getWidth() - 1),
                Math.min(Math.max(location.y, 0), display.getHeight() - 1));

            if (dragOffset != null) {
                // Move the window
                window.setLocation(location.x - dragOffset.x, location.y - dragOffset.y);
            }
        }

        return consumed;
    }
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 = titleBarFlowPane.getBounds();
View Full Code Here

        if (previousOwner != null) {
            previousOwner.getWindowListeners().remove(ownerListener);
        }

        Window owner = window.getOwner();
        if (owner != null) {
            owner.getWindowListeners().add(ownerListener);
        }
    }
View Full Code Here

            textInput.setText(listItem.getText());
            textInput.setPreferredWidth(editBounds.width);
            textInput.getComponentKeyListeners().add(textInputKeyHandler);

            // Create and open the popup
            popup = new Window(textInput, true);
            popup.getWindowStateListeners().add(popupWindowStateHandler);

            popup.setLocation(editBounds.x, editBounds.y
                + (editBounds.height - textInput.getPreferredHeight(-1)) / 2);
            popup.open(listView.getWindow());
View Full Code Here

    };

    public CalendarButtonSkin() {
        calendar = new Calendar();

        calendarPopup = new Window(true);
        calendarPopup.getComponentMouseButtonListeners().add(calendarPopupMouseButtonListener);
        calendarPopup.getComponentKeyListeners().add(calendarPopupKeyListener);
        calendarPopup.getWindowStateListeners().add(calendarPopupWindowStateListener);
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.Window$WindowClassListenerList

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.