Package org.esa.snap.rcp.colormanip
Class ColorUtils
- java.lang.Object
-
- org.esa.snap.rcp.colormanip.ColorUtils
-
public class ColorUtils extends Object
Utility class containing methods to the Color Manipulation Tool.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
alpha(int color)
Returns the alpha component.static int
blue(int color)
Returns the blue component.static boolean
checkLogCompatibility(double value, String componentName, boolean isLogScaled)
static boolean
checkRangeCompatibility(double min, double max)
static boolean
checkRangeCompatibility(double min, double max, boolean isLogScaled)
static boolean
checkRangeCompatibility(String minStr, String maxStr)
static boolean
checkSliderRangeCompatibility(double value, double min, double max)
static boolean
checkTableRangeCompatibility(double value, double min, double max)
static int
green(int color)
Returns the green component.static boolean
isNumber(String string)
static boolean
isNumber(String string, String componentName, boolean showMessage)
static int
red(int color)
Returns the red component.static int
rgba(int red, int green, int blue)
Returns the RGB color as int.static void
showErrorDialog(String message)
-
-
-
Method Detail
-
rgba
public static int rgba(int red, int green, int blue)
Returns the RGB color as int.- Parameters:
red
- the red componentgreen
- the green componentblue
- the blue component- Returns:
- the RGB color as int
-
alpha
public static int alpha(int color)
Returns the alpha component.- Parameters:
color
- the RGB color- Returns:
- the alpha component
-
red
public static int red(int color)
Returns the red component.- Parameters:
color
- the RGB color- Returns:
- the red component
-
green
public static int green(int color)
Returns the green component.- Parameters:
color
- the RGB color- Returns:
- the green component
-
blue
public static int blue(int color)
Returns the blue component.- Parameters:
color
- the RGB color- Returns:
- the blue component
-
isNumber
public static boolean isNumber(String string)
-
checkRangeCompatibility
public static boolean checkRangeCompatibility(String minStr, String maxStr)
-
checkRangeCompatibility
public static boolean checkRangeCompatibility(double min, double max)
-
showErrorDialog
public static void showErrorDialog(String message)
-
checkRangeCompatibility
public static boolean checkRangeCompatibility(double min, double max, boolean isLogScaled)
-
checkSliderRangeCompatibility
public static boolean checkSliderRangeCompatibility(double value, double min, double max)
-
checkLogCompatibility
public static boolean checkLogCompatibility(double value, String componentName, boolean isLogScaled)
-
checkTableRangeCompatibility
public static boolean checkTableRangeCompatibility(double value, double min, double max)
-
-