Package com.alee.utils.ninepatch

Examples of com.alee.utils.ninepatch.NinePatchIcon.paintIcon()


            // Calculate shade bounds and paint it
            final int x = actualPaintLeft ? 0 : -shadeWidth * 2;
            final int width = w + ( actualPaintLeft ? 0 : shadeWidth * 2 ) + ( actualPaintRight ? 0 : shadeWidth * 2 );
            final int y = paintTop ? 0 : -shadeWidth * 2;
            final int height = h + ( paintTop ? 0 : shadeWidth * 2 ) + ( paintBottom ? 0 : shadeWidth * 2 );
            shade.paintIcon ( g2d, x, y, width, height );
        }
    }

    /**
     * Paints decoration background.
View Full Code Here


        {
            // Painting background decoration
            final NinePatchIcon backgroundIcon = getCurrentBackgroundIcon ();
            if ( backgroundIcon != null )
            {
                backgroundIcon.paintIcon ( g2d, getBackgroundBounds ( backgroundIcon, bounds, c ) );
            }

            // Painting appropriate separators
            if ( isTopLineShouldBePainted () )
            {
View Full Code Here

            {
                final NinePatchIcon icon = getCurrentTopSeparatorIcon ();
                if ( icon != null )
                {
                    final Dimension ps = icon.getPreferredSize ();
                    icon.paintIcon ( g2d, bounds.x, bounds.y, bounds.width, ps.height );
                }
            }
            if ( isLeftLineShouldBePainted () )
            {
                final NinePatchIcon icon = getCurrentLeftSeparatorIcon ();
View Full Code Here

            {
                final NinePatchIcon icon = getCurrentLeftSeparatorIcon ();
                if ( icon != null )
                {
                    final Dimension ps = icon.getPreferredSize ();
                    icon.paintIcon ( g2d, bounds.x, bounds.y, ps.width, bounds.height );
                }
            }
            if ( isBottomLineShouldBePainted () )
            {
                final NinePatchIcon icon = getCurrentBottomSeparatorIcon ();
View Full Code Here

            {
                final NinePatchIcon icon = getCurrentBottomSeparatorIcon ();
                if ( icon != null )
                {
                    final Dimension ps = icon.getPreferredSize ();
                    icon.paintIcon ( g2d, bounds.x, bounds.y + bounds.height - ps.height, bounds.width, ps.height );
                }
            }
            if ( isRightLineShouldBePainted () )
            {
                final NinePatchIcon icon = getCurrentRightSeparatorIcon ();
View Full Code Here

            {
                final NinePatchIcon icon = getCurrentRightSeparatorIcon ();
                if ( icon != null )
                {
                    final Dimension ps = icon.getPreferredSize ();
                    icon.paintIcon ( g2d, bounds.x + bounds.width - ps.width, bounds.y, ps.width, bounds.height );
                }
            }
        }
    }
View Full Code Here

        if ( paintTrack )
        {
            final NinePatchIcon backgroundIcon = getCurrentBackgroundIcon ( scrollbar );
            if ( backgroundIcon != null )
            {
                backgroundIcon.paintIcon ( g2d, b );
            }
        }
    }

    /**
 
View Full Code Here

        if ( paintTrack )
        {
            final NinePatchIcon backgroundIcon = getCurrentTrackIcon ( scrollbar );
            if ( backgroundIcon != null )
            {
                backgroundIcon.paintIcon ( g2d, b );
            }
        }
    }

    /**
 
View Full Code Here

    {
        final NinePatchIcon thumbIcon = getCurrentThumbIcon ( scrollbar );
        if ( thumbIcon != null )
        {
            final Insets m = getCurrentThumbMargin ( scrollbar );
            thumbIcon.paintIcon ( g2d, b.x + m.left, b.y + m.top, b.width - m.left - m.right, b.height - m.top - m.bottom );
        }
    }

    /**
     * Returns thumb 9-patch icon that should be painted right now.
View Full Code Here

        if ( !undecorated )
        {
            final NinePatchIcon backgroundIcon = getCurrentBackgroundIcon ();
            if ( backgroundIcon != null )
            {
                backgroundIcon.paintIcon ( g2d, bounds );
            }
        }

        // Painting label
        super.paint ( g2d, bounds, c );
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.