com.google.gwt.user.client.ui.HasHorizontalAlignment |
Known Indirect Subclasses
Anchor,
Column<T, C>,
DateLabel,
DockPanel,
HTML,
HasAlignment,
HasAutoHorizontalAlignment,
HorizontalPanel,
IdentityColumn<T>,
InlineHTML,
InlineLabel,
Label,
LabelBase<T>,
NumberLabel<T extends Number>,
TextColumn<T>,
ValueLabel<T>,
VerticalPanel
|
Characteristic interface which indicates that a widget can be aligned horizontally.
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 Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HasHorizontalAlignment.AutoHorizontalAlignmentConstant | Type for values defined and used in HasAutoHorizontalAlignment . |
||||||||||
HasHorizontalAlignment.HorizontalAlignmentConstant | Possible return values for getHorizontalAlignment() , and parameter
values for setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant) . |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ALIGN_CENTER | Specifies that the widget's contents should be aligned in the center. | ||||||||||
ALIGN_DEFAULT | Synonym of ALIGN_LOCALE_START . |
||||||||||
ALIGN_JUSTIFY | Specifies that the widget's contents should be aligned as justify. | ||||||||||
ALIGN_LEFT | Specifies that the widget's contents should be aligned to the left. | ||||||||||
ALIGN_LOCALE_END | In a RTL layout, specifies that the widget's contents should be aligned to the left. | ||||||||||
ALIGN_LOCALE_START | In a RTL layout, specifies that the widget's contents should be aligned to the right. | ||||||||||
ALIGN_RIGHT | Specifies that the widget's contents should be aligned to the right. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the horizontal alignment.
| |||||||||||
Sets the horizontal alignment.
|
Specifies that the widget's contents should be aligned in the center.
Synonym of ALIGN_LOCALE_START
.
Specifies that the widget's contents should be aligned as justify.
Specifies that the widget's contents should be aligned to the left.
In 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.
In 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.
Specifies that the widget's contents should be aligned to the right.
Gets the horizontal alignment.
ALIGN_LEFT
,
ALIGN_CENTER
,
ALIGN_RIGHT
,
ALIGN_JUSTIFY
, or
null).
Sets the horizontal alignment.
Use null
to clear horizontal alignment, allowing it to be
determined by the standard HTML mechanisms such as inheritance and CSS
rules.
align | the horizontal alignment (
ALIGN_LEFT ,
ALIGN_CENTER ,
ALIGN_RIGHT ,
ALIGN_JUSTIFY ,
ALIGN_LOCALE_START , or
ALIGN_LOCALE_END ).
|
---|