Package com.google.gwt.user.client.ui
Interface HasHorizontalAlignment
- All Known Subinterfaces:
- HasAlignment,- HasAutoHorizontalAlignment
- All Known Implementing Classes:
- Anchor,- Column,- DateLabel,- DialogBox.CaptionImpl,- DockPanel,- HorizontalPanel,- HTML,- IdentityColumn,- InlineHTML,- InlineLabel,- Label,- LabelBase,- NumberLabel,- TextColumn,- ValueLabel,- VerticalPanel
public interface HasHorizontalAlignment
Characteristic interface which indicates that a widget can be aligned
 horizontally.
 
 
Use in UiBinder Templates
 The names of the static members of HasHorizontalAlignment.HorizontalAlignmentConstant, as
 well as simple alignment names (left, center,
 right, justify), can be used as values for a
 horizontalAlignment attribute of any widget that implements this
 interface. (In fact, this will work for any widget method that takes a single
 HorizontalAlignmentConstant value.)
 
For example,
<g:Label horizontalAlignment='ALIGN_RIGHT'>Hi there.</g:Label> <g:Label horizontalAlignment='right'>Hi there.</g:Label>
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classType for values defined and used inHasAutoHorizontalAlignment.static classPossible return values forgetHorizontalAlignment(), and parameter values forsetHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HasHorizontalAlignment.HorizontalAlignmentConstantSpecifies that the widget's contents should be aligned in the center.static final HasHorizontalAlignment.HorizontalAlignmentConstantSynonym ofALIGN_LOCALE_START.static final HasHorizontalAlignment.HorizontalAlignmentConstantSpecifies that the widget's contents should be aligned as justify.static final HasHorizontalAlignment.HorizontalAlignmentConstantSpecifies that the widget's contents should be aligned to the left.static final HasHorizontalAlignment.HorizontalAlignmentConstantIn a RTL layout, specifies that the widget's contents should be aligned to the left.static final HasHorizontalAlignment.HorizontalAlignmentConstantIn a RTL layout, specifies that the widget's contents should be aligned to the right.static final HasHorizontalAlignment.HorizontalAlignmentConstantSpecifies that the widget's contents should be aligned to the right.
- 
Method SummaryModifier and TypeMethodDescriptionGets the horizontal alignment.voidSets the horizontal alignment.
- 
Field Details- 
ALIGN_CENTERSpecifies that the widget's contents should be aligned in the center.
- 
ALIGN_JUSTIFYSpecifies that the widget's contents should be aligned as justify.
- 
ALIGN_LEFTSpecifies that the widget's contents should be aligned to the left.
- 
ALIGN_RIGHTSpecifies that the widget's contents should be aligned to the right.
- 
ALIGN_LOCALE_STARTIn a RTL layout, specifies that the widget's contents should be aligned to the right. In a LTR layout, specifies that the widget's constants should be aligned to the left.
- 
ALIGN_LOCALE_ENDIn a RTL layout, specifies that the widget's contents should be aligned to the left. In a LTR layout, specifies that the widget's constants should be aligned to the right.
- 
ALIGN_DEFAULTSynonym ofALIGN_LOCALE_START.
 
- 
- 
Method Details- 
getHorizontalAlignmentHasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()Gets the horizontal alignment.- Returns:
- the current horizontal alignment (
         ALIGN_LEFT,ALIGN_CENTER,ALIGN_RIGHT,ALIGN_JUSTIFY, or null).
 
- 
setHorizontalAlignmentSets the horizontal alignment.Use nullto clear horizontal alignment, allowing it to be determined by the standard HTML mechanisms such as inheritance and CSS rules.- Parameters:
- align- the horizontal alignment (- ALIGN_LEFT,- ALIGN_CENTER,- ALIGN_RIGHT,- ALIGN_JUSTIFY,- ALIGN_LOCALE_START, or- ALIGN_LOCALE_END).
 
 
-