Package com.google.gwt.user.client.ui
Interface HasAutoHorizontalAlignment
- All Superinterfaces:
HasHorizontalAlignment
- All Known Implementing Classes:
DateLabel,DialogBox.CaptionImpl,HTML,InlineHTML,InlineLabel,Label,LabelBase,NumberLabel,ValueLabel
A widget that implements this interface can be configured to be aligned
according to its contents' direction, in addition to the static alignment
options offered by
HasHorizontalAlignment.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
HasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant -
Field Summary
FieldsModifier and TypeFieldDescriptionSpecifies that the widget's contents should be aligned right for LTR content, left for RTL content, and if the content's direction is DEFAULT, likeHasHorizontalAlignment.ALIGN_LOCALE_END.Specifies that the widget's contents should be aligned left for LTR content, right for RTL content, and if the content's direction is DEFAULT, likeHasHorizontalAlignment.ALIGN_LOCALE_START.Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT -
Method Summary
Modifier and TypeMethodDescriptionGets the horizontal auto-alignment setting.voidsetAutoHorizontalAlignment(HasHorizontalAlignment.AutoHorizontalAlignmentConstant autoHorizontalAlignment) Sets the horizontal alignment, allowing in addition to the "static"HasHorizontalAlignment.HorizontalAlignmentConstantvalues, the "automatic"HasHorizontalAlignment.AutoHorizontalAlignmentConstantvalues that depend on the content direction.Methods inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
getHorizontalAlignment, setHorizontalAlignment
-
Field Details
-
ALIGN_CONTENT_START
Specifies that the widget's contents should be aligned left for LTR content, right for RTL content, and if the content's direction is DEFAULT, likeHasHorizontalAlignment.ALIGN_LOCALE_START. -
ALIGN_CONTENT_END
Specifies that the widget's contents should be aligned right for LTR content, left for RTL content, and if the content's direction is DEFAULT, likeHasHorizontalAlignment.ALIGN_LOCALE_END.
-
-
Method Details
-
getAutoHorizontalAlignment
HasHorizontalAlignment.AutoHorizontalAlignmentConstant getAutoHorizontalAlignment()Gets the horizontal auto-alignment setting. This may be one of the auto-alignment values above that depend on content direction (e.g.ALIGN_CONTENT_START), or one of the "static"HasHorizontalAlignment.HorizontalAlignmentConstantalignment values (e.g.HasHorizontalAlignment.ALIGN_LOCALE_START). It may be set by eithersetAutoHorizontalAlignmentorHasHorizontalAlignment#setHorizontalAlignment. The default is null, indicating that no specific horizontal alignment has been set, allowing it to be determined by the usual HTML and CSS mechanisms.- Returns:
- the current automatic horizontal alignment policy.
-
setAutoHorizontalAlignment
void setAutoHorizontalAlignment(HasHorizontalAlignment.AutoHorizontalAlignmentConstant autoHorizontalAlignment) Sets the horizontal alignment, allowing in addition to the "static"HasHorizontalAlignment.HorizontalAlignmentConstantvalues, the "automatic"HasHorizontalAlignment.AutoHorizontalAlignmentConstantvalues that depend on the content direction. Determines the values returned by bothgetAutoHorizontalAlignment()andHasHorizontalAlignment.getHorizontalAlignment().For the
ALIGN_CONTENT_STARTandALIGN_CONTENT_ENDvalues, sets the horizontal alignment (including the value ofHasHorizontalAlignment#getHorizontalAlignment()) to the start or end edge of the current content's direction, respectively, and continues to automatically update it whenever the content direction changes.For other values, operates like
HasHorizontalAlignment.setHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant).For
null, the horizontal alignment is cleared, allowing it to be determined by the standard HTML mechanisms such as inheritance and CSS rules.- Parameters:
autoHorizontalAlignment- the new automatic horizontal alignment policy- See Also:
-