Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.core
Enum Qt.AlignmentFlag

    java.lang.Object
      java.lang.Enum<Qt.AlignmentFlag>
          com.trolltech.qt.core.Qt.AlignmentFlag

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<Qt.AlignmentFlag>

Enclosing interface:
  Qt

    public static enum Qt.AlignmentFlag

extends java.lang.Enum<Qt.AlignmentFlag>
implements QtEnumerator

This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.

The `TextElideMode` enum can also be used in many situations to fine-tune the appearance of aligned text.

The horizontal flags are:

Constant | Value | Description
--- | --- | ---
`AlignLeft` | `1` | Aligns with the left edge.
`AlignRight` | `2` | Aligns with the right edge.
`AlignHCenter` | `4` | Centers horizontally in the available space.
`AlignJustify` | `8` | Justifies the text in the available space.

The vertical flags are:

Constant | Value | Description
--- | --- | ---
`AlignTop` | `32` | Aligns with the top.
`AlignBottom` | `64` | Aligns with the bottom.
`AlignVCenter` | `128` | Centers vertically in the available space.

You can use only one of the horizontal flags at a time. There is one two-dimensional flag:

Constant | Value | Description
--- | --- | ---
`AlignCenter` | `132` | Centers in both dimensions.

You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.

Three enum values are useful in applications that can be run in right-to-left mode:

Constant | Value | Description
--- | --- | ---
`AlignAbsolute` | `16` | If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute.
`AlignLeading` | `1` | Synonym for Qt::AlignLeft.
`AlignTrailing` | `2` | Synonym for Qt::AlignRight.

Masks:

Constant | Value
--- | ---
`AlignHorizontal_Mask` | `31`
`AlignVertical_Mask` | `224`

Conflicting combinations of flags have undefined meanings.

Enum Constant Summary
`AlignAbsolute` If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge.
`AlignBottom` Aligns with the bottom.
`AlignCenter` Centers in both dimensions.
`AlignHCenter` Centers horizontally in the available space.
`AlignHorizontal_Mask` Internal.
`AlignJustify` Justifies the text in the available space.
`AlignLeft` Aligns with the left edge.
`AlignRight` Aligns with the right edge.
`AlignTop` Aligns with the top.
`AlignVCenter` Centers vertically in the available space.
`AlignVertical_Mask` Internal.

Method Summary
`static Qt.Alignment` | `createQFlags(Qt.AlignmentFlag... values)`
`static Qt.AlignmentFlag` | `resolve(int value)`
`int` | `value()` This function should return an integer value for the enum values of the enumeration that implements this interface.
`static Qt.AlignmentFlag` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static Qt.AlignmentFlag[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### AlignLeft

    public static final Qt.AlignmentFlag AlignLeft

  Aligns with the left edge.

### AlignRight

    public static final Qt.AlignmentFlag AlignRight

  Aligns with the right edge.

### AlignHCenter

    public static final Qt.AlignmentFlag AlignHCenter

  Centers horizontally in the available space.

### AlignJustify

    public static final Qt.AlignmentFlag AlignJustify

  Justifies the text in the available space.

### AlignAbsolute

    public static final Qt.AlignmentFlag AlignAbsolute

  If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute.

### AlignHorizontal_Mask

    public static final Qt.AlignmentFlag AlignHorizontal_Mask

  Internal.

### AlignTop

    public static final Qt.AlignmentFlag AlignTop

  Aligns with the top.

### AlignBottom

    public static final Qt.AlignmentFlag AlignBottom

  Aligns with the bottom.

### AlignVCenter

    public static final Qt.AlignmentFlag AlignVCenter

  Centers vertically in the available space.

### AlignVertical_Mask

    public static final Qt.AlignmentFlag AlignVertical_Mask

  Internal.

### AlignCenter

    public static final Qt.AlignmentFlag AlignCenter

  Centers in both dimensions.

Method Detail

### values

    public static final Qt.AlignmentFlag[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(Qt.AlignmentFlag c : Qt.AlignmentFlag.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static Qt.AlignmentFlag valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### value

    public int value()

  Description copied from interface: `QtEnumerator`
  This function should return an integer value for the enum values of the enumeration that implements this interface.

  Specified by:
    `value` in interface `QtEnumerator`

### createQFlags

    public static Qt.Alignment createQFlags(Qt.AlignmentFlag... values)

### resolve

    public static Qt.AlignmentFlag resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD