org.eclnt.jsfserver.util

## Class SmartText

- java.lang.Object
- - org.eclnt.jsfserver.util.SmartText

- All Implemented Interfaces:
    java.io.Serializable, IValueByToString

      public class SmartText
      extends java.lang.Object
      implements java.io.Serializable, IValueByToString

  Object representation of a "smart text" - i.e. a character sequencing containing simple formatting instructions. The smart text is a "normal text" together with some sequentially oriented formatting information.
  Example: the text "abcdefg" is the text content, "ab" should be formatted as underlined text, "de" should be formatted as bold text, in red color. In this case the representation would be: "abcdefg" is the text, from 0 to 2 the format "20" is applied, from 3 to 5 the format "11" is applied.
  Please check the F_* constants for seeing what is possible in terms of formatting the text. Use the base format (e.g. F_BOLD) and add the color format (e.g. F_ADDCOLOR_RED) in order to define the corresponding format.
  Please pay attention: format informations must never overlap - the definition of formats is strictly sequential!
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SmartText.SmartTextFormatInfo` Formatting info for a certain part of the text.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `F_ADDCOLOR_BLUE`
    `static int` | `F_ADDCOLOR_GREEN`
    `static int` | `F_ADDCOLOR_RED`
    `static int` | `F_BOLD`
    `static int` | `F_HIGHLIGHTED`
    `static int` | `F_REGULAR`
    `static int` | `F_SUBSCRIPT`
    `static int` | `F_SUPERSCRIPT`
    `static int` | `F_UNDERLINED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SmartText(java.lang.String csvText)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTextFormatInfo(int beginOffset, int endOffset, int format)`
    `void` | `clearFormatInfos()`
    `java.lang.String` | `getSmartTextCSV()`
    `java.lang.String` | `getText()`
    `void` | `setSmartTextCSV(java.lang.String csvText)`
    `java.lang.String` | `toHTMLString()`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### F_REGULAR

          public static final int F_REGULAR

      See Also:
        Constant Field Values

    - #### F_BOLD

          public static final int F_BOLD

      See Also:
        Constant Field Values

    - #### F_UNDERLINED

          public static final int F_UNDERLINED

      See Also:
        Constant Field Values

    - #### F_SUBSCRIPT

          public static final int F_SUBSCRIPT

      See Also:
        Constant Field Values

    - #### F_SUPERSCRIPT

          public static final int F_SUPERSCRIPT

      See Also:
        Constant Field Values

    - #### F_HIGHLIGHTED

          public static final int F_HIGHLIGHTED

      See Also:
        Constant Field Values

    - #### F_ADDCOLOR_RED

          public static final int F_ADDCOLOR_RED

      See Also:
        Constant Field Values

    - #### F_ADDCOLOR_GREEN

          public static final int F_ADDCOLOR_GREEN

      See Also:
        Constant Field Values

    - #### F_ADDCOLOR_BLUE

          public static final int F_ADDCOLOR_BLUE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SmartText

          public SmartText(java.lang.String csvText)

  - ### Method Detail

    - #### getText

          public java.lang.String getText()

    - #### addTextFormatInfo

          public void addTextFormatInfo(int beginOffset,
                                        int endOffset,
                                        int format)

    - #### clearFormatInfos

          public void clearFormatInfos()

    - #### setSmartTextCSV

          public void setSmartTextCSV(java.lang.String csvText)

    - #### getSmartTextCSV

          public java.lang.String getSmartTextCSV()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### toHTMLString

          public java.lang.String toHTMLString()

Copyright © CaptainCasa Gmbh. All Rights Reserved.