Class RgbUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.common.ui.colors.RgbUtil
-
public final class RgbUtil extends Object
This is an utility class that provides method for converting from/to different color notations.
-
-
Field Summary
Fields Modifier and Type Field Description static org.eclipse.swt.graphics.RGB
DEFAULT_RGB
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.swt.graphics.RGB
createRGB(Integer rgb)
A copy-paste ofFigureUtilities.integerToRGB(java.lang.Integer)
static org.eclipse.swt.graphics.RGB
createRGB(org.eclipse.swt.graphics.Color color)
Creates anRGB
object out of the givenColor
objectstatic org.eclipse.swt.graphics.Color
createSwtColor(org.eclipse.swt.widgets.Widget widget, Integer rgb)
Creates a new Color object with RGB properties specified by rgb.static org.eclipse.swt.graphics.Color
createSwtColor(org.eclipse.swt.widgets.Widget widget, org.eclipse.swt.graphics.RGB rgb)
Creates a new Color object with the specified RGB properties.static Integer
RGBToInteger(org.eclipse.swt.graphics.RGB rgb)
A copy-paste ofFigureUtilities.RGBToInteger(org.eclipse.swt.graphics.RGB)
-
-
-
Method Detail
-
createRGB
public static org.eclipse.swt.graphics.RGB createRGB(org.eclipse.swt.graphics.Color color)
Creates anRGB
object out of the givenColor
object- Parameters:
color
- aColor
object to take color value from
-
createRGB
public static org.eclipse.swt.graphics.RGB createRGB(Integer rgb)
A copy-paste ofFigureUtilities.integerToRGB(java.lang.Integer)
-
RGBToInteger
public static Integer RGBToInteger(org.eclipse.swt.graphics.RGB rgb)
A copy-paste ofFigureUtilities.RGBToInteger(org.eclipse.swt.graphics.RGB)
-
createSwtColor
public static final org.eclipse.swt.graphics.Color createSwtColor(org.eclipse.swt.widgets.Widget widget, org.eclipse.swt.graphics.RGB rgb)
Creates a new Color object with the specified RGB properties. The result must be disposed of.- Parameters:
widget
- the widget that is going to use the colorrgb
- RGB notation of the color to create- Returns:
Color
instance; it must be disposed by the client
-
createSwtColor
public static final org.eclipse.swt.graphics.Color createSwtColor(org.eclipse.swt.widgets.Widget widget, Integer rgb)
Creates a new Color object with RGB properties specified by rgb. The result must be disposed of.- Parameters:
widget
- the widget that is going to use the colorrgb
- RGB notation of the color to create- Returns:
Color
instance; it must be disposed by the client
-
-