Examples of FloatingTypeDescriptor


Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

//            window.getContentPane().setVisible(false);
            window.setBounds(new Rectangle(originalBounds.x + (originalBounds.width / 2),
                    originalBounds.y + (originalBounds.height / 2),
                    0, 0));

            FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
            window.setModal(typeDescriptor.isModal());
            window.setVisible(true);
        }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

//        assert descriptor.getToolWindow().isVisible();
        assert(descriptor.getToolWindow().getType() == ToolWindowType.FLOATING ||
               descriptor.getToolWindow().getType() == ToolWindowType.FLOATING_FREE);

        if ("active".equals(evt.getPropertyName())) {
            FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
            if (typeDescriptor.isTransparentMode()) {
                if (evt.getNewValue() == Boolean.FALSE) {
                    timer = new Timer(typeDescriptor.getTransparentDelay(), this);
                    timer.start();
                } else {
                    synchronized (transparencyManager) {
                        transparencyAnimation.hide();
                        transparencyManager.setAlphaModeRatio(window, 0.0f);
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

            if (!descriptor.getToolWindow().isVisible()
                || (descriptor.getToolWindow().getType() != ToolWindowType.FLOATING &&
                    descriptor.getToolWindow().getType() != ToolWindowType.FLOATING_FREE))
                return;

            FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
            synchronized (transparencyManager) {
                transparencyAnimation.setAlpha(typeDescriptor.getTransparentRatio());
                transparencyAnimation.show();
//                transparencyManager.setAlphaModeRatio(window, typeDescriptor.getTransparentRatio());
            }
        }
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

            Component content = getContentContainer();
            content.setVisible(true);
            window.getContentPane().add(content, "1,1,FULL,FULL");

            if (lastBounds == null) {
                FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Window windowAnchestor = descriptor.getWindowAnchestor();
                    window.setSize(windowAnchestor.getWidth() / 2, (int) (windowAnchestor.getHeight() / 1.5));
                } else {
                    window.setSize(typeDescriptor.getSize());
                }

                // Set Location
                if (typeDescriptor.getLocation() == null) {
                    if (content.getX() == 0 || content.getY() == 0)
                        SwingUtil.centrePositionOnScreen(window);
                } else
                    window.setLocation(typeDescriptor.getLocation());
            } else {
                window.setBounds(lastBounds);
                lastBounds = null;
            }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

                    window.setModal((Boolean) evt.getNewValue());
                }
            }
        });

        FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
        typeDescriptor.addPropertyChangeListener(this);

        new TransparencyListener(this, descriptor, window);
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

        new TransparencyListener(this, descriptor, window);
    }


    private void configureFloatingIcons() {
        FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);

        if (typeDescriptor.isModal()) {
            setPinVisible(false);
            setFloatingVisible(false);
            setDockedVisible(false);
        } else {
            setPinVisible(true);
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

                this.originalBounds = window.getBounds();
                window.setBounds(new Rectangle(originalBounds.x + (originalBounds.width / 2),
                                               originalBounds.y + (originalBounds.height / 2),
                                               0, 0));

                FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
                window.setModal(typeDescriptor.isModal());
                window.setVisible(true);
                window.getContentPane().setVisible(true);

                startAnimation(INCOMING);
            }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (evt.getNewValue().equals(FloatingTypeDescriptor.class)) {
                ToolWindow toolWindow = viewContext.get(ToolWindow.class);
                FloatingTypeDescriptor descriptor = (FloatingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING);
                viewContext.put(FloatingTypeDescriptor.class, descriptor);

                enabledBox.setSelected(descriptor.isEnabled());
                modal.setSelected(descriptor.isModal());
                animating.setSelected(descriptor.isAnimating());
                idVisibleOnTitleBar.setSelected(descriptor.isIdVisibleOnTitleBar());

                transparentMode.setSelected(descriptor.isTransparentMode());
                transparentDelay.setValue(descriptor.getTransparentDelay());
                transparentRatio.setValue(descriptor.getTransparentRatio());

                viewContext.put(ToolWindowTypeDescriptor.class, this);
            }
        }
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

//        assert manager.getDockableDelegator().isVisible();
        assert (descriptor.getToolWindow().getType() == ToolWindowType.FLOATING ||
                descriptor.getToolWindow().getType() == ToolWindowType.FLOATING_FREE);

        if ("active".equals(evt.getPropertyName())) {
            FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
            if (descriptor.getFloatingContainer().isAnimating()) {
                if (timer != null) {
                    timer.stop();
                    synchronized (transparencyManager) {
                        if (transparencyManager.isAlphaModeEnabled(window)) {
                            transparencyAnimation.stop();
                            transparencyManager.setAlphaModeRatio(window, 0.0f);
                        }
                    }
                }
                return;
            }
           
            if (typeDescriptor.isTransparentMode()) {
//                System.out.println(evt.getNewValue());
//                System.out.println(window.getBounds());
                if (evt.getNewValue() == Boolean.FALSE) {
                    timer = new Timer(typeDescriptor.getTransparentDelay(), this);
                    timer.start();
                } else {
                    if (timer != null)
                        timer.stop();

                    synchronized (transparencyManager) {
                        if (transparencyManager.isAlphaModeEnabled(window)) {
                            transparencyAnimation.stop();
                            transparencyManager.setAlphaModeRatio(window, 0.0f);
                        }
                    }
                }
            }
        } else if (evt.getPropertyName().startsWith("visible.")) {
            synchronized (transparencyManager) {
                if (evt.getNewValue() == Boolean.FALSE && transparencyManager.isAlphaModeEnabled(window)) {
                    if (timer != null)
                        timer.stop();

                    if (transparencyManager.isAlphaModeEnabled(window)) {
                        transparencyAnimation.stop();
                        transparencyManager.setAlphaModeRatio(window, 0.0f);
                    }
                }
            }

            if (evt.getNewValue() == Boolean.TRUE) {
                FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
                if (typeDescriptor.isTransparentMode()) {
                    timer = new Timer(1000 + typeDescriptor.getTransparentDelay(), this);
                    timer.start();
                }
            }
        }
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

            if (!descriptor.getToolWindow().isVisible()
                || (descriptor.getToolWindow().getType() != ToolWindowType.FLOATING &&
                    descriptor.getToolWindow().getType() != ToolWindowType.FLOATING_FREE))
                return;

            FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
            synchronized (transparencyManager) {
                transparencyAnimation.setAlpha(typeDescriptor.getTransparentRatio());
                transparencyAnimation.show();
//                transparencyManager.setAlphaModeRatio(window, typeDescriptor.getTransparentRatio());
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.