Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.FloatingLiveTypeDescriptor


            // Prepare sheet
            sheet.setBorder(BorderFactory.createEtchedBorder());

            if (lastBounds == null) {
                FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                        case RIGHT:
                            sheet.setSize(descriptor.getDockedTypeDescriptor().getDockLength(),
                                    (int) (managerCmp.getHeight() / 1.5));
                            break;
                        case TOP:
                        case BOTTOM:
                            sheet.setSize((int) (managerCmp.getWidth() / 1.5),
                                    descriptor.getDockedTypeDescriptor().getDockLength());
                            break;
                    }
                } else
                    sheet.setSize(typeDescriptor.getSize());

                SwingUtil.validateBounds(sheet, descriptor.getManager().getMainContainer().getBounds());

                // Set Location
                if (typeDescriptor.getLocation() == null ||
                        typeDescriptor.getLocation().x > descriptor.getManager().getWidth() ||
                        typeDescriptor.getLocation().y > descriptor.getManager().getHeight() ||
                        typeDescriptor.getLocation().x < 0 ||
                        typeDescriptor.getLocation().y < 0) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                            sheet.setLocation(50, 50);
                            break;
                        case RIGHT:
                            sheet.setLocation(managerCmp.getWidth() - 50 - sheet.getWidth(),
                                    50);
                            break;
                        case TOP:
                            sheet.setLocation(50, 50);
                            break;
                        case BOTTOM:
                            sheet.setLocation(50,
                                    managerCmp.getHeight() - 50 - sheet.getHeight());
                            break;
                    }
                } else
                    sheet.setLocation(typeDescriptor.getLocation());
            } else {
                sheet.setBounds(lastBounds);
                lastBounds = null;
            }
View Full Code Here


                    }

                    layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 4);
                    sheet.setAlphaModeRatio(1.0f);
                } else {
                    FloatingLiveTypeDescriptor floatingLiveTypeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);
                    if (floatingLiveTypeDescriptor.isTransparentMode()) {
                        timer = new Timer(floatingLiveTypeDescriptor.getTransparentDelay(), this);
                        timer.start();
                    }
                    layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 3);
                }
                SwingUtil.repaint(layeredPane);
View Full Code Here

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

                enabledBox.setSelected(descriptor.isEnabled());
                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

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

                enabledBox.setSelected(descriptor.isEnabled());
                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

            // Prepare common panel
            floatingLiveComponent.setBorder(BorderFactory.createEtchedBorder());

            if (lastBounds == null) {
                FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                        case RIGHT:
                            floatingLiveWindow.setSize(descriptor.getDockedTypeDescriptor().getDockLength(),
                                                      (int) (managerCmp.getHeight() / 1.5));
                            break;
                        case TOP:
                        case BOTTOM:
                            floatingLiveWindow.setSize((int) (managerCmp.getWidth() / 1.5),
                                                      descriptor.getDockedTypeDescriptor().getDockLength());
                            break;
                    }
                } else
                    floatingLiveWindow.setSize(typeDescriptor.getSize());

                SwingUtil.validateBounds(floatingLiveComponent, descriptor.getManager().getMainContainer().getBounds());

                // Set Location
                if (typeDescriptor.getLocation() == null ||
                    typeDescriptor.getLocation().x > descriptor.getManager().getWidth() ||
                    typeDescriptor.getLocation().y > descriptor.getManager().getHeight() ||
                    typeDescriptor.getLocation().x < 0 ||
                    typeDescriptor.getLocation().y < 0) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                            floatingLiveWindow.setLocation(50, 50);
                            break;
                        case RIGHT:
                            floatingLiveWindow.setLocation(managerCmp.getWidth() - 50 - floatingLiveWindow.getWidth(),
                                                          50);
                            break;
                        case TOP:
                            floatingLiveWindow.setLocation(50, 50);
                            break;
                        case BOTTOM:
                            floatingLiveWindow.setLocation(50,
                                                          managerCmp.getHeight() - 50 - floatingLiveWindow.getHeight());
                            break;
                    }
                } else
                    floatingLiveWindow.setLocation(typeDescriptor.getLocation());
            } else {
                floatingLiveWindow.setBounds(lastBounds);
                lastBounds = null;
            }
