com.google.code.validationframework.swing.utils
Class ColorUtils

java.lang.Object
  extended by com.google.code.validationframework.swing.utils.ColorUtils

public final class ColorUtils
extends Object

Utility class dealing with colors.


Method Summary
static Color alphaBlend(Color src, Color dst)
          Blends the two colors taking into account their alpha.
If one of the two input colors implements the UIResource interface, the result color will also implement this interface.
static String toString(Color c)
          Convenience to get a more readable string representation of a Color object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

alphaBlend

public static Color alphaBlend(Color src,
                               Color dst)
Blends the two colors taking into account their alpha.
If one of the two input colors implements the UIResource interface, the result color will also implement this interface.

Parameters:
src - Source color to be blended into the destination color.
dst - Destination color on which the source color is to be blended.
Returns:
Color resulting from the color blending.

toString

public static String toString(Color c)
Convenience to get a more readable string representation of a Color object.

Parameters:
c - Color to get the string representation for.
Returns:
String representation of the specified color.


Copyright © 2013. All Rights Reserved.