Examples of FloatingTypeDescriptor


Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

        descriptor = (FloatingTypeDescriptor) toolWindowManager.getTypeDescriptorTemplate(ToolWindowType.FLOATING);
        assertEquals(0.5f, descriptor.getTransparentRatio());
    }

    public void testFloatingTypeDescriptorTransparentRatioUnuseCase() {
        FloatingTypeDescriptor descriptor = (FloatingTypeDescriptor) toolWindowManager.getTypeDescriptorTemplate(ToolWindowType.FLOATING);
        try {
            descriptor.setTransparentRatio(1.5f);
            fail("Must fail with 1.5f");
        } catch (Exception e) {}

        try {
            descriptor.setTransparentRatio(-0.1f);
            fail("Must fail with -0.1f");
        } catch (Exception e) {}
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (FloatingTypeDescriptor.class.equals(evt.getNewValue())) {
                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());
                addToTaskBar.setSelected(descriptor.isAddToTaskBar());
                alwaysOnTop.setSelected(descriptor.isAlwaysOnTop());
                osDecorated.setSelected(descriptor.isOsDecorated());
                resizable.setSelected(descriptor.isResizable());

                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

                    }
                }
            }
        });

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

        new FloatingToolTransparencyListener(this, descriptor, window);
        resizeMouseInputHandler = new FloatingResizeMouseInputHandler(window);
        moveMouseInputHandler = new FloatingMoveMouseInputHandler(window);
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor

    }

    boolean lister = false;

    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

//            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

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

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

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

                // Set Location
                if (typeDescriptor.getLocation() == null) {
                    SwingUtil.centrePositionOnScreen(window.getWindow());
                } else
                    window.setLocation(typeDescriptor.getLocation());

                SwingUtil.validateBounds(window.getWindow());
            } else {
                window.setBounds(lastBounds);
                lastBounds = null;
            }

            // Show the window
            if (descriptor.getTypeDescriptor(ToolWindowType.FLOATING).isAnimating()) {
                floatingAnimation.show();
            } else {
                FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
                window.setModal(typeDescriptor.isModal());
                window.setVisible(true);
                window.getContentPane().setVisible(true);
                SwingUtil.repaint(window.getWindow());
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
View Full Code Here

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

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (FloatingTypeDescriptor.class.equals(evt.getNewValue())) {
                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

            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;
            }

            if (descriptor.getTypeDescriptor(ToolWindowType.FLOATING).isAnimating()) {
                floatingAnimation.show();
            } else {
                FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
                window.setModal(typeDescriptor.isModal());
                window.setVisible(true);
                window.getContentPane().setVisible(true);
                SwingUtil.repaint(window);

                if (!window.isFocused() && toolWindow.isActive())
View Full Code Here

Examples of org.noos.xing.mydoggy.FloatingTypeDescriptor


    public void propertyChange(final PropertyChangeEvent evt) {
        if ("active".equals(evt.getPropertyName())) {
            ToolWindow toolWindow = (ToolWindow) evt.getSource();
            FloatingTypeDescriptor typeDescriptor = toolWindow.getTypeDescriptor(FloatingTypeDescriptor.class);

            if (transparencyTimer != null) {
                transparencyTimer.stop();
                if (transparencyAnimation.isAnimating()) {
                    synchronized (transparencyManager) {
                        if (transparencyManager.isAlphaModeEnabled(FloatingDialog.this)) {
                            transparencyAnimation.stop();
                            transparencyManager.setAlphaModeRatio(FloatingDialog.this, 1.0f);
                        }
                    }
                }
            }

            if (typeDescriptor.isTransparentMode()) {
                if (evt.getNewValue() == Boolean.FALSE) {
                    if (transparencyAnimation != null) {
                        transparencyTimer = new Timer(typeDescriptor.getTransparentDelay() + 100, this) {
                            @Override
                            protected void fireActionPerformed(ActionEvent e) {
                                e = new ActionEvent(evt.getSource(),
                                                    e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers());
                                super.fireActionPerformed(e);
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.