Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.ContentUI


        if (getSelectedIndex() == index) {
            Content content = contentMap.get(index);
            if (content == null)
                return super.getIconAt(index);

            ContentUI contentUI = content.getContentUI();
            if (contentUI == null)
                return super.getIconAt(index);

            titleIcon.setText(super.getTitleAt(index));
            titleIcon.setUnderlinedIndex(
                    SwingUtil.findDisplayedMnemonicIndex(super.getTitleAt(index),
                                                         getContentAt(index).getMnemonic())
            );

            tabIconTitle.setLeftIcon(super.getIconAt(index));

            minCloseDetachIcon.setLeftVisible(contentUI.isMinimizable());
            closeDetachIcon.setLeftVisible(contentUI.isDetachable());
            closeDetachIcon.setRightVisible(contentUI.isCloseable());

            ((ExAggregateIcon) selectedTabIcon).setIndex(index);

            return selectedTabIcon;
        } else if (flashingContents.containsKey(getContentAt(index))) {
View Full Code Here


        });

        internalFrame.addPropertyChangeListener(JInternalFrame.IS_SELECTED_PROPERTY, new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
                if (!contentManagerUI.valueAdjusting && !contentManagerUI.contentValueAdjusting) {
                    ContentUI contentUI = content.getContentUI();
                    if (contentUI != null) {
                        Content content = contentUI.getContent();
                        if (content == null)
                            return;

                        boolean value = (Boolean) evt.getNewValue();
                        if (value) {
View Full Code Here

        return super.getTitleAt(index);
    }

    public Icon getIconAt(int index) {
        if (getSelectedIndex() == index) {
            ContentUI contentUI = contentMap.get(index).getContentUI();
            if (contentUI == null)
                return super.getIconAt(index);

            titleIcon.setText(super.getTitleAt(index));
            titleIcon.setUnderlinedIndex(
                    SwingUtil.findDisplayedMnemonicIndex(super.getTitleAt(index),
                                                         getContentAt(index).getMnemonic())
            );

            tabIconTitle.setLeftIcon(super.getIconAt(index));

            closeDetachIcon.setLeftVisible(contentUI.isDetachable());
            closeDetachIcon.setRightVisible(contentUI.isCloseable());

            return selectedTabIcon;
        }
        return super.getIconAt(index);
    }
View Full Code Here

                Content content = getContentAt(mouseOverTab);
                if (content == null)
                    return;

                if (SwingUtilities.isLeftMouseButton(e)) {
                    ContentUI contentUI = content.getContentUI();

                    if (isDetachFired(contentUI, e.getPoint())) {
                        fireDetachTabEvent(content);
                        return;
                    }

                    if (isCloseFired(contentUI, e.getPoint())) {
                        fireCloseTabEvent(content);
                        return;
                    }

                    if (isMinimizedFired(contentUI, e.getPoint())) {
                        content.setMinimized(!content.isMinimized());
                        return;
                    }

                    if ((e.getClickCount() == 2 && contentUI.isMaximizable()) || isMaximizeFired(contentUI, e.getPoint())) {
                        Content maximized = getContentMaximized(content);
                        if (maximized != null)
                            maximized.setMaximized(false);
                        else
                            content.setMaximized(!content.isMaximized());
View Full Code Here

            } else {
                Content content = getContentAt(mouseOverTab);
                if (content == null)
                    return;

                ContentUI contentUI = content.getContentUI();

                Point point = e.getPoint();
                if (isMinimizedFired(contentUI, point))
                    currentToolTip = SwingUtil.getString("@@tabbed.page.minimize");
                else if (isMaximizeFired(contentUI, point))
View Full Code Here

                    } else if (lastBarAnchor == null) {
                        if (SwingUtil.getBoolean(MyDoggyKeySpace.DND_CONTENT_OUTSIDE_FRAME, true)) {
                            // Detach content

                            Content content = getContentAt(dragTabIndex);
                            ContentUI contentUI = content.getContentUI();

                            Rectangle bounds = contentUI.getDetachedBounds();
                            if (bounds != null) {
                                bounds.setLocation(e.getLocation());
                            } else {
                                bounds = new Rectangle();
                                bounds.setLocation(e.getLocation());
                                bounds.setSize(toolWindowManager.getBoundsToScreen(content.getComponent().getBounds(),
                                        content.getComponent().getParent()).getSize());
                            }

                            contentUI.setDetachedBounds(bounds);
                            content.setDetached(true);
                        }
                    } else {
                        // restore content at the same position
//                        addTab(draggingContent, draggingContent.getComponent(), dragTabIndex);
View Full Code Here

        if (getSelectedIndex() == index) {
            Content content = contentMap.get(index);
            if (content == null)
                return super.getIconAt(index);

            ContentUI contentUI = content.getContentUI();
            if (contentUI == null)
                return super.getIconAt(index);

            // Setup aggregate icon
            aggregateIcon.setIconAt(0, super.getIconAt(index));

            titleIcon.setText(super.getTitleAt(index));
            titleIcon.setUnderlinedIndex(SwingUtil.findDisplayedMnemonicIndex(super.getTitleAt(index),
                    getContentAt(index).getMnemonic()));


            aggregateIcon.setVisibleAt(2, contentUI.isMinimizable() && showMinimize);
            if (content.isMaximized() || getContentMaximized(content) != null)
                aggregateIcon.setIconAt(3, UIManager.getIcon(MyDoggyKeySpace.CONTENT_PAGE_RESTORE));
            else
                aggregateIcon.setIconAt(3, UIManager.getIcon(MyDoggyKeySpace.CONTENT_PAGE_MAXIMIZE));

            aggregateIcon.setVisibleAt(3, contentUI.isMaximizable() && showMaximize);
            aggregateIcon.setVisibleAt(4, contentUI.isDetachable() && showDetach);
            aggregateIcon.setVisibleAt(5, contentUI.isCloseable() && showClose);

            aggregateIcon.setIndex(index);

            return aggregateIcon;
        } else if (flashingContents.containsKey(getContentAt(index))) {
View Full Code Here

        return super.getTitleAt(index);
    }

    public Icon getIconAt(int index) {
        if (getSelectedIndex() == index) {
            ContentUI contentUI = contentMap.get(index).getContentUI();
            if (contentUI == null)
                return super.getIconAt(index);

            titleIcon.setText(super.getTitleAt(index));
            titleIcon.setUnderlinedIndex(
                    SwingUtil.findDisplayedMnemonicIndex(super.getTitleAt(index),
                                                         getContentAt(index).getMnemonic())
            );

            tabIconTitle.setLeftIcon(super.getIconAt(index));

            closeDetachIcon.setLeftVisible(contentUI.isDetachable());
            closeDetachIcon.setRightVisible(contentUI.isCloseable());

            return selectedTabIcon;
        }
        return super.getIconAt(index);
    }
View Full Code Here

TOP

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

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.