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

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.ContentRepresentativeAnchor


            Icon toolIcon = content.getIcon();

            switch (anchor) {
                case BOTTOM:
                case TOP:
                    representativeAnchor = new ContentRepresentativeAnchor(this, labelText, toolIcon, JLabel.CENTER);
                    break;
                case LEFT:
                    if (SwingUtil.getBoolean(MyDoggyKeySpace.TWRA_ROTATE_ICON_ON_ANCHOR, false) && toolIcon != null)
                        toolIcon = GraphicsUtil.rotate(toolIcon, -Math.PI/2);

                    TextIcon textIcon = new TextIcon(parent, labelText, TextIcon.ROTATE_LEFT);
                    textIcon.setForeground(UIManager.getColor(MyDoggyKeySpace.TWRA_FOREGROUND));
                    AggregateIcon compositeIcon = new AggregateIcon(textIcon, toolIcon, SwingConstants.VERTICAL);

                    representativeAnchor = new ContentRepresentativeAnchor(this, compositeIcon, JLabel.CENTER);
                    break;
                case RIGHT:
                    if (SwingUtil.getBoolean(MyDoggyKeySpace.TWRA_ROTATE_ICON_ON_ANCHOR, false) && toolIcon != null)
                        toolIcon = GraphicsUtil.rotate(toolIcon, Math.PI/2);

                    textIcon = new TextIcon(parent, labelText, TextIcon.ROTATE_RIGHT);
                    textIcon.setForeground(UIManager.getColor(MyDoggyKeySpace.TWRA_FOREGROUND));
                    compositeIcon = new AggregateIcon(toolIcon, textIcon, SwingConstants.VERTICAL);

                    representativeAnchor = new ContentRepresentativeAnchor(this, compositeIcon, JLabel.CENTER);
                    break;
            }

            representativeAnchor.setName("toolWindow.rb." + content.getId());
            representativeAnchor.setOpaque(true);
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.ui.cmp.ContentRepresentativeAnchor

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.