HorizontalAlignmentConstant class
Possible return values for {@link #getHorizontalAlignment}, and parameter values for {@link #setHorizontalAlignment}.
class HorizontalAlignmentConstant extends AutoHorizontalAlignmentConstant { static HorizontalAlignmentConstant endOf(Direction direction) { return direction == Direction.LTR ? HasHorizontalAlignment.ALIGN_RIGHT : direction == Direction.RTL ? HasHorizontalAlignment.ALIGN_LEFT : HasHorizontalAlignment.ALIGN_LOCALE_END; } static HorizontalAlignmentConstant startOf(Direction direction) { return direction == Direction.LTR ? HasHorizontalAlignment.ALIGN_LEFT : direction == Direction.RTL ? HasHorizontalAlignment.ALIGN_RIGHT : HasHorizontalAlignment.ALIGN_LOCALE_START; } final TextAlign _textAlign; const HorizontalAlignmentConstant(this._textAlign) : super.internal(); /** * Gets the CSS 'text-align' string associated with this constant. * * @return the CSS 'text-align' value */ String getTextAlignString() { return _textAlign.value; } }
Extends
AutoHorizontalAlignmentConstant > HorizontalAlignmentConstant
Static Methods
HorizontalAlignmentConstant endOf(Direction direction) #
static HorizontalAlignmentConstant endOf(Direction direction) { return direction == Direction.LTR ? HasHorizontalAlignment.ALIGN_RIGHT : direction == Direction.RTL ? HasHorizontalAlignment.ALIGN_LEFT : HasHorizontalAlignment.ALIGN_LOCALE_END; }
HorizontalAlignmentConstant startOf(Direction direction) #
static HorizontalAlignmentConstant startOf(Direction direction) { return direction == Direction.LTR ? HasHorizontalAlignment.ALIGN_LEFT : direction == Direction.RTL ? HasHorizontalAlignment.ALIGN_RIGHT : HasHorizontalAlignment.ALIGN_LOCALE_START; }
Methods
String getTextAlignString() #
Gets the CSS 'text-align' string associated with this constant.
@return the CSS 'text-align' value
String getTextAlignString() { return _textAlign.value; }