JustificationMode

Inheritance: java.lang.Object

public class JustificationMode

Specifies the character spacing adjustment for a document. The default value is Expand .

Examples:

Shows how to manage character spacing control.


 Document doc = new Document(getMyDir() + "Document.docx");

 int justificationMode = doc.getJustificationMode();
 if (justificationMode == JustificationMode.EXPAND)
     doc.setJustificationMode(JustificationMode.COMPRESS);

 doc.save(getArtifactsDir() + "Document.SetJustificationMode.docx");
 

Fields

FieldDescription
COMPRESSCompress character spacing.
COMPRESS_KANACompress, using rules of the kana syllabaries, Hiragana and Katakana.
EXPANDDo not compress character spacing.
length

Methods

MethodDescription
fromName(String justificationModeName)
getName(int justificationMode)
getValues()
toString(int justificationMode)

COMPRESS

public static int COMPRESS

Compress character spacing.

COMPRESS_KANA

public static int COMPRESS_KANA

Compress, using rules of the kana syllabaries, Hiragana and Katakana.

EXPAND

public static int EXPAND

Do not compress character spacing.

length

public static int length

fromName(String justificationModeName)

public static int fromName(String justificationModeName)

Parameters:

ParameterTypeDescription
justificationModeNamejava.lang.String

Returns: int

getName(int justificationMode)

public static String getName(int justificationMode)

Parameters:

ParameterTypeDescription
justificationModeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int justificationMode)

public static String toString(int justificationMode)

Parameters:

ParameterTypeDescription
justificationModeint

Returns: java.lang.String