Commit 55330e01 authored by Jos's avatar Jos Committed by Jeffrey Schiller

Fix for #1195 NxtColorSensor default value property (#1196)

parent c6a49119
...@@ -215,7 +215,7 @@ public class PropertiesUtil { ...@@ -215,7 +215,7 @@ public class PropertiesUtil {
return new YoungAndroidLegoNxtSensorPortChoicePropertyEditor(); return new YoungAndroidLegoNxtSensorPortChoicePropertyEditor();
} else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_LEGO_NXT_GENERATED_COLOR)) { } else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_LEGO_NXT_GENERATED_COLOR)) {
return new YoungAndroidColorChoicePropertyEditor( return new YoungAndroidColorChoicePropertyEditor(
YoungAndroidColorChoicePropertyEditor.NXT_GENERATED_COLORS); YoungAndroidColorChoicePropertyEditor.NXT_GENERATED_COLORS, defaultValue);
} else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_LONGITUDE)) { } else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_LONGITUDE)) {
return new YoungAndroidFloatRangePropertyEditor(-180, 180); return new YoungAndroidFloatRangePropertyEditor(-180, 180);
} else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_MAP_TYPE)) { } else if (editorType.equals(PropertyTypeConstants.PROPERTY_TYPE_MAP_TYPE)) {
......
...@@ -39,7 +39,7 @@ public final class YoungAndroidColorChoicePropertyEditor extends ColorChoiceProp ...@@ -39,7 +39,7 @@ public final class YoungAndroidColorChoicePropertyEditor extends ColorChoiceProp
new Color(MESSAGES.noneColor(), Color.ALPHA_TRANSPARENT, "FFFFFF"), new Color(MESSAGES.noneColor(), Color.ALPHA_TRANSPARENT, "FFFFFF"),
new Color(MESSAGES.redColor(), Color.ALPHA_OPAQUE, "FF0000"), new Color(MESSAGES.redColor(), Color.ALPHA_OPAQUE, "FF0000"),
new Color(MESSAGES.greenColor(), Color.ALPHA_OPAQUE, "00FF00"), new Color(MESSAGES.greenColor(), Color.ALPHA_OPAQUE, "00FF00"),
new Color(MESSAGES.blueColor(), Color.ALPHA_OPAQUE, "0000FF"), new Color(MESSAGES.blueColor(), Color.ALPHA_OPAQUE, "0000FF")
}; };
/** /**
...@@ -52,7 +52,7 @@ public final class YoungAndroidColorChoicePropertyEditor extends ColorChoiceProp ...@@ -52,7 +52,7 @@ public final class YoungAndroidColorChoicePropertyEditor extends ColorChoiceProp
/** /**
* Creates a new property editor for a specific array of color RGB values. * Creates a new property editor for a specific array of color RGB values.
*/ */
public YoungAndroidColorChoicePropertyEditor(Color[] colors) { public YoungAndroidColorChoicePropertyEditor(Color[] colors, String defaultValue) {
super(colors, "&H"); super(colors, "&H", defaultValue);
} }
} }
...@@ -142,8 +142,8 @@ public abstract class ColorChoicePropertyEditor extends PropertyEditor { ...@@ -142,8 +142,8 @@ public abstract class ColorChoicePropertyEditor extends PropertyEditor {
* @param colors colors to be shown in property editor - must not be * @param colors colors to be shown in property editor - must not be
* {@code null} or empty * {@code null} or empty
*/ */
public ColorChoicePropertyEditor(final Color[] colors, final String hexPrefix) { public ColorChoicePropertyEditor(final Color[] colors, final String hexPrefix, final String defaultValue) {
this(colors, hexPrefix, "", false); this(colors, hexPrefix, defaultValue, false);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment