org.apache.fop.traits

## Class WritingMode

- java.lang.Object
- - org.apache.fop.traits.TraitEnum
  - - org.apache.fop.traits.WritingMode

- All Implemented Interfaces:
    Serializable

      public final class WritingMode
      extends TraitEnum

  Enumeration class for writing mode trait.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static WritingMode` | `LR_TB` writing mode: lr-tb
    `static WritingMode` | `RL_TB` writing mode: rl-tb
    `static WritingMode` | `TB_LR` writing mode: tb-lr
    `static WritingMode` | `TB_RL` writing mode: tb-rl

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assignWritingModeTraits(WritingModeTraitsSetter wms, boolean explicit)` Assign writing mode traits from this trait to the specified writing mode traits setter.
    `boolean` | `isHorizontal()` Determine if WM is horizontal or not.
    `boolean` | `isVertical()` Determine if WM is vertical or not.
    `String` | `toString()`
    `static WritingMode` | `valueOf(int enumValue)` Returns the enumeration/singleton object based on its name.
    `static WritingMode` | `valueOf(String name)` Returns the enumeration/singleton object based on its name.

    - ### Methods inherited from class org.apache.fop.traits.TraitEnum

      `getEnumValue, getName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LR_TB

          public static final WritingMode LR_TB

      writing mode: lr-tb

    - #### RL_TB

          public static final WritingMode RL_TB

      writing mode: rl-tb

    - #### TB_LR

          public static final WritingMode TB_LR

      writing mode: tb-lr

    - #### TB_RL

          public static final WritingMode TB_RL

      writing mode: tb-rl

  - ### Method Detail

    - #### assignWritingModeTraits

          public void assignWritingModeTraits(WritingModeTraitsSetter wms,
                                              boolean explicit)

      Assign writing mode traits from this trait to the specified writing mode traits setter.
      Parameters:
        `wms` - a writing mode traits setter
        `explicit` - true if writing mode property explicitly specified

    - #### isHorizontal

          public boolean isHorizontal()

      Determine if WM is horizontal or not.
      Returns:
        true if horizontal

    - #### isVertical

          public boolean isVertical()

      Determine if WM is vertical or not.
      Returns:
        true if vertical

    - #### valueOf

          public static WritingMode valueOf(String name)

      Returns the enumeration/singleton object based on its name.
      Parameters:
        `name` - the name of the enumeration value
      Returns:
        the enumeration object

    - #### valueOf

          public static WritingMode valueOf(int enumValue)

      Returns the enumeration/singleton object based on its name.
      Parameters:
        `enumValue` - the enumeration value
      Returns:
        the enumeration object

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2025 Apache Software Foundation. All rights reserved.