com.vaadin.ui.
Class Alignment
java.lang.Object
com.vaadin.ui.Alignment
All Implemented Interfaces:
- extends Object
- implements Serializable
public final class Alignment
Class containing information about alignment of a component. Use the pre-instantiated classes.
See Also:
Field Summary | |
---|---|
static Alignment |
BOTTOM_CENTER
|
static Alignment |
BOTTOM_LEFT
|
static Alignment |
BOTTOM_RIGHT
|
static Alignment |
MIDDLE_CENTER
|
static Alignment |
MIDDLE_LEFT
|
static Alignment |
MIDDLE_RIGHT
|
static Alignment |
TOP_CENTER
|
static Alignment |
TOP_LEFT
|
static Alignment |
TOP_RIGHT
|
Constructor Summary | |
---|---|
Alignment(int bitMask)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getBitMask()
Returns a bitmask representation of the alignment value. |
String |
getHorizontalAlignment()
Returns string representation of horizontal alignment. |
String |
getVerticalAlignment()
Returns string representation of vertical alignment. |
int |
hashCode()
|
boolean |
isBottom()
Checks if component is aligned to the bottom of the available space. |
boolean |
isCenter()
Checks if component is aligned center (horizontally) of the available space. |
boolean |
isLeft()
Checks if component is aligned to the left of the available space. |
boolean |
isMiddle()
Checks if component is aligned middle (vertically center) of the available space. |
boolean |
isRight()
Checks if component is aligned to the right of the available space. |
boolean |
isTop()
Checks if component is aligned to the top of the available space. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
TOP_RIGHT
public static final Alignment TOP_RIGHT
TOP_LEFT
public static final Alignment TOP_LEFT
TOP_CENTER
public static final Alignment TOP_CENTER
MIDDLE_RIGHT
public static final Alignment MIDDLE_RIGHT
MIDDLE_LEFT
public static final Alignment MIDDLE_LEFT
MIDDLE_CENTER
public static final Alignment MIDDLE_CENTER
BOTTOM_RIGHT
public static final Alignment BOTTOM_RIGHT
BOTTOM_LEFT
public static final Alignment BOTTOM_LEFT
BOTTOM_CENTER
public static final Alignment BOTTOM_CENTER
Constructor Detail |
---|
Alignment
public Alignment(int bitMask)
Method Detail |
---|
getBitMask
public int getBitMask()
- Returns:
- the bitmask representation of the alignment value
Returns a bitmask representation of the alignment value. Used internally by terminal.
isTop
public boolean isTop()
- Returns:
- true if aligned top
Checks if component is aligned to the top of the available space.
isBottom
public boolean isBottom()
- Returns:
- true if aligned bottom
Checks if component is aligned to the bottom of the available space.
isLeft
public boolean isLeft()
- Returns:
- true if aligned left
Checks if component is aligned to the left of the available space.
isRight
public boolean isRight()
- Returns:
- true if aligned right
Checks if component is aligned to the right of the available space.
isMiddle
public boolean isMiddle()
- Returns:
- true if aligned bottom
Checks if component is aligned middle (vertically center) of the available space.
isCenter
public boolean isCenter()
- Returns:
- true if aligned center
Checks if component is aligned center (horizontally) of the available space.
getVerticalAlignment
public String getVerticalAlignment()
- Returns:
- vertical alignment as CSS value
Returns string representation of vertical alignment.
getHorizontalAlignment
public String getHorizontalAlignment()
- Returns:
- horizontal alignment as CSS value
Returns string representation of horizontal alignment.
equals
public boolean equals(Object obj)
hashCode
public int hashCode()
toString
public String toString()