Class ConfigSectionInterfaceColorSWT.SkinColorValueProcessor
- java.lang.Object
-
- com.biglybt.ui.swt.views.configsections.ConfigSectionInterfaceColorSWT.SkinColorValueProcessor
-
- All Implemented Interfaces:
SwtParameterValueProcessor<ColorSwtParameter,int[]>
- Enclosing class:
- ConfigSectionInterfaceColorSWT
private static class ConfigSectionInterfaceColorSWT.SkinColorValueProcessor extends java.lang.Object implements SwtParameterValueProcessor<ColorSwtParameter,int[]>
Skin colors can be formatted as:
colorkey=paramkey:defaultcolor
paramkey is the override stored in ConfigurationManager
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Display
display
-
Constructor Summary
Constructors Constructor Description SkinColorValueProcessor(org.eclipse.swt.widgets.Display display)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getDefaultValue(ColorSwtParameter p)
Return the default value.int[]
getValue(ColorSwtParameter p)
Return the value for Parameter pboolean
isDefaultValue(ColorSwtParameter p)
Whether the Parameter is currently set to the default value.boolean
resetToDefault(ColorSwtParameter p)
Reset key to default valueboolean
setValue(ColorSwtParameter p, int[] value)
New value for Parameter p.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.ui.swt.config.SwtParameterValueProcessor
dispose
-
-
-
-
Method Detail
-
getValue
public int[] getValue(ColorSwtParameter p)
Description copied from interface:SwtParameterValueProcessor
Return the value for Parameter p- Specified by:
getValue
in interfaceSwtParameterValueProcessor<ColorSwtParameter,int[]>
-
getDefaultValue
public int[] getDefaultValue(ColorSwtParameter p)
Description copied from interface:SwtParameterValueProcessor
Return the default value.
This may be used to enable ui related to reseting value, or to show the default value to the user- Specified by:
getDefaultValue
in interfaceSwtParameterValueProcessor<ColorSwtParameter,int[]>
-
isDefaultValue
public boolean isDefaultValue(ColorSwtParameter p)
Description copied from interface:SwtParameterValueProcessor
Whether the Parameter is currently set to the default value. This may be used to enable ui related to reseting value- Specified by:
isDefaultValue
in interfaceSwtParameterValueProcessor<ColorSwtParameter,int[]>
-
setValue
public boolean setValue(ColorSwtParameter p, int[] value)
Description copied from interface:SwtParameterValueProcessor
New value for Parameter p. Handle things like storing value.- Specified by:
setValue
in interfaceSwtParameterValueProcessor<ColorSwtParameter,int[]>
- Returns:
- Whether the value changed from stored value. Returning true will trigger change listeners, and typically refresh UI controls
-
resetToDefault
public boolean resetToDefault(ColorSwtParameter p)
Description copied from interface:SwtParameterValueProcessor
Reset key to default value- Specified by:
resetToDefault
in interfaceSwtParameterValueProcessor<ColorSwtParameter,int[]>
- Returns:
- Whether the value was reset. Returning true will trigger change listeners, and typically refresh UI controls
-
-