Interface HasHorizontalAlignment

public interface HasHorizontalAlignment

// Extended by HasAlignment
// Implemented by Label
Characteristic interface which indicates that a widget can be aligned horizontally.

Nested Classes

HasHorizontalAlignment.HorizontalAlignmentConstantHorizontal alignment constant.

Fields

ALIGN_CENTERSpecifies that the widget's contents should be aligned in the center.
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.

Methods

getHorizontalAlignment()Gets the horizontal alignment.
setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant)Sets the horizontal alignment.

Field Detail

ALIGN_CENTER

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

ALIGN_LEFT

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

ALIGN_RIGHT

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

Method Detail

getHorizontalAlignment

public HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
Gets the horizontal alignment.

Return Value

the current horizontal alignment.

setHorizontalAlignment

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

Parameters

align
the horizontal alignment ( HasHorizontalAlignment.ALIGN_LEFT, HasHorizontalAlignment.ALIGN_CENTER, or HasHorizontalAlignment.ALIGN_RIGHT).