Package org.noos.xing.mydoggy.plaf.ui.icons

Examples of org.noos.xing.mydoggy.plaf.ui.icons.CompositeIcon


            if (anchor == ToolWindowAnchor.BOTTOM || anchor == ToolWindowAnchor.TOP) {
                anchorLabel = new AnchorLabel(toolAnchorLabelName, toolWindow.getIcon(), JLabel.CENTER);
            } else {
                TextIcon textIcon = new TextIcon(container, toolAnchorLabelName, anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel = new AnchorLabel(compositeIcon, JLabel.CENTER);
            }
View Full Code Here


                anchorLabel.setText(toolAnchorLabelName);
            } else {
                TextIcon textIcon = new TextIcon(((TextIcon) ((CompositeIcon) anchorLabel.getIcon()).getLeftIcon()).getComponent(),
                                                 toolAnchorLabelName,
                                                 anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel.setText(null);
                anchorLabel.setIcon(compositeIcon);
            }
View Full Code Here

            if (anchor == ToolWindowAnchor.BOTTOM || anchor == ToolWindowAnchor.TOP) {
                anchorLabel = new AnchorLabel(toolAnchorLabelText, toolWindow.getIcon(), JLabel.CENTER);
                anchorLabel.setName("toolWindow.rb." + toolWindow.getId());
            } else {
                TextIcon textIcon = new TextIcon(container, toolAnchorLabelText, anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel = new AnchorLabel(compositeIcon, JLabel.CENTER);
                anchorLabel.setName("toolWindow.rb." + toolWindow.getId());
            }
View Full Code Here

                anchorLabel.setText(toolAnchorLabelName);
            } else {
                TextIcon textIcon = new TextIcon(((TextIcon) ((CompositeIcon) anchorLabel.getIcon()).getLeftIcon()).getComponent(),
                                                 toolAnchorLabelName,
                                                 anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel.setText(null);
                anchorLabel.setIcon(compositeIcon);
            }
View Full Code Here

        this.accessible = accessible;
    }

    public String getToolTipTextAt(MouseEvent e, int index, String defaultTip) {
        if (index != -1) {
            CompositeIcon compositeIcon = (CompositeIcon) ((CompositeIcon) getContentIcon()).getRightIcon();

            Point point = SwingUtilities.convertPoint(tabbedPane, e.getPoint(), getDestination());

            if (isDetachable()) {
                Rectangle detachIconRect = compositeIcon.getLastPaintedLeftRec();
                if (point.getX() > detachIconRect.x && point.getX() < detachIconRect.x + detachIconRect.width) {
                    return ResourceBoundles.getResourceBundle().getString("@@tab.content.detach");
                }
            }

            if (isCloseable()) {
                Rectangle closeIconRect = compositeIcon.getLastPaintedRightRec();
                if (point.getX() > closeIconRect.x && point.getX() < closeIconRect.x + closeIconRect.width) {
                    return ResourceBoundles.getResourceBundle().getString("@@tab.content.close");
                }
            }
            return (defaultTip.equals("")) ? null : defaultTip;
View Full Code Here

            Icon titleIcon = null;
            if (title != null)
                titleIcon = new DynamicTextIcon();

            // Right Part
            contentIcon = new CompositeIcon(new CompositeIcon(icon, titleIcon, SwingConstants.LEFT),
                                            new DoubleIcon(), SwingConstants.LEFT,
                                            SwingConstants.LEFT, SwingConstants.TOP);
        }
        return contentIcon;
    }
View Full Code Here

        return contentIcon;
    }

    public boolean isDetachFired(Point point) {
        Point relativeMousePoint = SwingUtilities.convertPoint(tabbedPane, point, getDestination());
        CompositeIcon uiCompositeIcon = getUICompositeIcon();

        Rectangle detachIconRect = uiCompositeIcon.getLastPaintedLeftRec();
        return (isDetachable() && ((relativeMousePoint.getX() > detachIconRect.x && relativeMousePoint.getX() < detachIconRect.x + detachIconRect.width) ||
                                   (point.getX() > detachIconRect.x && point.getX() < detachIconRect.x + detachIconRect.width)));
    }
View Full Code Here

        this.content = content;
    }
   
    public boolean isCloseFired(Point point) {
        Point relativeMousePoint = SwingUtilities.convertPoint(tabbedPane, point, getDestination());
        CompositeIcon uiCompositeIcon = getUICompositeIcon();

        Rectangle closeIconRect = uiCompositeIcon.getLastPaintedRightRec();
        return (isCloseable() && ((relativeMousePoint.getX() > closeIconRect.x && relativeMousePoint.getX() < closeIconRect.x + closeIconRect.width) ||
                                  (point.getX() > closeIconRect.x && point.getX() < closeIconRect.x + closeIconRect.width)));
    }
View Full Code Here

            if (anchor == ToolWindowAnchor.BOTTOM || anchor == ToolWindowAnchor.TOP) {
                anchorLabel = new AnchorLabel(toolAnchorLabelName, toolWindow.getIcon(), JLabel.CENTER);
            } else {
                TextIcon textIcon = new TextIcon(container, toolAnchorLabelName, anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel = new AnchorLabel(compositeIcon, JLabel.CENTER);
            }
View Full Code Here

                anchorLabel.setText(toolAnchorLabelName);
            } else {
                TextIcon textIcon = new TextIcon(((TextIcon) ((CompositeIcon) anchorLabel.getIcon()).getLeftIcon()).getComponent(),
                                                 toolAnchorLabelName,
                                                 anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
                CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
                                                                (anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
                                                                : SwingConstants.BOTTOM);
                anchorLabel.setText(null);
                anchorLabel.setIcon(compositeIcon);
            }
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.ui.icons.CompositeIcon

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.