Enum Class TextJustify

java.lang.Object
java.lang.Enum<TextJustify>
com.oorian.css.TextJustify
All Implemented Interfaces:
Serializable, Comparable<TextJustify>, Constable

public enum TextJustify extends Enum<TextJustify>
CSS text-justify property values for justification method.

The text-justify property specifies how justified text should be aligned when text-align is set to "justify". Different methods are appropriate for different writing systems.

Justification Methods:

  • auto: Browser selects method (default)
  • inter-word: Adjusts space between words
  • inter-character: Adjusts space between characters
  • distribute: Even distribution for CJK text
  • kashida: For Arabic text with kashida insertion

Usage:


 paragraph.setTextJustify(TextJustify.INTER_WORD);
 japaneseText.setTextJustify(TextJustify.DISTRIBUTE);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INITIAL

      public static final TextJustify INITIAL
      Sets to default value.
    • INHERIT

      public static final TextJustify INHERIT
      Inherits from parent element.
    • AUTO

      public static final TextJustify AUTO
      Browser selects appropriate method.
    • NONE

      public static final TextJustify NONE
      Disables justification.
    • INTER_WORD

      public static final TextJustify INTER_WORD
      Adjusts spacing between words.
    • INTER_IDEOGRAPH

      public static final TextJustify INTER_IDEOGRAPH
      For ideographic scripts like CJK.
    • INTER_CLUSTER

      public static final TextJustify INTER_CLUSTER
      Distributes space between character clusters.
    • DISTRIBUTE

      public static final TextJustify DISTRIBUTE
      Even distribution of space.
    • KASHIDA

      public static final TextJustify KASHIDA
      Arabic kashida character insertion.
    • TRIM

      public static final TextJustify TRIM
      Trims whitespace from ends of lines.
  • Method Details

    • values

      public static TextJustify[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TextJustify valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<TextJustify>
      Returns:
      the CSS value