Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.util
Class CharUtilities

    java.lang.Object
      org.apache.fop.util.CharUtilities

public class CharUtilities
extends java.lang.Object

This class provides utilities to distinguish various kinds of Unicode whitespace and to get character widths in a given FontState.

Field Summary
`static char` | `CARRIAGE_RETURN` carriage return
`static char` | `CODE_EOT` Character code used to signal a character boundary in inline content, such as an inline with borders and padding or a nested block object.
`static int` | `EOT` Character class: Boundary between text runs
`static char` | `IDEOGRAPHIC_SPACE` Ideogreaphic space
`static char` | `LINE_SEPARATOR` line-separator
`static int` | `LINEFEED` Character class: Line feed
`static char` | `LINEFEED_CHAR` linefeed character
`static char` | `MISSING_IDEOGRAPH` missing ideograph
`static char` | `NBSPACE` non-breaking space
`static char` | `NEXT_LINE` next line control character
`static int` | `NONWHITESPACE` Character class: non-whitespace
`static char` | `NOT_A_CHARACTER` Unicode value indicating the the character is "not a character".
`static char` | `NULL_CHAR` null char
`static char` | `PARAGRAPH_SEPARATOR` paragraph-separator
`static char` | `SOFT_HYPHEN` soft hyphen
`static char` | `SPACE` normal space
`static char` | `TAB` normal tab
`static int` | `UCWHITESPACE` Character class: Unicode white space
`static char` | `WORD_JOINER` word joiner
`static int` | `XMLWHITESPACE` Character class: XML whitespace
`static char` | `ZERO_WIDTH_JOINER` zero-width joiner
`static char` | `ZERO_WIDTH_NOBREAK_SPACE` zero-width no-break space (= byte order mark)
`static char` | `ZERO_WIDTH_SPACE` zero-width space

Constructor Summary
`protected` | `CharUtilities()` Utility class: Constructor prevents instantiating when subclassed.

Method Summary
`static int` | `classOf(char c)` Return the appropriate CharClass constant for the type of the passed character.
`static boolean` | `isAdjustableSpace(char c)` Method to determine if the character is an adjustable space.
`static boolean` | `isAlphabetic(char ch)` Indicates whether a character is classified as "Alphabetic" by the Unicode standard.
`static boolean` | `isAnySpace(char c)` Determines if the character represents any kind of space.
`static boolean` | `isBreakableSpace(char c)` Helper method to determine if the character is a space with normal behavior.
`static boolean` | `isExplicitBreak(char ch)` Indicates whether the given character is an explicit break-character
`static boolean` | `isFixedWidthSpace(char c)` Method to determine if the character is a (breakable) fixed-width space.
`static boolean` | `isNonBreakableSpace(char c)` Method to determine if the character is a nonbreaking space.
`static boolean` | `isZeroWidthSpace(char c)` Method to determine if the character is a zero-width space.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CODE_EOT

    public static final char CODE_EOT

  Character code used to signal a character boundary in inline content, such as an inline with borders and padding or a nested block object.

  See Also:
    Constant Field Values

### UCWHITESPACE

    public static final int UCWHITESPACE

  Character class: Unicode white space

  See Also:
    Constant Field Values

### LINEFEED

    public static final int LINEFEED

  Character class: Line feed

  See Also:
    Constant Field Values

### EOT

    public static final int EOT

  Character class: Boundary between text runs

  See Also:
    Constant Field Values

### NONWHITESPACE

    public static final int NONWHITESPACE

  Character class: non-whitespace

  See Also:
    Constant Field Values

### XMLWHITESPACE

    public static final int XMLWHITESPACE

  Character class: XML whitespace

  See Also:
    Constant Field Values

### NULL_CHAR

    public static final char NULL_CHAR

  null char

  See Also:
    Constant Field Values

### LINEFEED_CHAR

    public static final char LINEFEED_CHAR

  linefeed character

  See Also:
    Constant Field Values

### CARRIAGE_RETURN

    public static final char CARRIAGE_RETURN

  carriage return

  See Also:
    Constant Field Values

