Class PlasticXPUtils


  • public final class PlasticXPUtils
    extends java.lang.Object
    Consists exclusively of static methods that provide convenience behavior.
    Version:
    $Revision: 1.5 $
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PlasticXPUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void drawButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h, java.awt.Color backgroundColor, java.awt.Color edgeColor, java.awt.Color cornerColor)
      Draws a button border for an xp button with the given colors.
      (package private) static void drawDefaultButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)
      Draws a border for a default xp button.
      (package private) static void drawDisabledButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)
      Draws a border for a disabled xp button.
      (package private) static void drawFocusedButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)
      Draws a border for a focused xp button.
      private static void drawInnerButtonDecoration​(java.awt.Graphics g, int x, int y, int w, int h, java.awt.Color baseColor)
      Draws a button border for an xp button with the given colors.
      (package private) static void drawPlainButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)
      Draws a plain border for an xp button.
      (package private) static void drawPressedButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)
      Draws a border for a pressed xp button.
      (package private) static void drawRect​(java.awt.Graphics g, int x, int y, int w, int h)
      An optimized version of Graphics.drawRect.
      private static java.awt.Color translucentColor​(java.awt.Color baseColor, int alpha)
      Returns a color that is a translucent copy of the given color.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlasticXPUtils

        private PlasticXPUtils()
    • Method Detail

      • drawPlainButtonBorder

        static void drawPlainButtonBorder​(java.awt.Graphics g,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
        Draws a plain border for an xp button.
      • drawPressedButtonBorder

        static void drawPressedButtonBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
        Draws a border for a pressed xp button.
      • drawDefaultButtonBorder

        static void drawDefaultButtonBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
        Draws a border for a default xp button.
      • drawFocusedButtonBorder

        static void drawFocusedButtonBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
        Draws a border for a focused xp button.
      • drawDisabledButtonBorder

        static void drawDisabledButtonBorder​(java.awt.Graphics g,
                                             int x,
                                             int y,
                                             int w,
                                             int h)
        Draws a border for a disabled xp button.
      • drawButtonBorder

        public static void drawButtonBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h,
                                            java.awt.Color backgroundColor,
                                            java.awt.Color edgeColor,
                                            java.awt.Color cornerColor)
        Draws a button border for an xp button with the given colors.
      • drawInnerButtonDecoration

        private static void drawInnerButtonDecoration​(java.awt.Graphics g,
                                                      int x,
                                                      int y,
                                                      int w,
                                                      int h,
                                                      java.awt.Color baseColor)
        Draws a button border for an xp button with the given colors.
      • drawRect

        static void drawRect​(java.awt.Graphics g,
                             int x,
                             int y,
                             int w,
                             int h)
        An optimized version of Graphics.drawRect.
      • translucentColor

        private static java.awt.Color translucentColor​(java.awt.Color baseColor,
                                                       int alpha)
        Returns a color that is a translucent copy of the given color.
        Parameters:
        baseColor - the base color
        alpha - the alpha value
        Returns:
        the translucent color with specified alpha