|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aptana.ide.core.ui.ColorPair
public class ColorPair
A ColorPair is a combination of a foreground and a background color.
| Field Summary | |
|---|---|
static ColorPair |
COLOR_DEFAULT_DEFAULT
The default-default value for color preferences (black, RGB(0,0,0)). |
| Constructor Summary | |
|---|---|
ColorPair(org.eclipse.swt.graphics.RGB foregroundColor,
org.eclipse.swt.graphics.RGB backgroundColor)
Creates a new instance of ColorPair |
|
| Method Summary | |
|---|---|
static ColorPair |
asColorPair(java.lang.String value)
Converts the given value into an SWT RGB color value. |
static java.lang.String |
asString(ColorPair value)
Converts the given SWT RGB color pair value object to a string. |
org.eclipse.swt.graphics.RGB |
getBackgroundColor()
Returns the background color of this pair |
static ColorPair |
getColorPair(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name)
Returns the current value of the color-valued preference with the given name in the given preference store. |
static ColorPair |
getDefaultColorPair(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name)
Returns the default value for the color-valued preference with the given name in the given preference store. |
org.eclipse.swt.graphics.RGB |
getForegroundColor()
Returns the foreground color of this pair |
void |
setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
Set the background color |
static void |
setDefault(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name,
ColorPair value)
Sets the default value of the preference with the given name in the given preference store. |
void |
setForegroundColor(org.eclipse.swt.graphics.RGB foregroundColor)
Sets the foreground color |
static void |
setValue(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name,
ColorPair value)
Sets the current value of the preference with the given name in the given preference store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ColorPair COLOR_DEFAULT_DEFAULT
RGB(0,0,0)).
| Constructor Detail |
|---|
public ColorPair(org.eclipse.swt.graphics.RGB foregroundColor,
org.eclipse.swt.graphics.RGB backgroundColor)
foregroundColor - backgroundColor - | Method Detail |
|---|
public org.eclipse.swt.graphics.RGB getBackgroundColor()
public void setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
backgroundColor - public org.eclipse.swt.graphics.RGB getForegroundColor()
public void setForegroundColor(org.eclipse.swt.graphics.RGB foregroundColor)
foregroundColor -
public static ColorPair getColorPair(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name)
COLOR_DEFAULT_DEFAULT)
if there is no preference with the given name, or if the current value cannot be treated as a
color.
store - the preference storename - the name of the preference
public static ColorPair getDefaultColorPair(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name)
COLOR_DEFAULT_DEFAULT)
is no default preference with the given name, or if the default value cannot be treated as a
color.
store - the preference storename - the name of the preference
public static void setDefault(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name,
ColorPair value)
store - the preference storename - the name of the preferencevalue - the new default value of the preferencepublic static java.lang.String asString(ColorPair value)
The string representation of an RGB color pair value has the form
,,
are string representations of
integers. The two colors are separated by the form foreground;background
value - the RGB color pair value object
public static ColorPair asColorPair(java.lang.String value)
throws org.eclipse.jface.resource.DataFormatException
A valid RGB color value representation is a string of the form
,,
are valid ints. ColorPairs are a
combination of two colors, separated (in string form), be a ';'
value - the value to be converted
org.eclipse.jface.resource.DataFormatException - if the given value does not represent an RGB color value
public static void setValue(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String name,
ColorPair value)
store - the preference storename - the name of the preferencevalue - the new current value of the preference
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||