View Full Code Here

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

                enabledBox.setSelected(descriptor.isEnabled());
                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

            // Prepare sheet
            sheet.setBorder(BorderFactory.createEtchedBorder());

            if (lastBounds == null) {
                FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                        case RIGHT:
                            sheet.setSize(descriptor.getDockedTypeDescriptor().getDockLength(),
                                    (int) (managerCmp.getHeight() / 1.5));
                            break;
                        case TOP:
                        case BOTTOM:
                            sheet.setSize((int) (managerCmp.getWidth() / 1.5),
                                    descriptor.getDockedTypeDescriptor().getDockLength());
                            break;
                    }
                } else
                    sheet.setSize(typeDescriptor.getSize());

                // Set Location
                if (typeDescriptor.getLocation() == null ||
                        typeDescriptor.getLocation().x > descriptor.getManager().getWidth() ||
                        typeDescriptor.getLocation().y > descriptor.getManager().getHeight() ||
                        typeDescriptor.getLocation().x < 0 ||
                        typeDescriptor.getLocation().y < 0) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                            sheet.setLocation(50, 50);
                            break;
                        case RIGHT:
                            sheet.setLocation(managerCmp.getWidth() - 50 - sheet.getWidth(),
                                    50);
                            break;
                        case TOP:
                            sheet.setLocation(50, 50);
                            break;
                        case BOTTOM:
                            sheet.setLocation(50,
                                    managerCmp.getHeight() - 50 - sheet.getHeight());
                            break;
                    }
                } else
                    sheet.setLocation(typeDescriptor.getLocation());
            } else {
                sheet.setBounds(lastBounds);
                lastBounds = null;
            }
View Full Code Here

                    valueAdjusting = false;
                }
            }
        });

        FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);
        typeDescriptor.addPropertyChangeListener(this);

        resizeMouseInputHandler = new FloatingResizeMouseInputHandler(sheet);
        moveMouseInputHandler = new FloatingMoveMouseInputHandler(sheet);
    }
View Full Code Here

                    }

                    layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 4);
                    sheet.setAlphaModeRatio(1.0f);
                } else {
                    FloatingLiveTypeDescriptor floatingLiveTypeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);
                    if (floatingLiveTypeDescriptor.isTransparentMode()) {
                        timer = new Timer(floatingLiveTypeDescriptor.getTransparentDelay(), this);
                        timer.start();
                    }
                    layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 3);
                }
                SwingUtil.repaint(layeredPane);
View Full Code Here

            // Prepare sheet
            sheet.setBorder(BorderFactory.createEtchedBorder());

            if (lastBounds == null) {
                FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                        case RIGHT:
                            sheet.setSize(descriptor.getDockedTypeDescriptor().getDockLength(),
                                    (int) (managerCmp.getHeight() / 1.5));
                            break;
                        case TOP:
                        case BOTTOM:
                            sheet.setSize((int) (managerCmp.getWidth() / 1.5),
                                    descriptor.getDockedTypeDescriptor().getDockLength());
                            break;
                    }
                } else
                    sheet.setSize(typeDescriptor.getSize());

                // Set Location
                if (typeDescriptor.getLocation() == null ||
                        typeDescriptor.getLocation().x > descriptor.getManager().getWidth() ||
                        typeDescriptor.getLocation().y > descriptor.getManager().getHeight() ||
                        typeDescriptor.getLocation().x < 0 ||
                        typeDescriptor.getLocation().y < 0) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                            sheet.setLocation(50, 50);
                            break;
                        case RIGHT:
                            sheet.setLocation(managerCmp.getWidth() - 50 - sheet.getWidth(),
                                    50);
                            break;
                        case TOP:
                            sheet.setLocation(50, 50);
                            break;
                        case BOTTOM:
                            sheet.setLocation(50,
                                    managerCmp.getHeight() - 50 - sheet.getHeight());
                            break;
                    }
                } else
                    sheet.setLocation(typeDescriptor.getLocation());
            } else {
                sheet.setBounds(lastBounds);
                lastBounds = null;
            }
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.FloatingLiveTypeDescriptor

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.