Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
55330e01
Commit
55330e01
authored
Mar 28, 2018
by
Jos
Committed by
Jeffrey Schiller
Mar 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1195 NxtColorSensor default value property (#1196)
parent
c6a49119
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/utils/PropertiesUtil.java
...client/editor/simple/components/utils/PropertiesUtil.java
+1
-1
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/properties/YoungAndroidColorChoicePropertyEditor.java
...oid/properties/YoungAndroidColorChoicePropertyEditor.java
+3
-3
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/ColorChoicePropertyEditor.java
.../client/widgets/properties/ColorChoicePropertyEditor.java
+2
-2
No files found.
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/utils/PropertiesUtil.java
View file @
55330e01
...
...
@@ -215,7 +215,7 @@ public class PropertiesUtil {
return
new
YoungAndroidLegoNxtSensorPortChoicePropertyEditor
();
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_LEGO_NXT_GENERATED_COLOR
))
{
return
new
YoungAndroidColorChoicePropertyEditor
(
YoungAndroidColorChoicePropertyEditor
.
NXT_GENERATED_COLORS
);
YoungAndroidColorChoicePropertyEditor
.
NXT_GENERATED_COLORS
,
defaultValue
);
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_LONGITUDE
))
{
return
new
YoungAndroidFloatRangePropertyEditor
(-
180
,
180
);
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_MAP_TYPE
))
{
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/properties/YoungAndroidColorChoicePropertyEditor.java
View file @
55330e01
...
...
@@ -39,7 +39,7 @@ public final class YoungAndroidColorChoicePropertyEditor extends ColorChoiceProp
new
Color
(
MESSAGES
.
noneColor
(),
Color
.
ALPHA_TRANSPARENT
,
"FFFFFF"
),
new
Color
(
MESSAGES
.
redColor
(),
Color
.
ALPHA_OPAQUE
,
"FF0000"
),
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
/**
* Creates a new property editor for a specific array of color RGB values.
*/
public
YoungAndroidColorChoicePropertyEditor
(
Color
[]
colors
)
{
super
(
colors
,
"&H"
);
public
YoungAndroidColorChoicePropertyEditor
(
Color
[]
colors
,
String
defaultValue
)
{
super
(
colors
,
"&H"
,
defaultValue
);
}
}
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/ColorChoicePropertyEditor.java
View file @
55330e01
...
...
@@ -142,8 +142,8 @@ public abstract class ColorChoicePropertyEditor extends PropertyEditor {
* @param colors colors to be shown in property editor - must not be
* {@code null} or empty
*/
public
ColorChoicePropertyEditor
(
final
Color
[]
colors
,
final
String
hexPrefix
)
{
this
(
colors
,
hexPrefix
,
""
,
false
);
public
ColorChoicePropertyEditor
(
final
Color
[]
colors
,
final
String
hexPrefix
,
final
String
defaultValue
)
{
this
(
colors
,
hexPrefix
,
defaultValue
,
false
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment