Package com._1c.g5.v8.dt.ui.util
Class ColorUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.util.ColorUtil
-
-
Constructor Summary
Constructors Constructor Description ColorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
colorToInteger(Color color)
Transforms the given Color into integer BGR notation.static Color
createColor(int rgb)
Creates aColor
object from integer color notation BGRstatic Color
createColor(int red, int green, int blue)
Creates aColor
object out of the given color componentsstatic Color
createColor(org.eclipse.swt.graphics.RGB rgb)
Creates aColor
object out of the givenRGB
objectstatic org.eclipse.swt.graphics.RGB
createRGB(Color color)
Creates anRGB
object out of the givenColor
objectstatic org.eclipse.swt.graphics.Color
createSwtColor(org.eclipse.swt.widgets.Widget widget, Color color)
Creates a new Color object with properties specified by the given color.static boolean
equalsByRGB(Color c1, Color c2)
Returnstrue
if colors have equal RGB values,false
otherwise.
-
-
-
Method Detail
-
colorToInteger
public static int colorToInteger(Color color)
Transforms the given Color into integer BGR notation.
-
createColor
public static Color createColor(org.eclipse.swt.graphics.RGB rgb)
Creates aColor
object out of the givenRGB
object- Parameters:
rgb
- aRGB
object to take color value from
-
createColor
public static Color createColor(int rgb)
Creates aColor
object from integer color notation BGR
-
createColor
public static Color createColor(int red, int green, int blue)
Creates aColor
object out of the given color components
-
createRGB
public static org.eclipse.swt.graphics.RGB createRGB(Color color)
Creates anRGB
object out of the givenColor
object- Parameters:
color
- aColor
object to take color value from
-
createSwtColor
public static final org.eclipse.swt.graphics.Color createSwtColor(org.eclipse.swt.widgets.Widget widget, Color color)
Creates a new Color object with properties specified by the given color. The result must be disposed of.- Parameters:
widget
- the widget that is going to use the colorcolor
- specification of the color to create- Returns:
Color
instance; it must be disposed by the client
-
-