GWT 2.0.3

com.google.gwt.user.client.ui
Interface HasHorizontalAlignment

All Known Subinterfaces:
HasAlignment
All Known Implementing Classes:
Anchor, DockPanel, HorizontalPanel, HTML, InlineHTML, InlineLabel, Label, 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 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>
 


Nested Class Summary
static class HasHorizontalAlignment.HorizontalAlignmentConstant
          Horizontal alignment constant.
 
Field Summary
static HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_CENTER
          Specifies that the widget's contents should be aligned in the center.
static HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_DEFAULT
          In a RTL layout, specifies that the widget's contents should be aligned to the right.
static HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_LEFT
          Specifies that the widget's contents should be aligned to the left.
static HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_RIGHT
          Specifies that the widget's contents should be aligned to the right.
 
Method Summary
 HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
          Gets the horizontal alignment.
 void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
          Sets the horizontal alignment.
 

Field Detail

ALIGN_CENTER

static final HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_CENTER
Specifies that the widget's contents should be aligned in the center.


ALIGN_LEFT

static final HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_LEFT
Specifies that the widget's contents should be aligned to the left.


ALIGN_RIGHT

static final HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_RIGHT
Specifies that the widget's contents should be aligned to the right.


ALIGN_DEFAULT

static final HasHorizontalAlignment.HorizontalAlignmentConstant ALIGN_DEFAULT
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.

Method Detail

getHorizontalAlignment

HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
Gets the horizontal alignment.

Returns:
the current horizontal alignment.

setHorizontalAlignment

void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the horizontal alignment.

Parameters:
align - the horizontal alignment ( ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT), or ALIGN_DEFAULT).

GWT 2.0.3