Examples of WebPopupMenuPainter


Examples of com.alee.managers.style.skin.web.WebPopupMenuPainter

                final WebPopupMenuUI ui = ( WebPopupMenuUI ) popupMenu.getUI ();
                final Painter painter = ui.getPainter ();
                if ( painter instanceof WebPopupMenuPainter )
                {
                    // Checking painter sttyle
                    final WebPopupMenuPainter webPainter = ( WebPopupMenuPainter ) painter;
                    if ( webPainter.getPopupStyle () == PopupStyle.dropdown )
                    {
                        // Checking whether this item state change affect the corner
                        final int zOrder = popupMenu.getComponentZOrder ( menuItem );
                        if ( webPainter.getCornerSide () == SwingConstants.NORTH && zOrder == 0 )
                        {
                            // Repainting only corner bounds
                            popupMenu.repaint ( 0, 0, popupMenu.getWidth (), menuItem.getBounds ().y );
                        }
                        else if ( webPainter.getCornerSide () == SwingConstants.SOUTH && zOrder == popupMenu.getComponentCount () - 1 )
                        {
                            // Repainting only corner bounds
                            final Rectangle itemBounds = menuItem.getBounds ();
                            final int y = itemBounds.y + itemBounds.height;
                            popupMenu.repaint ( 0, y, popupMenu.getWidth (), popupMenu.getHeight () - y );
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.