### TAB

    public static final char TAB

  normal tab

  See Also:
    Constant Field Values

### SPACE

    public static final char SPACE

  normal space

  See Also:
    Constant Field Values

### NBSPACE

    public static final char NBSPACE

  non-breaking space

  See Also:
    Constant Field Values

### NEXT_LINE

    public static final char NEXT_LINE

  next line control character

  See Also:
    Constant Field Values

### ZERO_WIDTH_SPACE

    public static final char ZERO_WIDTH_SPACE

  zero-width space

  See Also:
    Constant Field Values

### WORD_JOINER

    public static final char WORD_JOINER

  word joiner

  See Also:
    Constant Field Values

### ZERO_WIDTH_JOINER

    public static final char ZERO_WIDTH_JOINER

  zero-width joiner

  See Also:
    Constant Field Values

### ZERO_WIDTH_NOBREAK_SPACE

    public static final char ZERO_WIDTH_NOBREAK_SPACE

  zero-width no-break space (= byte order mark)

  See Also:
    Constant Field Values

### SOFT_HYPHEN

    public static final char SOFT_HYPHEN

  soft hyphen

  See Also:
    Constant Field Values

### LINE_SEPARATOR

    public static final char LINE_SEPARATOR

  line-separator

  See Also:
    Constant Field Values

### PARAGRAPH_SEPARATOR

    public static final char PARAGRAPH_SEPARATOR

  paragraph-separator

  See Also:
    Constant Field Values

### MISSING_IDEOGRAPH

    public static final char MISSING_IDEOGRAPH

  missing ideograph

  See Also:
    Constant Field Values

### IDEOGRAPHIC_SPACE

    public static final char IDEOGRAPHIC_SPACE

  Ideogreaphic space

  See Also:
    Constant Field Values

### NOT_A_CHARACTER

    public static final char NOT_A_CHARACTER

  Unicode value indicating the the character is "not a character".

  See Also:
    Constant Field Values

Constructor Detail

### CharUtilities

    protected CharUtilities()

  Utility class: Constructor prevents instantiating when subclassed.

Method Detail

### classOf

    public static int classOf(char c)

  Return the appropriate CharClass constant for the type of the passed character.

  Parameters:
    `c` - character to inspect
  Returns:
    the determined character class

### isBreakableSpace

    public static boolean isBreakableSpace(char c)

  Helper method to determine if the character is a space with normal behavior. Normal behavior means that it's not non-breaking.

  Parameters:
    `c` - character to inspect
  Returns:
    True if the character is a normal space

### isZeroWidthSpace

    public static boolean isZeroWidthSpace(char c)

  Method to determine if the character is a zero-width space.

  Parameters:
    `c` - the character to check
  Returns:
    true if the character is a zero-width space

### isFixedWidthSpace

    public static boolean isFixedWidthSpace(char c)

  Method to determine if the character is a (breakable) fixed-width space.

  Parameters:
    `c` - the character to check
  Returns:
    true if the character has a fixed-width

### isNonBreakableSpace

    public static boolean isNonBreakableSpace(char c)

  Method to determine if the character is a nonbreaking space.

  Parameters:
    `c` - character to check
  Returns:
    True if the character is a nbsp

### isAdjustableSpace

    public static boolean isAdjustableSpace(char c)

  Method to determine if the character is an adjustable space.

  Parameters:
    `c` - character to check
  Returns:
    True if the character is adjustable

### isAnySpace

    public static boolean isAnySpace(char c)

  Determines if the character represents any kind of space.

  Parameters:
    `c` - character to check
  Returns:
    True if the character represents any kind of space

### isAlphabetic

    public static boolean isAlphabetic(char ch)

  Indicates whether a character is classified as "Alphabetic" by the Unicode standard.

  Parameters:
    `ch` - the character
  Returns:
    true if the character is "Alphabetic"

### isExplicitBreak

    public static boolean isExplicitBreak(char ch)

  Indicates whether the given character is an explicit break-character

  Parameters:
    `ch` - the character to check
  Returns:
    true if the character represents an explicit break

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.