Unverified Commit 15f56833 authored by hal's avatar hal Committed by Jeffrey I. Schiller

Add numbers to the designer alignment dropdowns

Add numbers to the property values shown in the designer dropdowns for
aligment, as requested in issue #182

Change-Id: Ia57d2911e2389436b37fe9a8ecb53a007ebca691
parent a5fb4ede
......@@ -17,9 +17,9 @@ public class YoungAndroidAlignmentChoicePropertyEditor extends ChoicePropertyEdi
// Text alignment choices
private static final Choice[] textAlignments = new Choice[] {
new Choice(MESSAGES.leftTextAlignment(), "0"),
new Choice(MESSAGES.centerTextAlignment(), "1"),
new Choice(MESSAGES.rightTextAlignment(), "2")
new Choice(MESSAGES.leftTextAlignment() + " : " + "0", "0"),
new Choice(MESSAGES.centerTextAlignment() + " : " + "1", "1"),
new Choice(MESSAGES.rightTextAlignment() + " : " + "2", "2")
};
public YoungAndroidAlignmentChoicePropertyEditor() {
......
......@@ -23,9 +23,9 @@ public class YoungAndroidHorizontalAlignmentChoicePropertyEditor extends ChoiceP
public static final String CENTER = ComponentConstants.GRAVITY_CENTER_HORIZONTAL + "";
private static final Choice[] hAlignments = new Choice[] {
new Choice(MESSAGES.horizontalAlignmentChoiceLeft(), LEFT),
new Choice(MESSAGES.horizontalAlignmentChoiceCenter(), CENTER),
new Choice(MESSAGES.horizontalAlignmentChoiceRight(), RIGHT)
new Choice(MESSAGES.horizontalAlignmentChoiceLeft() + " : " + LEFT, LEFT),
new Choice(MESSAGES.horizontalAlignmentChoiceCenter() + " : " + CENTER, CENTER),
new Choice(MESSAGES.horizontalAlignmentChoiceRight() + " : " + RIGHT, RIGHT)
};
public YoungAndroidHorizontalAlignmentChoicePropertyEditor() {
......
......@@ -27,9 +27,9 @@ public class YoungAndroidVerticalAlignmentChoicePropertyEditor extends ChoicePro
public static final String BOTTOM = ComponentConstants.GRAVITY_BOTTOM + "";
private static final Choice[] vAlignments = new Choice[] {
new Choice(MESSAGES.verticalAlignmentChoiceTop(), TOP),
new Choice(MESSAGES.verticalAlignmentChoiceCenter(), CENTER),
new Choice(MESSAGES.verticalAlignmentChoiceBottom(), BOTTOM),
new Choice(MESSAGES.verticalAlignmentChoiceTop() + " : " + TOP, TOP),
new Choice(MESSAGES.verticalAlignmentChoiceCenter() + " : " + CENTER, CENTER),
new Choice(MESSAGES.verticalAlignmentChoiceBottom() + " : " + BOTTOM, BOTTOM),
};
public YoungAndroidVerticalAlignmentChoicePropertyEditor() {
......
......@@ -1072,7 +1072,9 @@ public final class Canvas extends AndroidViewComponent implements ComponentConta
*/
@SimpleProperty(description = "Determines the alignment of the " +
"text drawn by DrawText() or DrawAngle() with respect to the " +
"point specified by that command.",
"point specified by that command: point at the left of the text, point at the center " +
"of the text, or point at the right of the text.",
// TODO: (Hal) Check that this is still correct for RTL languages.
category = PropertyCategory.APPEARANCE,
userVisible = true)
public int TextAlignment() {
......
......@@ -212,14 +212,14 @@ public class HVArrangement extends AndroidViewComponent implements Component, Co
/**
* Returns a number that encodes how contents of the arrangement are aligned vertically.
* The choices are: 1 = top, 2 = vertically centered, 3 = aligned at the bottom.
* The choices are: 1 = aligned at the top, 2 = vertically centered, 3 = aligned at the bottom.
* Alignment has no effect if the arrangement's height is automatic.
*/
@SimpleProperty(
category = PropertyCategory.APPEARANCE,
description = "A number that encodes how the contents of the arrangement are aligned " +
" vertically. The choices are: 1 = aligned at the top, 2 = aligned at the bottom, " +
"3 = vertically centered. Alignment has no effect if the arrangement's height " +
" vertically. The choices are: 1 = aligned at the top, 2 = vertically centered, " +
"3 = aligned at the bottom. Alignment has no effect if the arrangement's height " +
"is automatic.")
public int AlignVertical() {
return verticalAlignment;
......
......@@ -591,7 +591,10 @@
<dt><code>PaintColor</code></dt>
<dd>The color in which lines are drawn</dd>
<dt><code>TextAlignment</code></dt>
<dd>Determines the alignment of the text drawn by DrawText() or DrawAngle() with respect to the point specified by that command.</dd>
<dd>Determines the alignment of the text drawn by
DrawText() or DrawAngle() with respect to the point
specified by that command:
point at the left of the text, point at the center of the text, or point at the right of the text.</dd>
<dt><code>Visible</code></dt>
<dd>Specifies whether the component should be visible on the screen. Value is true if the component is showing and false if hidden.</dd>
<dt><code>Width</code></dt>
......
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